aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManfred Spraul <manfred@colorfullife.com>2011-11-02 16:38:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-02 19:07:01 -0400
commitf567a18590742b811287b7512fb0908deac4eef7 (patch)
tree5ed76fc1727cbce2b64776afd5c682414f0c1726
parente57940d719e9fc5223d133b631f8cb5232d6064e (diff)
include/linux/sem.h: make sysv_sem empty if SYSVIPC is disabled
For the sysvsem undo, each task struct contains a sysv_sem structure with a pointer to the undo information. This pointer is only necessary if sysvipc is enabled - thus the pointer can be made conditional on CONFIG_SYSVIPC. Signed-off-by: Manfred Spraul <manfred@colorfullife.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Mike Galbraith <efault@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/sem.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/sem.h b/include/linux/sem.h
index 464842621a4..10d6b226afc 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -96,16 +96,21 @@ struct sem_array {
96 int complex_count; /* pending complex operations */ 96 int complex_count; /* pending complex operations */
97}; 97};
98 98
99#ifdef CONFIG_SYSVIPC
100
99struct sysv_sem { 101struct sysv_sem {
100 struct sem_undo_list *undo_list; 102 struct sem_undo_list *undo_list;
101}; 103};
102 104
103#ifdef CONFIG_SYSVIPC
104
105extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk); 105extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
106extern void exit_sem(struct task_struct *tsk); 106extern void exit_sem(struct task_struct *tsk);
107 107
108#else 108#else
109
110struct sysv_sem {
111 /* empty */
112};
113
109static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk) 114static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
110{ 115{
111 return 0; 116 return 0;