]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
include/linux/sem.h: make sysv_sem empty if SYSVIPC is disabled
authorManfred Spraul <manfred@colorfullife.com>
Mon, 24 Oct 2011 15:00:06 +0000 (02:00 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 25 Oct 2011 09:08:18 +0000 (20:08 +1100)
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>
include/linux/sem.h

index 464842621a4aa29e786d21a0baa756dabbffe589..10d6b226afc5aebdda9f3a65c72550e1af54d3c5 100644 (file)
@@ -96,16 +96,21 @@ struct sem_array {
        int                     complex_count;  /* pending complex operations */
 };
 
+#ifdef CONFIG_SYSVIPC
+
 struct sysv_sem {
        struct sem_undo_list *undo_list;
 };
 
-#ifdef CONFIG_SYSVIPC
-
 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;