aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/src/chcond.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/kernel/src/chcond.c')
-rw-r--r--os/kernel/src/chcond.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/os/kernel/src/chcond.c b/os/kernel/src/chcond.c
index a78ff4ec5..33ffe98b1 100644
--- a/os/kernel/src/chcond.c
+++ b/os/kernel/src/chcond.c
@@ -206,20 +206,18 @@ msg_t chCondWaitTimeout(CondVar *cp, systime_t time) {
* timeout.
*/
msg_t chCondWaitTimeoutS(CondVar *cp, systime_t time) {
- Thread *ctp = currp;
Mutex *mp;
msg_t msg;
chDbgCheck(cp != NULL, "chCondWaitTimeoutS");
- chDbgAssert(ctp->p_mtxlist != NULL,
+ chDbgAssert(currp->p_mtxlist != NULL,
"chCondWaitTimeoutS(), #1",
"not owning a mutex");
mp = chMtxUnlockS();
- ctp->p_u.wtobjp = cp;
- prio_insert(ctp, &cp->c_queue);
+ currp->p_u.wtobjp = cp;
+ prio_insert(currp, &cp->c_queue);
msg = chSchGoSleepTimeoutS(THD_STATE_WTCOND, time);
-// msg = ctp->p_u.rdymsg;
chMtxLockS(mp);
return msg;
}