Function esp_idf_hal::sys::uxTaskGetStackHighWaterMark
source ยท pub unsafe extern "C" fn uxTaskGetStackHighWaterMark(
xTask: *mut tskTaskControlBlock,
) -> u32
Expand description
@cond !DOC_EXCLUDE_HEADER_SECTION task.h @code{c} UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ); @endcode @endcond
Returns the high water mark of the stack associated with xTask.
INCLUDE_uxTaskGetStackHighWaterMark must be set to 1 in FreeRTOSConfig.h for this function to be available.
Returns the high water mark of the stack associated with xTask. That is, the minimum free stack space there has been (in bytes not words, unlike vanilla FreeRTOS) since the task started. The smaller the returned number the closer the task has come to overflowing its stack.
uxTaskGetStackHighWaterMark() and uxTaskGetStackHighWaterMark2() are the same except for their return type. Using configSTACK_DEPTH_TYPE allows the user to determine the return type. It gets around the problem of the value overflowing on 8-bit types without breaking backward compatibility for applications that expect an 8-bit return type.
@param xTask Handle of the task associated with the stack to be checked. Set xTask to NULL to check the stack of the calling task.
@return The smallest amount of free stack space there has been (in bytes not words, unlike vanilla FreeRTOS) since the task referenced by xTask was created.