nrfxlib API 0.1.0
|
int32_t nrf_modem_os_timedwait | ( | uint32_t | context, |
int32_t * | timeout | ||
) |
#include <nrf_modem/include/nrf_modem_os.h>
Put a thread to sleep for a specific time or until an event occurs.
The thread is woken if the timeout has expired and by a nrf_modem_event_notify
call if
context
equals the event context.context
is zero (thread wakes on all calls to event notify).The timeout
parameter is updated to contain the amount of time left to sleep.
context | Library context. | |
[in,out] | timeout | Timeout in milliseconds, or NRF_MODEM_OS_FOREVER for no timeout. Specifies the timeout value on input and the remaining time to sleep on output. |
0 | The thread is woken before the timeout expired. |
-NRF_EAGAIN | The timeout expired. |
-NRF_ESHUTDOWN | Modem is not initialized, or was shut down. |