Typedefs | |
typedef ix_sem_s | ix_sem_t |
Enumerations | |
enum | ix_sem_e { IX_SEM_LOCAL = 0x01, IX_SEM_GLOBAL = 0x02, IX_SEM_FD = 0x03 } |
Functions | |
ix_sem_t * | ix_sem_new (int id, ix_sem_e mode) |
int | ix_sem_v (ix_sem_t *psem) |
int | ix_sem_p (ix_sem_t *psem) |
int | ix_sem_free (ix_sem_t *psem) |
typedef struct ix_sem_s ix_sem_t |
semaphore class
enum ix_sem_e |
int ix_sem_free | ( | ix_sem_t * | psem | ) |
free memory and locks
Creates new semaphore with file-locking fcntl-call.
id | unique id | |
mode | global or local semaphore. IX_SEM_GLOBAL: lockfile is opened in ix_global_path()/sem (otherwise ix_path()/sem) |
int ix_sem_p | ( | ix_sem_t * | psem | ) |
Enter semaphore: paseer = betreten, enter critical section
int ix_sem_v | ( | ix_sem_t * | psem | ) |
Leave semaphore: verlaat = verlassen, leave critical section