aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-09-24 17:31:31 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-09-24 17:31:31 +0000
commit719e83e6e85e24242a95e9a4d48845fd5400dc5b (patch)
tree9c195d58df2c802226daaf9059739110feb03be4 /os/kernel/src
parent759cb521269b63afd3f0f3f8229de11b54216694 (diff)
downloadChibiOS-719e83e6e85e24242a95e9a4d48845fd5400dc5b.tar.gz
ChibiOS-719e83e6e85e24242a95e9a4d48845fd5400dc5b.tar.bz2
ChibiOS-719e83e6e85e24242a95e9a4d48845fd5400dc5b.zip
Fixed bug 3074984, undone change to the virtual timers.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2186 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src')
-rw-r--r--os/kernel/src/chschd.c9
-rw-r--r--os/kernel/src/chvt.c1
2 files changed, 7 insertions, 3 deletions
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c
index c7db9ad60..f12103324 100644
--- a/os/kernel/src/chschd.c
+++ b/os/kernel/src/chschd.c
@@ -143,9 +143,12 @@ static void wakeup(void *p) {
dequeue(tp);
}
#endif
- /* Done this way in order to allow a tail call.*/
- tp->p_u.rdymsg = RDY_TIMEOUT;
- chSchReadyI(tp);
+ /* 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);
+ }
}
/**
diff --git a/os/kernel/src/chvt.c b/os/kernel/src/chvt.c
index 070a9c620..b622bb493 100644
--- a/os/kernel/src/chvt.c
+++ b/os/kernel/src/chvt.c
@@ -42,6 +42,7 @@ VTList vtlist;
void vt_init(void) {
vtlist.vt_next = vtlist.vt_prev = (void *)&vtlist;
+ vtlist.vt_time = (systime_t)-1;
vtlist.vt_systime = 0;
}