Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / include / linux / shm.h
blob1d3d3ae958fbd3a4334a26ed597e44b640d8b96e
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_SHM_H_
3 #define _LINUX_SHM_H_
5 #include <linux/types.h>
6 #include <asm/page.h>
7 #include <asm/shmparam.h>
9 struct file;
10 struct task_struct;
12 #ifdef CONFIG_SYSVIPC
13 struct sysv_shm {
14 struct list_head shm_clist;
17 long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr,
18 unsigned long shmlba);
19 void exit_shm(struct task_struct *task);
20 #define shm_init_task(task) INIT_LIST_HEAD(&(task)->sysvshm.shm_clist)
21 #else
22 struct sysv_shm {
23 /* empty */
26 static inline long do_shmat(int shmid, char __user *shmaddr,
27 int shmflg, unsigned long *addr,
28 unsigned long shmlba)
30 return -ENOSYS;
32 static inline void exit_shm(struct task_struct *task)
35 static inline void shm_init_task(struct task_struct *task)
38 #endif
40 #endif /* _LINUX_SHM_H_ */