Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | #ifndef _LINUX_SEM_H |
| 3 | #define _LINUX_SEM_H |
| 4 | |
David Howells | 607ca46 | 2012-10-13 10:46:48 +0100 | [diff] [blame] | 5 | #include <uapi/linux/sem.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | |
Tim Schmielau | 8c65b4a | 2005-11-07 00:59:43 -0800 | [diff] [blame] | 7 | struct task_struct; |
Eric W. Biederman | 1a5c134 | 2018-03-22 21:30:56 -0500 | [diff] [blame] | 8 | struct sem_undo_list; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | |
Manfred Spraul | f567a18 | 2011-11-02 13:38:56 -0700 | [diff] [blame] | 10 | #ifdef CONFIG_SYSVIPC |
| 11 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | struct sysv_sem { |
| 13 | struct sem_undo_list *undo_list; |
| 14 | }; |
| 15 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |
Manfred Spraul | f567a18 | 2011-11-02 13:38:56 -0700 | [diff] [blame] | 20 | |
| 21 | struct sysv_sem { |
| 22 | /* empty */ |
| 23 | }; |
| 24 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | #endif /* _LINUX_SEM_H */ |