Function esp_idf_sys::xPortEnterCriticalTimeout
source ยท pub unsafe extern "C" fn xPortEnterCriticalTimeout(
mux: *mut portMUX_TYPE,
timeout: BaseType_t,
) -> BaseType_t
Expand description
@brief Enter a SMP critical section with a timeout
This function enters an SMP critical section by disabling interrupts then taking a spinlock with a specified timeout.
This function can be called in a nested manner.
@note This function is made non-inline on purpose to reduce code size @param mux Spinlock @param timeout Timeout to wait for spinlock in number of CPU cycles. Use portMUX_NO_TIMEOUT to wait indefinitely Use portMUX_TRY_LOCK to only getting the spinlock a single time @retval pdPASS Critical section entered (spinlock taken) @retval pdFAIL If timed out waiting for spinlock (will not occur if using portMUX_NO_TIMEOUT)