File tree 1 file changed +15
-5
lines changed
1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -2503,16 +2503,26 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery ) /*lint !e971 Unqualified char
2503
2503
2504
2504
pxTCB = prvGetTCBFromHandle ( xTask );
2505
2505
2506
- if ( pxTCB -> ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB )
2506
+ #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE == 1 )
2507
+ if ( pxTCB -> ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB )
2508
+ #endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE == 1 */
2507
2509
{
2508
2510
* ppuxStackBuffer = pxTCB -> pxStack ;
2509
2511
* ppxTaskBuffer = ( StaticTask_t * ) pxTCB ;
2510
2512
xReturn = pdTRUE ;
2511
2513
}
2512
- else
2513
- {
2514
- xReturn = pdFALSE ;
2515
- }
2514
+ #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE == 1 )
2515
+ else if ( pxTCB -> ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_ONLY )
2516
+ {
2517
+ * ppuxStackBuffer = pxTCB -> pxStack ;
2518
+ * ppxTaskBuffer = NULL ;
2519
+ xReturn = pdTRUE ;
2520
+ }
2521
+ else
2522
+ {
2523
+ xReturn = pdFALSE ;
2524
+ }
2525
+ #endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE == 1 */
2516
2526
2517
2527
return xReturn ;
2518
2528
}
You can’t perform that action at this time.
0 commit comments