Function nrfxlib_sys::nrf_modem_os_sem_take
source · pub unsafe extern "C" fn nrf_modem_os_sem_take(
sem: *mut c_void,
timeout: c_int
) -> c_int
Expand description
Take a semaphore.
sem
- The semaphore.timeout
- Timeout in milliseconds. *NRF_MODEM_OS_FOREVER
- indicates infinite timeout. *NRF_MODEM_OS_NO_WAIT
- indicates no timeout.
@note @a timeout shall be set to NRF_MODEM_OS_NO_WAIT if called from ISR.
Returns 0 on success. Returns -NRF_EAGAIN If the semaphore could not be taken.