pub unsafe extern "C" fn _sema_wait_ztimer(
    sema: *mut sema_t,
    block: c_int,
    clock: *mut ztimer_clock_t,
    timeout: u32
) -> c_int
Expand description

@brief Wait for a semaphore, blocking or non-blocking.

@details For commit purposes you should probably use sema_wait(), sema_wait_timed_ztimer() and sema_try_wait() instead.

@pre (sema != NULL)

@param[in] sema A semaphore. @param[in] block if true, block until semaphore is available. @param[in] clock ztimer clock @param[in] timeout if blocking, ticks of @p clock until the semaphore times out. 0 waits forever.

@return 0 on success @return -ETIMEDOUT, if the semaphore times out. @return -ECANCELED, if the semaphore was destroyed. @return -EAGAIN, if the semaphore is not posted (only if block = 0)