mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Use the bigger priority whenever possible. (#760)
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
This commit is contained in:
parent
cdd3678c29
commit
7372519cba
5
tasks.c
5
tasks.c
|
@ -2462,8 +2462,9 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|||
#if ( configUSE_MUTEXES == 1 )
|
||||
{
|
||||
/* Only change the priority being used if the task is not
|
||||
* currently using an inherited priority. */
|
||||
if( pxTCB->uxBasePriority == pxTCB->uxPriority )
|
||||
* currently using an inherited priority or the new priority
|
||||
* is bigger than the inherited priority. */
|
||||
if( ( pxTCB->uxBasePriority == pxTCB->uxPriority ) || ( uxNewPriority > pxTCB->uxPriority ) )
|
||||
{
|
||||
pxTCB->uxPriority = uxNewPriority;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue