Function csem_init

Function Documentation

struct csem *csem_init(struct csem *sem_in, size_t value, uint32_t flags)

Initialize a counting semaphore.

Parameters:
  • sem_in – Semaphore to initialize. Can be NULL if RCSW_NOALLOC_HANDLE passed.

  • value – The initial semaphore value.

  • flags – Configuration flags. See csem::flags for valid flags.

Returns:

The initialization counting semaphore, or NULL if an ERROR occurred.