simpleipc.h
Go to the documentation of this file.
1 #include <semaphore.h>
2 
3 #ifndef _SIMPLEIPC_H
4 #define _SIMPLEIPC_H
5 
6 #ifdef __cplusplus
7 extern "C"
8 {
9 #endif
10 #define SIPC_MAX_SEMAPHORES 256
11 
12 #define USE_SEM_INIT 0
13 
14 extern sem_t *semaphore[SIPC_MAX_SEMAPHORES];
16 
17 int sipc_semaphore_init(int id, int count);
18 int sipc_semaphore_exists(int id);
19 int sipc_semaphore_acquire(int id);
20 int sipc_semaphore_try_acquire(int id);
21 int sipc_semaphore_get_value(int id);
22 int sipc_semaphore_release(int id);
23 
24 int simpleipc_cmd(char *cmd, int id, int v);
25 #ifdef __cplusplus
26 }
27 #endif
28 #endif
int status int void size_t count
Definition: si_signals.h:59
int sipc_semaphore_release(int id)
Definition: semaphore.c:103
int sipc_semaphore_acquire(int id)
Definition: semaphore.c:78
int sipc_semaphore_exists(int id)
Definition: semaphore.c:72
int sipc_semaphore_init(int id, int count)
Definition: semaphore.c:36
int sipc_semaphore_try_acquire(int id)
Definition: semaphore.c:89
int sipc_semaphore_get_value(int id)
Definition: semaphore.c:114
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
int sem_acquired[SIPC_MAX_SEMAPHORES]
Definition: semaphore.c:30
sem_t * semaphore[SIPC_MAX_SEMAPHORES]
Definition: semaphore.c:29
#define SIPC_MAX_SEMAPHORES
Definition: simpleipc.h:10
int simpleipc_cmd(char *cmd, int id, int v)
Definition: semaphore.c:122