From b6fe2843312b51cf79cdf549820024f743872aba Mon Sep 17 00:00:00 2001
From: Oleg Hahm <oleg@hobbykeller.org>
Date: Mon, 12 Aug 2013 19:27:04 +0200
Subject: [PATCH] fix priority comparison in sched_switch

---
 core/sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/sched.c b/core/sched.c
index eb09a629a1..d1927f19e6 100644
--- a/core/sched.c
+++ b/core/sched.c
@@ -187,7 +187,7 @@ void sched_switch(uint16_t current_prio, uint16_t other_prio, int in_isr)
 {
     DEBUG("%s: %i %i %i\n", active_thread->name, (int)current_prio, (int)other_prio, in_isr);
 
-    if (current_prio <= other_prio) {
+    if (current_prio >= other_prio) {
         if (in_isr) {
             sched_context_switch_request = 1;
         }
-- 
GitLab