aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-09-13 09:38:59 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-09-13 09:38:59 +0000
commitc5496788e53c99371c2f4a36c67dcbf556176398 (patch)
treeead285751d4abfec3b6d1d2ce0ee87cf7cb162a1 /os/kernel
parente4400a5c7f5c5790cf94d84db5e8ad4c356773d8 (diff)
downloadChibiOS-c5496788e53c99371c2f4a36c67dcbf556176398.tar.gz
ChibiOS-c5496788e53c99371c2f4a36c67dcbf556176398.tar.bz2
ChibiOS-c5496788e53c99371c2f4a36c67dcbf556176398.zip
Cortex-M3 related improvements.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1161 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel')
-rw-r--r--os/kernel/include/scheduler.h2
-rw-r--r--os/kernel/src/chschd.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/os/kernel/include/scheduler.h b/os/kernel/include/scheduler.h
index 8aa692e58..f3216bb7a 100644
--- a/os/kernel/include/scheduler.h
+++ b/os/kernel/include/scheduler.h
@@ -117,7 +117,7 @@ extern "C" {
* @details This function returns @p TRUE if there is a ready thread with
* higher priority.
*/
-#define chSchMustRescheduleS() (firstprio(&rlist.r_queue) >= currp->p_prio)
+#define chSchMustRescheduleS() (firstprio(&rlist.r_queue) > currp->p_prio)
#endif /* _SCHEDULER_H_ */
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c
index 1f7e27c93..08ecf46a0 100644
--- a/os/kernel/src/chschd.c
+++ b/os/kernel/src/chschd.c
@@ -210,8 +210,7 @@ void chSchDoRescheduleI(void) {
* the ready list then make the higher priority thread running.
*/
void chSchRescheduleS(void) {
- /* First thread in the runnable queue has higher priority than the running
- * thread?.*/
+
if (chSchMustRescheduleS())
chSchDoRescheduleI();
}