wangzhengquan
2020-05-25 0ae05b9d9caadd03190ecdaae204529be9cc9c66
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
   Header file for binary_sems.c.
*/
#ifndef BINARY_SEMS_H           /* Prevent accidental double inclusion */
#define BINARY_SEMS_H
 
typedef enum { FALSE, TRUE } Boolean;
 
 
/* Variables controlling operation of functions below */
 
extern Boolean bsUseSemUndo;            /* Use SEM_UNDO during semop()? */
extern Boolean bsRetryOnEintr;          /* Retry if semop() interrupted by
                                           signal handler? */
 
int initSemAvailable(int semId, int semNum);
 
int initSemInUse(int semId, int semNum);
 
int reserveSem(int semId, int semNum);
 
int releaseSem(int semId, int semNum);
 
#endif