riot_sys::bindgen

Function mutex_lock_cancelable

Source
pub unsafe extern "C" fn mutex_lock_cancelable(
    mc: *mut mutex_cancel_t,
) -> c_int
Expand description

@brief Locks a mutex, blocking. This function can be canceled.

@param[in,out] mc Mutex cancellation structure to work on

@retval 0 The mutex was locked by the caller @retval -ECANCELED The mutex was NOT locked, operation was canceled. See @ref mutex_cancel

@note This function is considered internal. Out of tree users should be aware that breaking API changes or removal of this API without an deprecation period might happen.

@pre Must be called in thread context @pre @p mc has been initialized with @ref mutex_cancel_init by the calling thread. @pre @p mc has NOT been used for previous calls to this function. (Reinitialize before reusing!)

@post The mutex referred to by @p mc is locked and held by the calling thread, unless -ECANCELED was returned.