From 5406a10f9d583c43abeaa159bfe182f50ac451b3 Mon Sep 17 00:00:00 2001 From: Giacomo Date: Wed, 23 Sep 2020 15:33:42 +0200 Subject: [PATCH] fix thread insertion in ready list when blocked by higher priority thread --- CMSIS/RTOS2/RTX/Source/rtx_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMSIS/RTOS2/RTX/Source/rtx_thread.c b/CMSIS/RTOS2/RTX/Source/rtx_thread.c index 96a1e3196f..e69bf44f1d 100644 --- a/CMSIS/RTOS2/RTX/Source/rtx_thread.c +++ b/CMSIS/RTOS2/RTX/Source/rtx_thread.c @@ -400,7 +400,7 @@ static void osRtxThreadBlock (os_thread_t *thread) { prev = osRtxThreadObject(&osRtxInfo.thread.ready); next = prev->thread_next; - while ((next != NULL) && (next->priority > priority)) { + while ((next != NULL) && (next->priority >= priority)) { prev = next; next = next->thread_next; }