git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@227 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
9d69c31143
commit
d76f6bff4f
|
@ -174,8 +174,13 @@ void chSemSignal(Semaphore *sp) {
|
||||||
*/
|
*/
|
||||||
void chSemSignalI(Semaphore *sp) {
|
void chSemSignalI(Semaphore *sp) {
|
||||||
|
|
||||||
if (sp->s_cnt++ < 0)
|
if (sp->s_cnt++ < 0) {
|
||||||
chSchReadyI(fifo_remove(&sp->s_queue))->p_rdymsg = RDY_OK;
|
/* NOTE: It is done this way in order to allow a tail call on
|
||||||
|
chSchReadyI().*/
|
||||||
|
Thread *tp = fifo_remove(&sp->s_queue);
|
||||||
|
tp->p_rdymsg = RDY_OK;
|
||||||
|
chSchReadyI(tp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CH_USE_SEMSW
|
#ifdef CH_USE_SEMSW
|
||||||
|
|
Loading…
Reference in New Issue