mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 17:17:44 -04:00
Add assert to catch invalid task priority
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
4ad84923a0
commit
a235f3d3a9
1 changed files with 2 additions and 2 deletions
4
tasks.c
4
tasks.c
|
@ -913,8 +913,8 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|||
pxNewTCB->pcTaskName[ 0 ] = 0x00;
|
||||
}
|
||||
|
||||
/* This is used as an array index so must ensure it's not too large. First
|
||||
* remove the privilege bit if one is present. */
|
||||
/* This is used as an array index so must ensure it's not too large. */
|
||||
configASSERT( ( uxPriority < configMAX_PRIORITIES ) );
|
||||
if( uxPriority >= ( UBaseType_t ) configMAX_PRIORITIES )
|
||||
{
|
||||
uxPriority = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) 1U;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue