File tree 1 file changed +16
-5
lines changed
1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -2503,16 +2503,27 @@ 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
+
2515
+ #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE == 1 )
2516
+ else if ( pxTCB -> ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_ONLY )
2517
+ {
2518
+ * ppuxStackBuffer = pxTCB -> pxStack ;
2519
+ * ppxTaskBuffer = NULL ;
2520
+ xReturn = pdTRUE ;
2521
+ }
2522
+ else
2523
+ {
2524
+ xReturn = pdFALSE ;
2525
+ }
2526
+ #endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE == 1 */
2516
2527
2517
2528
return xReturn ;
2518
2529
}
You can’t perform that action at this time.
0 commit comments