git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@653 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2009-01-20 21:53:29 +00:00
parent 2debe88137
commit 52b8dbd75d
1 changed files with 11 additions and 3 deletions

View File

@ -96,12 +96,20 @@ void chSchGoSleepS(tstate_t newstate) {
* Timeout wakeup callback.
*/
static void wakeup(void *p) {
Thread *tp = (Thread *)p;
switch (tp->p_state) {
#ifdef CH_USE_SEMAPHORES
if (((Thread *)p)->p_state == PRWTSEM)
chSemFastSignalI(((Thread *)p)->p_wtsemp);
case PRWTSEM:
chSemFastSignalI(tp->p_wtsemp);
/* Falls into, intentional.*/
#endif
chSchReadyI(p)->p_rdymsg = RDY_TIMEOUT;
case PRWTCOND:
chSchReadyI(dequeue(tp))->p_rdymsg = RDY_TIMEOUT;
break;
default:
chSchReadyI(tp)->p_rdymsg = RDY_TIMEOUT;
}
}
/**