sem: Move struct sem and struct sem_array into ipc/sem.c
[linux-block.git] / include / linux / sem.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
1da177e4
LT
2#ifndef _LINUX_SEM_H
3#define _LINUX_SEM_H
4
607ca46e 5#include <uapi/linux/sem.h>
1da177e4 6
8c65b4a6 7struct task_struct;
1a5c1349 8struct sem_undo_list;
1da177e4 9
f567a185
MS
10#ifdef CONFIG_SYSVIPC
11
1da177e4
LT
12struct sysv_sem {
13 struct sem_undo_list *undo_list;
14};
15
1da177e4
LT
16extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
17extern void exit_sem(struct task_struct *tsk);
18
19#else
f567a185
MS
20
21struct sysv_sem {
22 /* empty */
23};
24
1da177e4
LT
25static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
26{
27 return 0;
28}
29
30static inline void exit_sem(struct task_struct *tsk)
31{
32 return;
33}
34#endif
35
1da177e4 36#endif /* _LINUX_SEM_H */