diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-06-16 16:12:33 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-06-16 16:12:33 +0000 |
commit | 2e4ba09bb54f415e7f8fd66f4ccddbf421612820 (patch) | |
tree | bcb3dfba371a3c6a3957285650ae694ea057307c /os/kernel/src | |
parent | 0d96f5c78e54d267ef1ca230fe20af1ca090e1d6 (diff) | |
download | ChibiOS-2e4ba09bb54f415e7f8fd66f4ccddbf421612820.tar.gz ChibiOS-2e4ba09bb54f415e7f8fd66f4ccddbf421612820.tar.bz2 ChibiOS-2e4ba09bb54f415e7f8fd66f4ccddbf421612820.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@5860 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src')
-rw-r--r-- | os/kernel/src/chcond.c | 4 | ||||
-rw-r--r-- | os/kernel/src/chqueues.c | 8 | ||||
-rw-r--r-- | os/kernel/src/chsem.c | 32 | ||||
-rw-r--r-- | os/kernel/src/chthreads.c | 2 |
4 files changed, 23 insertions, 23 deletions
diff --git a/os/kernel/src/chcond.c b/os/kernel/src/chcond.c index c217bf6fd..0e404808f 100644 --- a/os/kernel/src/chcond.c +++ b/os/kernel/src/chcond.c @@ -68,7 +68,7 @@ void chCondSignal(CondVar *cp) { chDbgCheck(cp != NULL, "chCondSignal");
chSysLock();
- if (notempty(&cp->c_queue))
+ if (queue_notempty(&cp->c_queue))
chSchWakeupS(fifo_remove(&cp->c_queue), RDY_OK);
chSysUnlock();
}
@@ -89,7 +89,7 @@ void chCondSignalI(CondVar *cp) { chDbgCheckClassI();
chDbgCheck(cp != NULL, "chCondSignalI");
- if (notempty(&cp->c_queue))
+ if (queue_notempty(&cp->c_queue))
chSchReadyI(fifo_remove(&cp->c_queue))->p_u.rdymsg = RDY_OK;
}
diff --git a/os/kernel/src/chqueues.c b/os/kernel/src/chqueues.c index 871e499a0..fa2bd527b 100644 --- a/os/kernel/src/chqueues.c +++ b/os/kernel/src/chqueues.c @@ -113,7 +113,7 @@ void chIQResetI(InputQueue *iqp) { iqp->q_rdptr = iqp->q_wrptr = iqp->q_buffer;
iqp->q_counter = 0;
- while (notempty(&iqp->q_waiting))
+ while (queue_notempty(&iqp->q_waiting))
chSchReadyI(fifo_remove(&iqp->q_waiting))->p_u.rdymsg = Q_RESET;
}
@@ -142,7 +142,7 @@ msg_t chIQPutI(InputQueue *iqp, uint8_t b) { if (iqp->q_wrptr >= iqp->q_top)
iqp->q_wrptr = iqp->q_buffer;
- if (notempty(&iqp->q_waiting))
+ if (queue_notempty(&iqp->q_waiting))
chSchReadyI(fifo_remove(&iqp->q_waiting))->p_u.rdymsg = Q_OK;
return Q_OK;
@@ -293,7 +293,7 @@ void chOQResetI(OutputQueue *oqp) { oqp->q_rdptr = oqp->q_wrptr = oqp->q_buffer;
oqp->q_counter = chQSizeI(oqp);
- while (notempty(&oqp->q_waiting))
+ while (queue_notempty(&oqp->q_waiting))
chSchReadyI(fifo_remove(&oqp->q_waiting))->p_u.rdymsg = Q_RESET;
}
@@ -366,7 +366,7 @@ msg_t chOQGetI(OutputQueue *oqp) { if (oqp->q_rdptr >= oqp->q_top)
oqp->q_rdptr = oqp->q_buffer;
- if (notempty(&oqp->q_waiting))
+ if (queue_notempty(&oqp->q_waiting))
chSchReadyI(fifo_remove(&oqp->q_waiting))->p_u.rdymsg = Q_OK;
return b;
diff --git a/os/kernel/src/chsem.c b/os/kernel/src/chsem.c index 2dc7ee354..7ea365291 100644 --- a/os/kernel/src/chsem.c +++ b/os/kernel/src/chsem.c @@ -131,8 +131,8 @@ void chSemResetI(Semaphore *sp, cnt_t n) { chDbgCheckClassI();
chDbgCheck((sp != NULL) && (n >= 0), "chSemResetI");
- chDbgAssert(((sp->s_cnt >= 0) && isempty(&sp->s_queue)) ||
- ((sp->s_cnt < 0) && notempty(&sp->s_queue)),
+ chDbgAssert(((sp->s_cnt >= 0) && queue_isempty(&sp->s_queue)) ||
+ ((sp->s_cnt < 0) && queue_notempty(&sp->s_queue)),
"chSemResetI(), #1",
"inconsistent semaphore");
@@ -179,8 +179,8 @@ msg_t chSemWaitS(Semaphore *sp) { chDbgCheckClassS();
chDbgCheck(sp != NULL, "chSemWaitS");
- chDbgAssert(((sp->s_cnt >= 0) && isempty(&sp->s_queue)) ||
- ((sp->s_cnt < 0) && notempty(&sp->s_queue)),
+ chDbgAssert(((sp->s_cnt >= 0) && queue_isempty(&sp->s_queue)) ||
+ ((sp->s_cnt < 0) && queue_notempty(&sp->s_queue)),
"chSemWaitS(), #1",
"inconsistent semaphore");
@@ -244,8 +244,8 @@ msg_t chSemWaitTimeoutS(Semaphore *sp, systime_t time) { chDbgCheckClassS();
chDbgCheck(sp != NULL, "chSemWaitTimeoutS");
- chDbgAssert(((sp->s_cnt >= 0) && isempty(&sp->s_queue)) ||
- ((sp->s_cnt < 0) && notempty(&sp->s_queue)),
+ chDbgAssert(((sp->s_cnt >= 0) && queue_isempty(&sp->s_queue)) ||
+ ((sp->s_cnt < 0) && queue_notempty(&sp->s_queue)),
"chSemWaitTimeoutS(), #1",
"inconsistent semaphore");
@@ -271,8 +271,8 @@ msg_t chSemWaitTimeoutS(Semaphore *sp, systime_t time) { void chSemSignal(Semaphore *sp) {
chDbgCheck(sp != NULL, "chSemSignal");
- chDbgAssert(((sp->s_cnt >= 0) && isempty(&sp->s_queue)) ||
- ((sp->s_cnt < 0) && notempty(&sp->s_queue)),
+ chDbgAssert(((sp->s_cnt >= 0) && queue_isempty(&sp->s_queue)) ||
+ ((sp->s_cnt < 0) && queue_notempty(&sp->s_queue)),
"chSemSignal(), #1",
"inconsistent semaphore");
@@ -297,8 +297,8 @@ void chSemSignalI(Semaphore *sp) { chDbgCheckClassI();
chDbgCheck(sp != NULL, "chSemSignalI");
- chDbgAssert(((sp->s_cnt >= 0) && isempty(&sp->s_queue)) ||
- ((sp->s_cnt < 0) && notempty(&sp->s_queue)),
+ chDbgAssert(((sp->s_cnt >= 0) && queue_isempty(&sp->s_queue)) ||
+ ((sp->s_cnt < 0) && queue_notempty(&sp->s_queue)),
"chSemSignalI(), #1",
"inconsistent semaphore");
@@ -328,8 +328,8 @@ void chSemAddCounterI(Semaphore *sp, cnt_t n) { chDbgCheckClassI();
chDbgCheck((sp != NULL) && (n > 0), "chSemAddCounterI");
- chDbgAssert(((sp->s_cnt >= 0) && isempty(&sp->s_queue)) ||
- ((sp->s_cnt < 0) && notempty(&sp->s_queue)),
+ chDbgAssert(((sp->s_cnt >= 0) && queue_isempty(&sp->s_queue)) ||
+ ((sp->s_cnt < 0) && queue_notempty(&sp->s_queue)),
"chSemAddCounterI(), #1",
"inconsistent semaphore");
@@ -360,12 +360,12 @@ msg_t chSemSignalWait(Semaphore *sps, Semaphore *spw) { msg_t msg;
chDbgCheck((sps != NULL) && (spw != NULL), "chSemSignalWait");
- chDbgAssert(((sps->s_cnt >= 0) && isempty(&sps->s_queue)) ||
- ((sps->s_cnt < 0) && notempty(&sps->s_queue)),
+ chDbgAssert(((sps->s_cnt >= 0) && queue_isempty(&sps->s_queue)) ||
+ ((sps->s_cnt < 0) && queue_notempty(&sps->s_queue)),
"chSemSignalWait(), #1",
"inconsistent semaphore");
- chDbgAssert(((spw->s_cnt >= 0) && isempty(&spw->s_queue)) ||
- ((spw->s_cnt < 0) && notempty(&spw->s_queue)),
+ chDbgAssert(((spw->s_cnt >= 0) && queue_isempty(&spw->s_queue)) ||
+ ((spw->s_cnt < 0) && queue_notempty(&spw->s_queue)),
"chSemSignalWait(), #2",
"inconsistent semaphore");
diff --git a/os/kernel/src/chthreads.c b/os/kernel/src/chthreads.c index 7652cbfb1..37d25eb7b 100644 --- a/os/kernel/src/chthreads.c +++ b/os/kernel/src/chthreads.c @@ -364,7 +364,7 @@ void chThdExitS(msg_t msg) { THREAD_EXT_EXIT_HOOK(tp);
#endif
#if CH_USE_WAITEXIT
- while (notempty(&tp->p_waiting))
+ while (list_notempty(&tp->p_waiting))
chSchReadyI(list_remove(&tp->p_waiting));
#endif
#if CH_USE_REGISTRY
|