File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,16 +184,6 @@ typedef struct xTASK_STATUS
184184 #endif
185185} TaskStatus_t ;
186186
187- #if ( configUSE_TRACE_FACILITY == 1 )
188-
189- /* Callback type used by uxTaskCallForEachTask(). The callback receives one
190- * task handle and state at a time, plus an opaque caller-supplied context
191- * pointer. The callback may call vTaskGetInfo() if it needs a TaskStatus_t. */
192- typedef void (* TaskStatusCallbackFunction_t )( TaskHandle_t xTask ,
193- eTaskState eState ,
194- void * pvCallbackContext );
195- #endif
196-
197187/* Possible return values for eTaskConfirmSleepModeStatus(). */
198188typedef enum
199189{
@@ -2219,7 +2209,9 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION;
22192209 *
22202210 * @return The number of TaskStatus_t snapshots provided to the callback.
22212211 */
2222- UBaseType_t uxTaskCallForEachTask ( TaskStatusCallbackFunction_t pxCallbackFunction ,
2212+ UBaseType_t uxTaskCallForEachTask ( void (* pxCallbackFunction )( TaskHandle_t xTask ,
2213+ eTaskState eState ,
2214+ * pvCallbackContext ),
22232215 void * pvCallbackContext ,
22242216 configRUN_TIME_COUNTER_TYPE * const pulTotalRunTime ) PRIVILEGED_FUNCTION ;
22252217
Original file line number Diff line number Diff line change @@ -4441,19 +4441,26 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery )
44414441
44424442#if ( configUSE_TRACE_FACILITY == 1 )
44434443
4444+ /* Callback type used by uxTaskCallForEachTask(). The callback receives one
4445+ * task handle and state at a time, plus an opaque caller-supplied context
4446+ * pointer. The callback may call vTaskGetInfo() if it needs a TaskStatus_t. */
4447+ typedef void (* TaskStatusCallbackFunction_t )( TaskHandle_t xTask ,
4448+ eTaskState eState ,
4449+ void * pvCallbackContext );
4450+
44444451 STATIC UBaseType_t prvForEachTaskInList ( List_t * pxList ,
44454452 eTaskState eState ,
44464453 TaskStatusCallbackFunction_t pxCallbackFunction ,
44474454 void * pvCallbackContext );
44484455
4449- /* for uxTaskGetSystemState callback: write position into TaskStatusArray */
4456+ /* for uxTaskGetSystemState callback context: current write position into TaskStatusArray */
44504457 typedef struct xTASK_STATUS_ARRAY_WRITER_CONTEXT
44514458 {
44524459 TaskStatus_t * pxTaskStatusArray ;
44534460 UBaseType_t uxIndex ;
44544461 } TaskStatusArrayWriterContext_t ;
44554462
4456- /* callback for uxTaskGetSystemState: write the task status for one task into TaskStatusArray */
4463+ /* callback for uxTaskGetSystemState: write one task's status into TaskStatusArray */
44574464 STATIC void prvTaskStatusArrayWriter ( TaskHandle_t xTask ,
44584465 eTaskState eState ,
44594466 void * pvCallbackContext )
You can’t perform that action at this time.
0 commit comments