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.

@param[in, out] sem The address of the semaphore.

  • initial_count - Initial semaphore count.
  • limit - Maximum semaphore count.

@returns 0 on success, a negative errno otherwise.