diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-07-30 11:01:56 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-07-30 11:01:56 +0000 |
commit | e150283e1f071673e1d3490cbf85651e5502d421 (patch) | |
tree | a34e5264e7c789b87ef2414472bbe8eb4a93d332 /src/chsem.c | |
parent | 0cd87f700cbc1d8dcb03bafe90793626d6efbb32 (diff) | |
download | ChibiOS-e150283e1f071673e1d3490cbf85651e5502d421.tar.gz ChibiOS-e150283e1f071673e1d3490cbf85651e5502d421.tar.bz2 ChibiOS-e150283e1f071673e1d3490cbf85651e5502d421.zip |
Various optimizations to the scheduler.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@378 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/chsem.c')
-rw-r--r-- | src/chsem.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/chsem.c b/src/chsem.c index d1199f072..b5c197b6b 100644 --- a/src/chsem.c +++ b/src/chsem.c @@ -72,7 +72,7 @@ void chSemResetI(Semaphore *sp, cnt_t n) { cnt = sp->s_cnt;
sp->s_cnt = n;
while (cnt++ < 0)
- chSchReadyI(fifo_remove(&sp->s_queue))->p_rdymsg = RDY_RESET;
+ chSchReadyI(lifo_remove(&sp->s_queue))->p_rdymsg = RDY_RESET;
}
/**
@@ -101,7 +101,7 @@ msg_t chSemWait(Semaphore *sp) { msg_t chSemWaitS(Semaphore *sp) {
if (--sp->s_cnt < 0) {
- fifo_insert(currp, &sp->s_queue);
+ queue_insert(currp, &sp->s_queue);
currp->p_wtsemp = sp;
chSchGoSleepS(PRWTSEM);
return currp->p_rdymsg;
@@ -140,7 +140,7 @@ msg_t chSemWaitTimeout(Semaphore *sp, systime_t time) { msg_t chSemWaitTimeoutS(Semaphore *sp, systime_t time) {
if (--sp->s_cnt < 0) {
- fifo_insert(currp, &sp->s_queue);
+ queue_insert(currp, &sp->s_queue);
currp->p_wtsemp = sp;
return chSchGoSleepTimeoutS(PRWTSEM, time);
}
@@ -201,7 +201,7 @@ msg_t chSemSignalWait(Semaphore *sps, Semaphore *spw) { chSchReadyI(fifo_remove(&sps->s_queue))->p_rdymsg = RDY_OK;
if (--spw->s_cnt < 0) {
- fifo_insert(currp, &spw->s_queue);
+ queue_insert(currp, &spw->s_queue);
currp->p_wtsemp = spw;
chSchGoSleepS(PRWTSEM);
msg = currp->p_rdymsg;
|