Function esp_idf_svc::hal::sys::uxTaskGetStackHighWaterMark2
source ยท pub unsafe extern "C" fn uxTaskGetStackHighWaterMark2(
xTask: *mut tskTaskControlBlock,
) -> u32
Expand description
INCLUDE_uxTaskGetStackHighWaterMark2 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 words, so on a 32 bit machine a value of 1 means 4 bytes) 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 words, so actual spaces on the stack rather than bytes) since the task referenced by xTask was created.