ipc.h 613 Bytes
Newer Older
1
/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds's avatar
Linus Torvalds committed
2 3 4
#ifndef _LINUX_IPC_H
#define _LINUX_IPC_H

5
#include <linux/spinlock.h>
6
#include <linux/uidgid.h>
7
#include <linux/rhashtable-types.h>
8
#include <uapi/linux/ipc.h>
9
#include <linux/refcount.h>
10

Linus Torvalds's avatar
Linus Torvalds committed
11
/* used by in-kernel data structures */
12
struct kern_ipc_perm {
Linus Torvalds's avatar
Linus Torvalds committed
13
	spinlock_t	lock;
14
	bool		deleted;
Nadia Derbey's avatar
Nadia Derbey committed
15
	int		id;
Linus Torvalds's avatar
Linus Torvalds committed
16
	key_t		key;
17 18 19 20
	kuid_t		uid;
	kgid_t		gid;
	kuid_t		cuid;
	kgid_t		cgid;
21
	umode_t		mode;
Linus Torvalds's avatar
Linus Torvalds committed
22 23
	unsigned long	seq;
	void		*security;
24

25 26
	struct rhash_head khtnode;

27
	struct rcu_head rcu;
28
	refcount_t refcount;
29
} ____cacheline_aligned_in_smp __randomize_layout;
Linus Torvalds's avatar
Linus Torvalds committed
30 31

#endif /* _LINUX_IPC_H */