Imported Upstream version 1.1.11
[platform/upstream/cdrkit.git] / icedax / semshm.h
1 /*
2  * This file has been modified for the cdrkit suite.
3  *
4  * The behaviour and appearence of the program code below can differ to a major
5  * extent from the version distributed by the original author(s).
6  *
7  * For details, see Changelog file distributed with the cdrkit package. If you
8  * received this file from another source then ask the distributing person for
9  * a log of modifications.
10  *
11  */
12
13 /* @(#)semshm.h 1.3 03/08/29 Copyright 1998,1999 Heiko Eissfeldt */
14 #undef DEBUG_SHM
15 #ifdef DEBUG_SHM
16 extern char *start_of_shm;
17 extern char *end_of_shm;
18 #endif
19
20 #define FREE_SEM        0
21 #define DEF_SEM 1
22
23 #if defined (HAVE_SEMGET) && defined(USE_SEMAPHORES)
24 extern int sem_id;
25 #else
26 #define sem_id 42       /* nearly any other number would do it too */
27 void init_pipes(void);
28 void init_parent(void);
29 void init_child(void);
30 #endif
31
32
33 #ifdef  HAVE_AREAS
34 /* the name of the shared memory mapping for the FIFO under BeOS. */
35 #define AREA_NAME       "shmfifo"
36 #endif
37
38 void free_sem(void);
39 int semrequest(int semid, int semnum);
40 int semrelease(int semid, int semnum, int amount);
41 int flush_buffers(void);
42 void * request_shm_sem(unsigned amount_of_sh_mem, unsigned char **pointer);
43