Root/
1 | #ifndef _LINUX_IPC_H |
2 | #define _LINUX_IPC_H |
3 | |
4 | #include <linux/types.h> |
5 | |
6 | #define IPC_PRIVATE ((__kernel_key_t) 0) |
7 | |
8 | /* Obsolete, used only for backwards compatibility and libc5 compiles */ |
9 | struct ipc_perm |
10 | { |
11 | __kernel_key_t key; |
12 | __kernel_uid_t uid; |
13 | __kernel_gid_t gid; |
14 | __kernel_uid_t cuid; |
15 | __kernel_gid_t cgid; |
16 | __kernel_mode_t mode; |
17 | unsigned short seq; |
18 | }; |
19 | |
20 | /* Include the definition of ipc64_perm */ |
21 | #include <asm/ipcbuf.h> |
22 | |
23 | /* resource get request flags */ |
24 | #define IPC_CREAT 00001000 /* create if key is nonexistent */ |
25 | #define IPC_EXCL 00002000 /* fail if key exists */ |
26 | #define IPC_NOWAIT 00004000 /* return error on wait */ |
27 | |
28 | /* these fields are used by the DIPC package so the kernel as standard |
29 | should avoid using them if possible */ |
30 | |
31 | #define IPC_DIPC 00010000 /* make it distributed */ |
32 | #define IPC_OWN 00020000 /* this machine is the DIPC owner */ |
33 | |
34 | /* |
35 | * Control commands used with semctl, msgctl and shmctl |
36 | * see also specific commands in sem.h, msg.h and shm.h |
37 | */ |
38 | #define IPC_RMID 0 /* remove resource */ |
39 | #define IPC_SET 1 /* set ipc_perm options */ |
40 | #define IPC_STAT 2 /* get ipc_perm options */ |
41 | #define IPC_INFO 3 /* see ipcs */ |
42 | |
43 | /* |
44 | * Version flags for semctl, msgctl, and shmctl commands |
45 | * These are passed as bitflags or-ed with the actual command |
46 | */ |
47 | #define IPC_OLD 0 /* Old version (no 32-bit UID support on many |
48 | architectures) */ |
49 | #define IPC_64 0x0100 /* New version (support 32-bit UIDs, bigger |
50 | message sizes, etc. */ |
51 | |
52 | /* |
53 | * These are used to wrap system calls. |
54 | * |
55 | * See architecture code for ugly details.. |
56 | */ |
57 | struct ipc_kludge { |
58 | struct msgbuf __user *msgp; |
59 | long msgtyp; |
60 | }; |
61 | |
62 | #define SEMOP 1 |
63 | #define SEMGET 2 |
64 | #define SEMCTL 3 |
65 | #define SEMTIMEDOP 4 |
66 | #define MSGSND 11 |
67 | #define MSGRCV 12 |
68 | #define MSGGET 13 |
69 | #define MSGCTL 14 |
70 | #define SHMAT 21 |
71 | #define SHMDT 22 |
72 | #define SHMGET 23 |
73 | #define SHMCTL 24 |
74 | |
75 | /* Used by the DIPC package, try and avoid reusing it */ |
76 | #define DIPC 25 |
77 | |
78 | #define IPCCALL(version,op) ((version)<<16 | (op)) |
79 | |
80 | #ifdef __KERNEL__ |
81 | #include <linux/spinlock.h> |
82 | |
83 | #define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ |
84 | |
85 | /* used by in-kernel data structures */ |
86 | struct kern_ipc_perm |
87 | { |
88 | spinlock_t lock; |
89 | int deleted; |
90 | int id; |
91 | key_t key; |
92 | uid_t uid; |
93 | gid_t gid; |
94 | uid_t cuid; |
95 | gid_t cgid; |
96 | mode_t mode; |
97 | unsigned long seq; |
98 | void *security; |
99 | }; |
100 | |
101 | #endif /* __KERNEL__ */ |
102 | |
103 | #endif /* _LINUX_IPC_H */ |
104 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9