nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ nrf_modem_os_sem_take()

int nrf_modem_os_sem_take ( void * sem,
int timeout )

#include <nrf_modem/include/nrf_modem_os.h>

Take a semaphore.

Parameters
semThe semaphore.
timeoutTimeout in milliseconds. NRF_MODEM_OS_FOREVER indicates infinite timeout. NRF_MODEM_OS_NO_WAIT indicates no timeout.
Note
timeout must be set to NRF_MODEM_OS_NO_WAIT if called from ISR.
Return values
0on success.
-NRF_EAGAINIf the semaphore could not be taken.