15#ifndef NRF_MODEM_OS_H__
16#define NRF_MODEM_OS_H__
27#define NRF_MODEM_OS_NO_WAIT 0
29#define NRF_MODEM_OS_FOREVER -1
31#define NRF_MODEM_OS_NUM_SEM_REQUIRED 7
33#define NRF_MODEM_OS_NUM_MUTEX_REQUIRED 1
int nrf_modem_os_mutex_init(void **mutex)
Initialize a mutex.
void nrf_modem_os_busywait(int32_t usec)
Busy wait.
void nrf_modem_os_free(void *mem)
Free a memory buffer in the library heap.
void nrf_modem_os_shm_tx_free(void *mem)
Free a shared memory buffer in the TX area.
void nrf_modem_os_logdump(int level, const char *str, const void *data, size_t len)
Logging procedure for dumping hex representation of object.
void * nrf_modem_os_shm_tx_alloc(size_t bytes)
Allocate a buffer on the TX area of shared memory.
void nrf_modem_os_log(int level, const char *fmt,...)
Generic logging procedure.
void nrf_modem_os_event_notify(uint32_t context)
Notify the application that an event has occurred.
int nrf_modem_os_sem_init(void **sem, unsigned int initial_count, unsigned int limit)
Initialize a semaphore.
bool nrf_modem_os_is_in_isr(void)
Check if executing in interrupt context.
void nrf_modem_os_sem_give(void *sem)
Give a semaphore.
void * nrf_modem_os_alloc(size_t bytes)
Allocate a buffer on the library heap.
unsigned int nrf_modem_os_sem_count_get(void *sem)
Get a semaphore's count.
int nrf_modem_os_mutex_unlock(void *mutex)
Unlock a mutex.
void nrf_modem_os_init(void)
Initialize the glue layer.
void nrf_modem_os_errno_set(int errno_val)
Set errno.
log_level
Definition: nrf_modem_os.h:35
@ NRF_MODEM_LOG_LEVEL_ERR
Definition: nrf_modem_os.h:37
@ NRF_MODEM_LOG_LEVEL_WRN
Definition: nrf_modem_os.h:38
@ NRF_MODEM_LOG_LEVEL_NONE
Definition: nrf_modem_os.h:36
@ NRF_MODEM_LOG_LEVEL_INF
Definition: nrf_modem_os.h:39
@ NRF_MODEM_LOG_LEVEL_DBG
Definition: nrf_modem_os.h:40
void nrf_modem_os_shutdown(void)
Deinitialize the glue layer.
int nrf_modem_os_mutex_lock(void *mutex, int timeout)
Lock a mutex.
int32_t nrf_modem_os_timedwait(uint32_t context, int32_t *timeout)
Put a thread to sleep for a specific time or until an event occurs.
int nrf_modem_os_sleep(uint32_t timeout)
Put a thread to sleep for a specific amount of time.
int nrf_modem_os_sem_take(void *sem, int timeout)
Take a semaphore.