CAEN Utility  2.0.2
Utilities for CAEN projects
Semaphores related functions

Platform independent functions to manage semaphores. More...

Functions

int32_t c_semaphore_init (c_semaphore_t *s)
 
int32_t c_semaphore_multi_init (c_semaphore_t *s)
 
int32_t c_semaphore_destroy (c_semaphore_t *s)
 
int32_t c_semaphore_wait (c_semaphore_t *s, int32_t ms)
 
int32_t c_semaphore_post (c_semaphore_t *s)
 

Detailed Description

Platform independent functions to manage semaphores.

Function Documentation

◆ c_semaphore_init()

int32_t c_semaphore_init ( c_semaphore_t s)

Initialize semaphore

Parameters
[out]sa pointer to uninitialized c_semaphore_t

Definition at line 181 of file CAENThread.c.

◆ c_semaphore_multi_init()

int32_t c_semaphore_multi_init ( c_semaphore_t s)

Initialize multi semaphore

Parameters
[out]sa pointer to uninitialized c_semaphore_t

Definition at line 198 of file CAENThread.c.

◆ c_semaphore_destroy()

int32_t c_semaphore_destroy ( c_semaphore_t s)

Destroy semaphore

Parameters
[in]sa pointer to initialized c_semaphore_t

Definition at line 215 of file CAENThread.c.

◆ c_semaphore_wait()

int32_t c_semaphore_wait ( c_semaphore_t s,
int32_t  ms 
)

Wait semaphore

Parameters
[in]sa pointer to initialized c_semaphore_t
[in]mstimeout in milliseconds. Set to -1 to disable timeout.

Definition at line 229 of file CAENThread.c.

Here is the call graph for this function:

◆ c_semaphore_post()

int32_t c_semaphore_post ( c_semaphore_t s)

Destroy semaphore

Parameters
[in]sa pointer to initialized c_semaphore_t

Definition at line 274 of file CAENThread.c.