nrf_modem_os_sem_init

Function nrf_modem_os_sem_init 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn nrf_modem_os_sem_init( sem: *mut *mut c_void, initial_count: c_uint, limit: c_uint, ) -> c_int
Expand description

Initialize a semaphore.

The function shall allocate and initialize a semaphore and return its address as an output. If an address of an already allocated semaphore is provided as an input, the allocation part is skipped and the semaphore is only reinitialized.

Parameters:

  • sem – (inout) The address of the semaphore.
  • initial_count – Initial semaphore count.
  • limit – Maximum semaphore count.

Returns

  • 0 on success, a negative errno otherwise.