Fixed bug 3074984.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_2.0.x@2192 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2010-09-25 05:57:11 +00:00
parent d6cc0c5ccd
commit 04ea59b72a
2 changed files with 8 additions and 3 deletions

View File

@ -121,8 +121,12 @@ void chSchGoSleepS(tstate_t newstate) {
static void wakeup(void *p) { static void wakeup(void *p) {
Thread *tp = (Thread *)p; Thread *tp = (Thread *)p;
#if CH_USE_SEMAPHORES || (CH_USE_CONDVARS && CH_USE_CONDVARS_TIMEOUT)
switch (tp->p_state) { switch (tp->p_state) {
case THD_STATE_READY:
/* Handling the special case where the thread has been made ready by
another thread with higher priority.*/
return;
#if CH_USE_SEMAPHORES || (CH_USE_CONDVARS && CH_USE_CONDVARS_TIMEOUT)
#if CH_USE_SEMAPHORES #if CH_USE_SEMAPHORES
case THD_STATE_WTSEM: case THD_STATE_WTSEM:
chSemFastSignalI((Semaphore *)tp->p_u.wtobjp); chSemFastSignalI((Semaphore *)tp->p_u.wtobjp);
@ -133,9 +137,8 @@ static void wakeup(void *p) {
#endif #endif
/* States requiring dequeuing.*/ /* States requiring dequeuing.*/
dequeue(tp); dequeue(tp);
}
#endif #endif
/* Done this way in order to allow a tail call.*/ }
tp->p_u.rdymsg = RDY_TIMEOUT; tp->p_u.rdymsg = RDY_TIMEOUT;
chSchReadyI(tp); chSchReadyI(tp);
} }

View File

@ -59,6 +59,8 @@
***************************************************************************** *****************************************************************************
*** 2.0.5 *** *** 2.0.5 ***
- FIX: Fixed race condition in function chSchGoSleepTimeoutS, thanks Balázs
(bug 3074984).
- FIX: Fixed race condition in threads creation (bug 3069854). - FIX: Fixed race condition in threads creation (bug 3069854).
- FIX: Fixed broken CH_DBG_ENABLE_STACK_CHECK option in legacy CM3 port (bug - FIX: Fixed broken CH_DBG_ENABLE_STACK_CHECK option in legacy CM3 port (bug
3064274). 3064274).