libosip  5.3.0
Classes | Functions
oSIP semaphore definitions

Classes

struct  osip_sem
 

Functions

struct osip_semosip_sem_init (unsigned int value)
 
int osip_sem_destroy (struct osip_sem *sem)
 
int osip_sem_post (struct osip_sem *sem)
 
int osip_sem_wait (struct osip_sem *sem)
 
int osip_sem_trywait (struct osip_sem *sem)
 

Detailed Description

Function Documentation

◆ osip_sem_destroy()

int osip_sem_destroy ( struct osip_sem sem)

Destroy a semaphore.

Parameters
semThe semaphore to destroy.

Referenced by osip_fifo_free().

◆ osip_sem_init()

struct osip_sem* osip_sem_init ( unsigned int  value)

Allocate and Initialise a semaphore.

Parameters
valueThe initial value for the semaphore.

Referenced by osip_fifo_init().

◆ osip_sem_post()

int osip_sem_post ( struct osip_sem sem)

Post operation on a semaphore.

Parameters
semThe semaphore to destroy.

Referenced by osip_fifo_add(), and osip_fifo_insert().

◆ osip_sem_trywait()

int osip_sem_trywait ( struct osip_sem sem)

Wait operation on a semaphore. NOTE: if the semaphore is at 0, this call won't block.

Parameters
semThe semaphore to destroy.

Referenced by osip_fifo_tryget().

◆ osip_sem_wait()

int osip_sem_wait ( struct osip_sem sem)

Wait operation on a semaphore. NOTE: this call will block if the semaphore is at 0.

Parameters
semThe semaphore to destroy.

Referenced by osip_fifo_get().