5 #define IPC_CREAT 0x2
\r
6 #define IPC_PRIVATE 0x4
\r
11 typedef int shmatt_t;
\r
16 uid_t uid; //owner's user ID
\r
17 gid_t gid; //owner's group ID
\r
18 uid_t cuid; //creator's user ID
\r
19 gid_t cgid; //creator's group ID
\r
20 mode_t mode; //read/write permission
\r
26 struct ipc_perm shm_perm; //operation permission structure
\r
27 size_t shm_segsz; //size of segment in bytes
\r
28 pid_t shm_lpid; //process ID of last shared memory operation
\r
29 pid_t shm_cpid; //process ID of creator
\r
30 shmatt_t shm_nattch; //number of current attaches
\r
31 time_t shm_atime; //time of last shmat()
\r
32 time_t shm_dtime; //time of last shmdt()
\r
33 time_t shm_ctime; //time of last change by shmctl()
\r
36 int shmctl(int shmid, int cmd, struct shmid_ds *buf);
\r
37 int shmget(key_t key, size_t size, int shmflg);
\r
38 void *shmat(int shmid, const void *shmaddr, int shmflg);
\r
39 int shmdt(const void *shmaddr);
\r
41 #endif /* SYS_SHM_H */
\r