@@ -2203,6 +2203,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
2203
2203
/* If null is passed in here then it is the calling task that is
2204
2204
* being deleted. */
2205
2205
pxTCB = prvGetTCBFromHandle ( xTaskToDelete );
2206
+ configASSERT ( pxTCB != NULL );
2206
2207
2207
2208
/* Remove task from the ready/delayed list. */
2208
2209
if ( uxListRemove ( & ( pxTCB -> xStateListItem ) ) == ( UBaseType_t ) 0 )
@@ -2495,7 +2496,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
2495
2496
2496
2497
traceENTER_eTaskGetState ( xTask );
2497
2498
2498
- configASSERT ( pxTCB );
2499
+ configASSERT ( pxTCB != NULL );
2499
2500
2500
2501
#if ( configNUMBER_OF_CORES == 1 )
2501
2502
if ( pxTCB == pxCurrentTCB )
@@ -2628,6 +2629,8 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
2628
2629
/* If null is passed in here then it is the priority of the task
2629
2630
* that called uxTaskPriorityGet() that is being queried. */
2630
2631
pxTCB = prvGetTCBFromHandle ( xTask );
2632
+ configASSERT ( pxTCB != NULL );
2633
+
2631
2634
uxReturn = pxTCB -> uxPriority ;
2632
2635
}
2633
2636
portBASE_TYPE_EXIT_CRITICAL ();
@@ -2676,6 +2679,8 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
2676
2679
/* If null is passed in here then it is the priority of the calling
2677
2680
* task that is being queried. */
2678
2681
pxTCB = prvGetTCBFromHandle ( xTask );
2682
+ configASSERT ( pxTCB != NULL );
2683
+
2679
2684
uxReturn = pxTCB -> uxPriority ;
2680
2685
}
2681
2686
taskEXIT_CRITICAL_FROM_ISR ( uxSavedInterruptStatus );
@@ -2702,6 +2707,8 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
2702
2707
/* If null is passed in here then it is the base priority of the task
2703
2708
* that called uxTaskBasePriorityGet() that is being queried. */
2704
2709
pxTCB = prvGetTCBFromHandle ( xTask );
2710
+ configASSERT ( pxTCB != NULL );
2711
+
2705
2712
uxReturn = pxTCB -> uxBasePriority ;
2706
2713
}
2707
2714
portBASE_TYPE_EXIT_CRITICAL ();
@@ -2750,6 +2757,8 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
2750
2757
/* If null is passed in here then it is the base priority of the calling
2751
2758
* task that is being queried. */
2752
2759
pxTCB = prvGetTCBFromHandle ( xTask );
2760
+ configASSERT ( pxTCB != NULL );
2761
+
2753
2762
uxReturn = pxTCB -> uxBasePriority ;
2754
2763
}
2755
2764
taskEXIT_CRITICAL_FROM_ISR ( uxSavedInterruptStatus );
@@ -2794,6 +2803,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
2794
2803
/* If null is passed in here then it is the priority of the calling
2795
2804
* task that is being changed. */
2796
2805
pxTCB = prvGetTCBFromHandle ( xTask );
2806
+ configASSERT ( pxTCB != NULL );
2797
2807
2798
2808
traceTASK_PRIORITY_SET ( pxTCB , uxNewPriority );
2799
2809
@@ -2988,6 +2998,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
2988
2998
taskENTER_CRITICAL ();
2989
2999
{
2990
3000
pxTCB = prvGetTCBFromHandle ( xTask );
3001
+ configASSERT ( pxTCB != NULL );
2991
3002
2992
3003
pxTCB -> uxCoreAffinityMask = uxCoreAffinityMask ;
2993
3004
@@ -3043,6 +3054,8 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
3043
3054
portBASE_TYPE_ENTER_CRITICAL ();
3044
3055
{
3045
3056
pxTCB = prvGetTCBFromHandle ( xTask );
3057
+ configASSERT ( pxTCB != NULL );
3058
+
3046
3059
uxCoreAffinityMask = pxTCB -> uxCoreAffinityMask ;
3047
3060
}
3048
3061
portBASE_TYPE_EXIT_CRITICAL ();
@@ -3066,6 +3079,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
3066
3079
taskENTER_CRITICAL ();
3067
3080
{
3068
3081
pxTCB = prvGetTCBFromHandle ( xTask );
3082
+ configASSERT ( pxTCB != NULL );
3069
3083
3070
3084
pxTCB -> xPreemptionDisable = pdTRUE ;
3071
3085
}
@@ -3089,6 +3103,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
3089
3103
taskENTER_CRITICAL ();
3090
3104
{
3091
3105
pxTCB = prvGetTCBFromHandle ( xTask );
3106
+ configASSERT ( pxTCB != NULL );
3092
3107
3093
3108
pxTCB -> xPreemptionDisable = pdFALSE ;
3094
3109
@@ -3122,6 +3137,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
3122
3137
/* If null is passed in here then it is the running task that is
3123
3138
* being suspended. */
3124
3139
pxTCB = prvGetTCBFromHandle ( xTaskToSuspend );
3140
+ configASSERT ( pxTCB != NULL );
3125
3141
3126
3142
traceTASK_SUSPEND ( pxTCB );
3127
3143
@@ -4194,7 +4210,7 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery )
4194
4210
/* If null is passed in here then the name of the calling task is being
4195
4211
* queried. */
4196
4212
pxTCB = prvGetTCBFromHandle ( xTaskToQuery );
4197
- configASSERT ( pxTCB );
4213
+ configASSERT ( pxTCB != NULL );
4198
4214
4199
4215
traceRETURN_pcTaskGetName ( & ( pxTCB -> pcTaskName [ 0 ] ) );
4200
4216
@@ -4357,6 +4373,7 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery )
4357
4373
configASSERT ( ppxTaskBuffer != NULL );
4358
4374
4359
4375
pxTCB = prvGetTCBFromHandle ( xTask );
4376
+ configASSERT ( pxTCB != NULL );
4360
4377
4361
4378
#if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE == 1 )
4362
4379
{
@@ -4596,7 +4613,7 @@ BaseType_t xTaskCatchUpTicks( TickType_t xTicksToCatchUp )
4596
4613
4597
4614
traceENTER_xTaskAbortDelay ( xTask );
4598
4615
4599
- configASSERT ( pxTCB );
4616
+ configASSERT ( pxTCB != NULL );
4600
4617
4601
4618
vTaskSuspendAll ();
4602
4619
{
@@ -4978,6 +4995,7 @@ BaseType_t xTaskIncrementTick( void )
4978
4995
4979
4996
/* If xTask is NULL then set the calling task's hook. */
4980
4997
pxTCB = prvGetTCBFromHandle ( xTask );
4998
+ configASSERT ( pxTCB != NULL );
4981
4999
4982
5000
/* Save the hook function in the TCB. A critical section is required as
4983
5001
* the value can be accessed from an interrupt. */
@@ -5007,6 +5025,7 @@ BaseType_t xTaskIncrementTick( void )
5007
5025
5008
5026
/* If xTask is NULL then set the calling task's hook. */
5009
5027
pxTCB = prvGetTCBFromHandle ( xTask );
5028
+ configASSERT ( pxTCB != NULL );
5010
5029
5011
5030
/* Save the hook function in the TCB. A critical section is required as
5012
5031
* the value can be accessed from an interrupt. */
@@ -5984,6 +6003,8 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters )
5984
6003
( xIndex < ( BaseType_t ) configNUM_THREAD_LOCAL_STORAGE_POINTERS ) )
5985
6004
{
5986
6005
pxTCB = prvGetTCBFromHandle ( xTaskToQuery );
6006
+ configASSERT ( pxTCB != NULL );
6007
+
5987
6008
pvReturn = pxTCB -> pvThreadLocalStoragePointers [ xIndex ];
5988
6009
}
5989
6010
else
@@ -6011,6 +6032,7 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters )
6011
6032
/* If null is passed in here then we are modifying the MPU settings of
6012
6033
* the calling task. */
6013
6034
pxTCB = prvGetTCBFromHandle ( xTaskToModify );
6035
+ configASSERT ( pxTCB != NULL );
6014
6036
6015
6037
vPortStoreTaskMPUSettings ( & ( pxTCB -> xMPUSettings ), pxRegions , NULL , 0 );
6016
6038
@@ -6141,6 +6163,7 @@ static void prvCheckTasksWaitingTermination( void )
6141
6163
6142
6164
/* xTask is NULL then get the state of the calling task. */
6143
6165
pxTCB = prvGetTCBFromHandle ( xTask );
6166
+ configASSERT ( pxTCB != NULL );
6144
6167
6145
6168
pxTaskStatus -> xHandle = pxTCB ;
6146
6169
pxTaskStatus -> pcTaskName = ( const char * ) & ( pxTCB -> pcTaskName [ 0 ] );
@@ -6357,6 +6380,7 @@ static void prvCheckTasksWaitingTermination( void )
6357
6380
* type. */
6358
6381
6359
6382
pxTCB = prvGetTCBFromHandle ( xTask );
6383
+ configASSERT ( pxTCB != NULL );
6360
6384
6361
6385
#if portSTACK_GROWTH < 0
6362
6386
{
@@ -6389,6 +6413,7 @@ static void prvCheckTasksWaitingTermination( void )
6389
6413
traceENTER_uxTaskGetStackHighWaterMark ( xTask );
6390
6414
6391
6415
pxTCB = prvGetTCBFromHandle ( xTask );
6416
+ configASSERT ( pxTCB != NULL );
6392
6417
6393
6418
#if portSTACK_GROWTH < 0
6394
6419
{
@@ -8288,6 +8313,7 @@ TickType_t uxTaskResetEventItemValue( void )
8288
8313
/* If null is passed in here then it is the calling task that is having
8289
8314
* its notification state cleared. */
8290
8315
pxTCB = prvGetTCBFromHandle ( xTask );
8316
+ configASSERT ( pxTCB != NULL );
8291
8317
8292
8318
taskENTER_CRITICAL ();
8293
8319
{
@@ -8327,6 +8353,7 @@ TickType_t uxTaskResetEventItemValue( void )
8327
8353
/* If null is passed in here then it is the calling task that is having
8328
8354
* its notification state cleared. */
8329
8355
pxTCB = prvGetTCBFromHandle ( xTask );
8356
+ configASSERT ( pxTCB != NULL );
8330
8357
8331
8358
taskENTER_CRITICAL ();
8332
8359
{
@@ -8354,6 +8381,7 @@ TickType_t uxTaskResetEventItemValue( void )
8354
8381
traceENTER_ulTaskGetRunTimeCounter ( xTask );
8355
8382
8356
8383
pxTCB = prvGetTCBFromHandle ( xTask );
8384
+ configASSERT ( pxTCB != NULL );
8357
8385
8358
8386
traceRETURN_ulTaskGetRunTimeCounter ( pxTCB -> ulRunTimeCounter );
8359
8387
@@ -8381,6 +8409,8 @@ TickType_t uxTaskResetEventItemValue( void )
8381
8409
if ( ulTotalTime > ( configRUN_TIME_COUNTER_TYPE ) 0 )
8382
8410
{
8383
8411
pxTCB = prvGetTCBFromHandle ( xTask );
8412
+ configASSERT ( pxTCB != NULL );
8413
+
8384
8414
ulReturn = pxTCB -> ulRunTimeCounter / ulTotalTime ;
8385
8415
}
8386
8416
else
@@ -8584,6 +8614,7 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait,
8584
8614
traceENTER_xTaskGetMPUSettings ( xTask );
8585
8615
8586
8616
pxTCB = prvGetTCBFromHandle ( xTask );
8617
+ configASSERT ( pxTCB != NULL );
8587
8618
8588
8619
traceRETURN_xTaskGetMPUSettings ( & ( pxTCB -> xMPUSettings ) );
8589
8620
0 commit comments