diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-09-24 17:58:21 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-09-24 17:58:21 +0000 |
commit | 5b3fec0235acc100600054917d9d393db189b5cb (patch) | |
tree | 01ffd6a1ca66abbe98aa7bac415c68d8142c1b7a /os/kernel/src/chschd.c | |
parent | 719e83e6e85e24242a95e9a4d48845fd5400dc5b (diff) | |
download | ChibiOS-5b3fec0235acc100600054917d9d393db189b5cb.tar.gz ChibiOS-5b3fec0235acc100600054917d9d393db189b5cb.tar.bz2 ChibiOS-5b3fec0235acc100600054917d9d393db189b5cb.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2187 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chschd.c')
-rw-r--r-- | os/kernel/src/chschd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c index f12103324..ff10dbe2d 100644 --- a/os/kernel/src/chschd.c +++ b/os/kernel/src/chschd.c @@ -131,6 +131,10 @@ static void wakeup(void *p) { #if CH_USE_SEMAPHORES || (CH_USE_CONDVARS && CH_USE_CONDVARS_TIMEOUT)
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
case THD_STATE_WTSEM:
chSemFastSignalI((Semaphore *)tp->p_u.wtobjp);
@@ -143,12 +147,8 @@ static void wakeup(void *p) { dequeue(tp);
}
#endif
- /* Handling the special case where the thread has been made ready by another
- thread with higher priority.*/
- if (tp->p_state != THD_STATE_READY) {
- tp->p_u.rdymsg = RDY_TIMEOUT;
- chSchReadyI(tp);
- }
+ tp->p_u.rdymsg = RDY_TIMEOUT;
+ chSchReadyI(tp);
}
/**
|