|
|
1.1 root 1: /* (-lgl
2: * COHERENT Version 3.0
3: * Copyright (c) 1982, 1990 by Mark Williams Company.
4: * All rights reserved. May not be copied without permission.
5: -lgl) */
6: #ifndef SHM_H
7: #define SHM_H
8: /*
9: ** IPC Shared Memory Facility.
10: */
11:
12: #include <sys/ipc.h>
13: #include <sys/types.h>
14:
15: extern int shmfd; /* file descriptor to access shared memory */
16:
17: /*
18: ** Permission Definitions.
19: */
20: #define SHM_R 0400 /* read permission */
21: #define SHM_W 0200 /* write permission */
22:
23: /*
24: ** ipc_perm Mode Definitions.
25: */
26: #define SHM_CLEAR 01000 /* clear segment on next attach */
27: #define SHM_DEST 02000 /* destroy segment when # attached = 0 */
28:
29: /*
30: ** Message Operations Flags.
31: */
32: #define SHM_RDONLY 010000 /* attach read-only (else read-write) */
33:
34: /*
35: ** There is a shared mem id data structure for each segment in the system.
36: */
37: struct shmid_ds {
38: struct ipc_perm shm_perm; /* operation permission struct */
39: int shm_segsz; /* segment size */
40: unsigned short shm_lpid; /* pid of last shmop */
41: unsigned short shm_cpid; /* pid of creator */
42: unsigned short shm_nattch; /* current # attached */
43: unsigned short shm_cnattch; /* in memory # attached */
44: time_t shm_atime; /* last shmat time */
45: time_t shm_dtime; /* last shmdt time */
46: time_t shm_ctime; /* last change time */
47: };
48:
49: /*
50: ** Ioctl Commands issued to Shared Memory Device Driver (on Coherent).
51: */
52: #define SHMIOC ('H'<<8)
53: #define SHMCTL (SHMIOC+'C')
54: #define SHMGET (SHMIOC+'G')
55: #define SHMAT (SHMIOC+'A')
56: #define SHMDT (SHMIOC+'D')
57:
58: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.