We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdd3678 commit 7372519Copy full SHA for 7372519
tasks.c
@@ -2462,8 +2462,9 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
2462
#if ( configUSE_MUTEXES == 1 )
2463
{
2464
/* Only change the priority being used if the task is not
2465
- * currently using an inherited priority. */
2466
- if( pxTCB->uxBasePriority == pxTCB->uxPriority )
+ * currently using an inherited priority or the new priority
+ * is bigger than the inherited priority. */
2467
+ if( ( pxTCB->uxBasePriority == pxTCB->uxPriority ) || ( uxNewPriority > pxTCB->uxPriority ) )
2468
2469
pxTCB->uxPriority = uxNewPriority;
2470
}
0 commit comments