From e150283e1f071673e1d3490cbf85651e5502d421 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 30 Jul 2008 11:01:56 +0000 Subject: Various optimizations to the scheduler. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@378 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/chsem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/chsem.c') 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; -- cgit v1.2.3