2017-11-01 15:07:57 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2005-04-16 15:20:36 -07:00
|
|
|
#ifndef _LINUX_SEM_H
|
|
|
|
|
#define _LINUX_SEM_H
|
|
|
|
|
|
2012-10-13 10:46:48 +01:00
|
|
|
#include <uapi/linux/sem.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-11-07 00:59:43 -08:00
|
|
|
struct task_struct;
|
2018-03-22 21:30:56 -05:00
|
|
|
struct sem_undo_list;
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-11-02 13:38:56 -07:00
|
|
|
#ifdef CONFIG_SYSVIPC
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
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
|
2011-11-02 13:38:56 -07:00
|
|
|
|
|
|
|
|
struct sysv_sem {
|
|
|
|
|
/* empty */
|
|
|
|
|
};
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
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 */
|