WIP FPC-III support
[linux/fpc-iii.git] / include / linux / shm.h
blobd8e69aed3d322d2b5a1ad05c4e6032fa25e68daf
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_SHM_H_
3 #define _LINUX_SHM_H_
5 #include <linux/list.h>
6 #include <asm/page.h>
7 #include <uapi/linux/shm.h>
8 #include <asm/shmparam.h>
10 struct file;
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 bool is_file_shm_hugepages(struct file *file);
20 void exit_shm(struct task_struct *task);
21 #define shm_init_task(task) INIT_LIST_HEAD(&(task)->sysvshm.shm_clist)
22 #else
23 struct sysv_shm {
24 /* empty */
27 static inline long do_shmat(int shmid, char __user *shmaddr,
28 int shmflg, unsigned long *addr,
29 unsigned long shmlba)
31 return -ENOSYS;
33 static inline bool is_file_shm_hugepages(struct file *file)
35 return false;
37 static inline void exit_shm(struct task_struct *task)
40 static inline void shm_init_task(struct task_struct *task)
43 #endif
45 #endif /* _LINUX_SHM_H_ */