mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-09 07:37:25 +00:00
change(freertos/debug): Add API to get current TCB
This commit adds `pvTaskGetCurrentTCBForCore()` to get a void pointer to the current TCB of a particular core. This removes the need to `extern `pxCurrentTCB` in esp_gdbstub.
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#endif
|
||||
/* *INDENT-ON* */
|
||||
|
||||
/* -------------------------------------------------- Task Snapshot ------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Task Snapshot structure
|
||||
*
|
||||
@@ -78,6 +80,18 @@ UBaseType_t uxTaskGetSnapshotAll( TaskSnapshot_t * const pxTaskSnapshotArray,
|
||||
const UBaseType_t uxArrayLength,
|
||||
UBaseType_t * const pxTCBSize );
|
||||
|
||||
/* ----------------------------------------------------- Misc ----------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Get a void pointer to the current TCB of a particular core
|
||||
*
|
||||
* @note This function provides no guarantee that the return TCB will still be the current task (or that the task still
|
||||
* exists) when it returns. It is the caller's responsibility to ensure that the task does not get scheduled or deleted.
|
||||
* @param xCoreID The core to query
|
||||
* @return Void pointer to current TCB
|
||||
*/
|
||||
void * pvTaskGetCurrentTCBForCore( BaseType_t xCoreID );
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user