From 1dbc77697f4c63e1b18a2c7f7a15aad4ae14af7e Mon Sep 17 00:00:00 2001 From: Kody Stribrny <89810515+kstribrnAmzn@users.noreply.github.com> Date: Wed, 31 Dec 2025 10:07:49 -0800 Subject: [PATCH] [Fix] Reset correct priority on disinherit timeout (#1338) This commit corrects vTaskPriorityDisinheritAfterTimeout to reset the previously inherited priority when the task disiheriting timeout was the only task at that priority. Without this change the ready list for the inherited priority will remain set when no task is ready at that priority. This can have consequences later as the ready priority flags are assumed to be accurate. Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> --- tasks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks.c b/tasks.c index 6a523984b..9d6bf84b7 100644 --- a/tasks.c +++ b/tasks.c @@ -6916,7 +6916,7 @@ static void prvResetNextTaskUnblockTime( void ) /* It is known that the task is in its ready list so * there is no need to check again and the port level * reset macro can be called directly. */ - portRESET_READY_PRIORITY( pxTCB->uxPriority, uxTopReadyPriority ); + portRESET_READY_PRIORITY( uxPriorityUsedOnEntry, uxTopReadyPriority ); } else {