Merge branch 'gma500-fixes' of git://github.com/patjak/drm-gma500 into drm-fixes
[deliverable/linux.git] / include / linux / sem.h
CommitLineData
1da177e4
LT
1#ifndef _LINUX_SEM_H
2#define _LINUX_SEM_H
3
60063497 4#include <linux/atomic.h>
380af1b3 5#include <linux/rcupdate.h>
31a7c474 6#include <linux/cache.h>
607ca46e 7#include <uapi/linux/sem.h>
1da177e4 8
8c65b4a6
TS
9struct task_struct;
10
1da177e4
LT
11/* One sem_array data structure for each set of semaphores in the system. */
12struct sem_array {
31a7c474
MS
13 struct kern_ipc_perm ____cacheline_aligned_in_smp
14 sem_perm; /* permissions .. see ipc.h */
1da177e4
LT
15 time_t sem_otime; /* last semop time */
16 time_t sem_ctime; /* last change time */
17 struct sem *sem_base; /* ptr to first semaphore in array */
a1193f8e 18 struct list_head sem_pending; /* pending operations to be processed */
4daa28f6 19 struct list_head list_id; /* undo requests on this array */
b97e820f
MS
20 int sem_nsems; /* no. of semaphores in array */
21 int complex_count; /* pending complex operations */
1da177e4
LT
22};
23
f567a185
MS
24#ifdef CONFIG_SYSVIPC
25
1da177e4
LT
26struct sysv_sem {
27 struct sem_undo_list *undo_list;
28};
29
1da177e4
LT
30extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
31extern void exit_sem(struct task_struct *tsk);
32
33#else
f567a185
MS
34
35struct sysv_sem {
36 /* empty */
37};
38
1da177e4
LT
39static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
40{
41 return 0;
42}
43
44static inline void exit_sem(struct task_struct *tsk)
45{
46 return;
47}
48#endif
49
1da177e4 50#endif /* _LINUX_SEM_H */
This page took 1.000488 seconds and 5 git commands to generate.