Typedefs | |
typedef ix_cs_s | ix_cs_t |
critical section structure, the pointer to this structure is handle | |
Enumerations | |
enum | ix_cs_e { IX_CS_FAST, IX_CS_RECURSIVE, IX_CS_ERROR } |
type of critical sections More... | |
Functions | |
ix_cs_t * | ix_cs_new (ix_cs_e cs_type) |
int | ix_cs_enter (ix_cs_t *pcs) |
int | ix_cs_tryenter (ix_cs_t *pcs) |
int | ix_cs_leave (ix_cs_t *pcs) |
int | ix_cs_free (ix_cs_t *pcs) |
It is mainly a wrapper of pthreads critical sections.
enum ix_cs_e |
int ix_cs_enter | ( | ix_cs_t * | pcs | ) |
enters the critical section and blocks till it becomes available
pcs | handle to critical section |
int ix_cs_free | ( | ix_cs_t * | pcs | ) |
frees memory of critical section
pcs | handle to critical section |
int ix_cs_leave | ( | ix_cs_t * | pcs | ) |
leave the critical section
pcs | handle to critical section |
constructor, allocate a new critical section
cs_type | type of critical section to construct |
int ix_cs_tryenter | ( | ix_cs_t * | pcs | ) |
tries to enter the critical section, it returns if not available
pcs | handle to critical section |