jengelh-datetimespielwiese
Last change
on this file since d600e18 was
d600e18,
checked in by Andreas Steenpass <steenpass@…>, 9 years ago
|
chg: release acquired semaphores before shutdown
(cherry picked from commit 0f27f90c69fc9952c3df5edb6dff0b57fd8ff826)
Signed-off-by: Andreas Steenpass <steenpass@mathematik.uni-kl.de>
Conflicts:
Singular/links/semaphore.c
Singular/misc_ip.cc
|
-
Property mode set to
100644
|
File size:
566 bytes
|
Line | |
---|
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]; |
---|
15 | extern int sem_acquired[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 |
---|
Note: See
TracBrowser
for help on using the repository browser.