From cf204e72ea5fd6e4be8b3295cb148fde5fdd47d2 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 16 Feb 2016 10:07:00 +0000 Subject: Tree reorganization. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8900 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/src/chcond.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'os/rt/src/chcond.c') diff --git a/os/rt/src/chcond.c b/os/rt/src/chcond.c index 20b0cd47e..906f1dbc7 100644 --- a/os/rt/src/chcond.c +++ b/os/rt/src/chcond.c @@ -76,7 +76,7 @@ void chCondObjectInit(condition_variable_t *cp) { chDbgCheck(cp != NULL); - queue_init(&cp->c_queue); + queue_init(&cp->queue); } /** @@ -91,8 +91,8 @@ void chCondSignal(condition_variable_t *cp) { chDbgCheck(cp != NULL); chSysLock(); - if (queue_notempty(&cp->c_queue)) { - chSchWakeupS(queue_fifo_remove(&cp->c_queue), MSG_OK); + if (queue_notempty(&cp->queue)) { + chSchWakeupS(queue_fifo_remove(&cp->queue), MSG_OK); } chSysUnlock(); } @@ -113,9 +113,9 @@ void chCondSignalI(condition_variable_t *cp) { chDbgCheckClassI(); chDbgCheck(cp != NULL); - if (queue_notempty(&cp->c_queue)) { - thread_t *tp = queue_fifo_remove(&cp->c_queue); - tp->p_u.rdymsg = MSG_OK; + if (queue_notempty(&cp->queue)) { + thread_t *tp = queue_fifo_remove(&cp->queue); + tp->u.rdymsg = MSG_OK; (void) chSchReadyI(tp); } } @@ -154,8 +154,8 @@ void chCondBroadcastI(condition_variable_t *cp) { /* Empties the condition variable queue and inserts all the threads into the ready list in FIFO order. The wakeup message is set to @p MSG_RESET in order to make a chCondBroadcast() detectable from a chCondSignal().*/ - while (queue_notempty(&cp->c_queue)) { - chSchReadyI(queue_fifo_remove(&cp->c_queue))->p_u.rdymsg = MSG_RESET; + while (queue_notempty(&cp->queue)) { + chSchReadyI(queue_fifo_remove(&cp->queue))->u.rdymsg = MSG_RESET; } } @@ -209,7 +209,7 @@ msg_t chCondWaitS(condition_variable_t *cp) { chDbgCheckClassS(); chDbgCheck(cp != NULL); - chDbgAssert(ctp->p_mtxlist != NULL, "not owning a mutex"); + chDbgAssert(ctp->mtxlist != NULL, "not owning a mutex"); /* Getting "current" mutex and releasing it.*/ mp = chMtxGetNextMutexS(); @@ -217,10 +217,10 @@ msg_t chCondWaitS(condition_variable_t *cp) { /* Start waiting on the condition variable, on exit the mutex is taken again.*/ - ctp->p_u.wtobjp = cp; - queue_prio_insert(ctp, &cp->c_queue); + ctp->u.wtobjp = cp; + queue_prio_insert(ctp, &cp->queue); chSchGoSleepS(CH_STATE_WTCOND); - msg = ctp->p_u.rdymsg; + msg = ctp->u.rdymsg; chMtxLockS(mp); return msg; @@ -299,7 +299,7 @@ msg_t chCondWaitTimeoutS(condition_variable_t *cp, systime_t time) { chDbgCheckClassS(); chDbgCheck((cp != NULL) && (time != TIME_IMMEDIATE)); - chDbgAssert(currp->p_mtxlist != NULL, "not owning a mutex"); + chDbgAssert(currp->mtxlist != NULL, "not owning a mutex"); /* Getting "current" mutex and releasing it.*/ mp = chMtxGetNextMutexS(); @@ -307,8 +307,8 @@ msg_t chCondWaitTimeoutS(condition_variable_t *cp, systime_t time) { /* Start waiting on the condition variable, on exit the mutex is taken again.*/ - currp->p_u.wtobjp = cp; - queue_prio_insert(currp, &cp->c_queue); + currp->u.wtobjp = cp; + queue_prio_insert(currp, &cp->queue); msg = chSchGoSleepTimeoutS(CH_STATE_WTCOND, time); if (msg != MSG_TIMEOUT) { chMtxLockS(mp); -- cgit v1.2.3