source: git/Singular/links/simpleipc.h @ d600e18

spielwiese
Last change on this file since d600e18 was d600e18, checked in by Andreas Steenpass <steenpass@…>, 10 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
7extern "C"
8{
9#endif
10#define SIPC_MAX_SEMAPHORES 256
11
12#define USE_SEM_INIT 0
13
14extern sem_t *semaphore[SIPC_MAX_SEMAPHORES];
15extern int sem_acquired[SIPC_MAX_SEMAPHORES];
16
17int sipc_semaphore_init(int id, int count);
18int sipc_semaphore_exists(int id);
19int sipc_semaphore_acquire(int id);
20int sipc_semaphore_try_acquire(int id);
21int sipc_semaphore_get_value(int id);
22int sipc_semaphore_release(int id);
23
24int 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.