StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
shmLib.h
1 #ifndef SHMLIB_HH
2 #define SHMLIB_HH
3 
4 /*****************************************************************
5  * To use:
6  * 1. Mother of all tasks createShmSegment() for each segment
7  *
8  * 2. Each tasks calls getShmPtr() to attach
9  *
10  * 3. After a task has called getShmPtr() for a segment it
11  * may call getShmAttributes()
12  *****************************************************************/
13 #define SHM_KEY_BASE 0xfd000000
14 #define MAX_SEGMENTS 10
15 
17 {
18  int key;
19  int segment;
20  unsigned int size;
21  int shmid;
22  char *ptr;
23 };
24 
25 int createShmSegment(int seg, unsigned int size);
26 char *getShmPtr(int seg, unsigned int offset);
27 ShmAttributes *getShmAttributes(int seg);
28 
29 #endif