Function nrf_modem::ffi::nrf_modem_os_timedwait
source · #[no_mangle]
pub unsafe extern "C" fn nrf_modem_os_timedwait(
_context: u32,
timeout: *mut i32,
) -> i32
Expand description
Put a thread to sleep for a specific time or until an event occurs.
All waiting threads shall be woken by nrf_modem_event_notify.
Parameters
- context – (in) A unique identifier assigned by the library to identify the context.
- timeout – (inout) Timeout in millisec or -1 for infinite timeout. Contains the timeout value as input and the remainig time to sleep as output.
Return values
- 0 – The thread is woken before the timeout expired.
- -NRF_EAGAIN – The timeout expired.
- -NRF_ESHUTDOWN – Modem is not initialized, or was shut down.