From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- include/linux/sem.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 include/linux/sem.h (limited to 'include/linux/sem.h') diff --git a/include/linux/sem.h b/include/linux/sem.h new file mode 100644 index 00000000..976ce3a1 --- /dev/null +++ b/include/linux/sem.h @@ -0,0 +1,52 @@ +#ifndef _LINUX_SEM_H +#define _LINUX_SEM_H + +#include +#include +#include +#include + +struct task_struct; + +/* One sem_array data structure for each set of semaphores in the system. */ +struct sem_array { + struct kern_ipc_perm ____cacheline_aligned_in_smp + sem_perm; /* permissions .. see ipc.h */ + time_t sem_ctime; /* last change time */ + struct sem *sem_base; /* ptr to first semaphore in array */ + struct list_head pending_alter; /* pending operations */ + /* that alter the array */ + struct list_head pending_const; /* pending complex operations */ + /* that do not alter semvals */ + struct list_head list_id; /* undo requests on this array */ + int sem_nsems; /* no. of semaphores in array */ + int complex_count; /* pending complex operations */ +}; + +#ifdef CONFIG_SYSVIPC + +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 + +struct sysv_sem { + /* empty */ +}; + +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 */ -- cgit v1.3.1