blob: 71fd92d81b266edf1781c542de550159bc33949a [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _LINUX_IPC_H
2#define _LINUX_IPC_H
3
Robert P. J. Day0a3021f2007-07-15 23:39:57 -07004#include <linux/spinlock.h>
Eric W. Biederman1efdb692012-02-07 16:54:11 -08005#include <linux/uidgid.h>
David Howells607ca462012-10-13 10:46:48 +01006#include <uapi/linux/ipc.h>
Cedric Le Goaterb119f132006-10-04 02:15:19 -07007
Linus Torvalds1da177e2005-04-16 15:20:36 -07008#define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */
9
10/* used by in-kernel data structures */
Davidlohr Bueso60f3e002017-05-08 15:57:06 -070011struct kern_ipc_perm {
Linus Torvalds1da177e2005-04-16 15:20:36 -070012 spinlock_t lock;
Rafael Aquini72a8ff22014-01-27 17:07:02 -080013 bool deleted;
Nadia Derbey7ca7e562007-10-18 23:40:48 -070014 int id;
Linus Torvalds1da177e2005-04-16 15:20:36 -070015 key_t key;
Eric W. Biederman1efdb692012-02-07 16:54:11 -080016 kuid_t uid;
17 kgid_t gid;
18 kuid_t cuid;
19 kgid_t cgid;
Davidlohr Bueso60f3e002017-05-08 15:57:06 -070020 umode_t mode;
Linus Torvalds1da177e2005-04-16 15:20:36 -070021 unsigned long seq;
22 void *security;
Davidlohr Bueso60f3e002017-05-08 15:57:06 -070023} ____cacheline_aligned_in_smp;
Linus Torvalds1da177e2005-04-16 15:20:36 -070024
Linus Torvalds1da177e2005-04-16 15:20:36 -070025#endif /* _LINUX_IPC_H */