Merge branch 'master' into gfio
[fio.git] / os / windows / posix / include / sys / shm.h
CommitLineData
35922a21
BC
1#ifndef SYS_SHM_H
2#define SYS_SHM_H
3
4#define IPC_RMID 0x1
5#define IPC_CREAT 0x2
6#define IPC_PRIVATE 0x4
7
8typedef int uid_t;
9typedef int gid_t;
10
11typedef int shmatt_t;
12typedef int key_t;
13
14struct ipc_perm
15{
16 uid_t uid; /* owner's user ID */
17 gid_t gid; /* owner's group ID */
18 uid_t cuid; /* creator's user ID */
19 gid_t cgid; /* creator's group ID */
20 mode_t mode; /* read/write permission */
21};
22
23
24struct shmid_ds
25{
26 struct ipc_perm shm_perm; /* operation permission structure */
27 size_t shm_segsz; /* size of segment in bytes */
28 pid_t shm_lpid; /* process ID of last shared memory operation */
29 pid_t shm_cpid; /* process ID of creator */
30 shmatt_t shm_nattch; /* number of current attaches */
31 time_t shm_atime; /* time of last shmat() */
32 time_t shm_dtime; /* time of last shmdt() */
33 time_t shm_ctime; /* time of last change by shmctl() */
34};
35
36int shmctl(int shmid, int cmd, struct shmid_ds *buf);
37int shmget(key_t key, size_t size, int shmflg);
38void *shmat(int shmid, const void *shmaddr, int shmflg);
39int shmdt(const void *shmaddr);
40
41#endif /* SYS_SHM_H */