sem.h 599 字节
Newer Older
1
/* SPDX-License-Identifier: GPL-2.0 */
L
Linus Torvalds 已提交
2 3 4
#ifndef _LINUX_SEM_H
#define _LINUX_SEM_H

5
#include <uapi/linux/sem.h>
L
Linus Torvalds 已提交
6

7
struct task_struct;
8
struct sem_undo_list;
L
Linus Torvalds 已提交
9

10 11
#ifdef CONFIG_SYSVIPC

L
Linus Torvalds 已提交
12 13 14 15 16 17 18 19
struct sysv_sem {
	struct sem_undo_list *undo_list;
};

extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
extern void exit_sem(struct task_struct *tsk);

#else
20 21 22 23 24

struct sysv_sem {
	/* empty */
};

L
Linus Torvalds 已提交
25 26 27 28 29 30 31 32 33 34 35 36
static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
{
	return 0;
}

static inline void exit_sem(struct task_struct *tsk)
{
	return;
}
#endif

#endif /* _LINUX_SEM_H */