Merge tag 'mlx5-updates-2018-05-17' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / include / linux / sem.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_SEM_H
3 #define _LINUX_SEM_H
4
5 #include <uapi/linux/sem.h>
6
7 struct task_struct;
8 struct sem_undo_list;
9
10 #ifdef CONFIG_SYSVIPC
11
12 struct sysv_sem {
13         struct sem_undo_list *undo_list;
14 };
15
16 extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
17 extern void exit_sem(struct task_struct *tsk);
18
19 #else
20
21 struct sysv_sem {
22         /* empty */
23 };
24
25 static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
26 {
27         return 0;
28 }
29
30 static inline void exit_sem(struct task_struct *tsk)
31 {
32         return;
33 }
34 #endif
35
36 #endif /* _LINUX_SEM_H */