riot_sys::bindgen

Function mutex_lock_internal

Source
pub unsafe extern "C" fn mutex_lock_internal(
    mutex: *mut mutex_t,
    block: bool,
) -> bool
Expand description

@brief Internal function implementing @ref mutex_lock and @ref mutex_trylock

@details Do not call this function, use @ref mutex_lock or @ref mutex_trylock instead

@param[in,out] mutex Mutex object to lock. @param[in] block Whether to block

@pre @p mutex is not NULL @pre Mutex at @p mutex has been initialized @pre Must be called in thread context

@post The mutex @p is locked and held by the calling thread.

@retval true Mutex obtained @retval false Mutex not obtained (only possible if @p block is false)