aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-03-11 14:32:04 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-03-11 14:32:04 +0000
commit88c256ae5265f5d6a7ffa25dc17f693e036256bf (patch)
treef4f3922147a0c0cb8d1e22ac5c5f1e687b482ed8 /src
parent0697998b65202c89d22b15faeeb20cc3b502bb90 (diff)
downloadChibiOS-88c256ae5265f5d6a7ffa25dc17f693e036256bf.tar.gz
ChibiOS-88c256ae5265f5d6a7ffa25dc17f693e036256bf.tar.bz2
ChibiOS-88c256ae5265f5d6a7ffa25dc17f693e036256bf.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@222 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src')
-rw-r--r--src/chschd.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/chschd.c b/src/chschd.c
index 7a14df518..b7f52c96d 100644
--- a/src/chschd.c
+++ b/src/chschd.c
@@ -93,8 +93,10 @@ void chSchGoSleepS(tstate_t newstate) {
#ifdef CH_USE_VIRTUAL_TIMERS
static void wakeup(void *p) {
+#ifdef CH_USE_SEMAPHORES
if (((Thread *)p)->p_state == PRWTSEM)
chSemFastSignalI(((Thread *)p)->p_wtsemp);
+#endif
chSchReadyI(p, RDY_TIMEOUT);
}
@@ -170,10 +172,8 @@ void chSchDoRescheduleI(void) {
*/
void chSchRescheduleS(void) {
- if (isempty(&rlist.r_queue) || firstprio(&rlist.r_queue) <= currp->p_prio)
- return;
-
- chSchDoRescheduleI();
+ if (firstprio(&rlist.r_queue) > currp->p_prio)
+ chSchDoRescheduleI();
}
/**
@@ -183,9 +183,6 @@ void chSchRescheduleS(void) {
*/
bool_t chSchRescRequiredI(void) {
- if (isempty(&rlist.r_queue))
- return FALSE;
-
if (rlist.r_preempt) {
if (firstprio(&rlist.r_queue) <= currp->p_prio)
return FALSE;