Skip to contentSkip to conversation

include/linux/sem.h: make sysv_sem empty if SYSVIPC is disabled

PATCH In review Manfred Spraul 1 participant 1 message Oct 15, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 4/5 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.

---
 include/linux/sem.h |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
include/linux/sem.h +7 -2
index 4648426..10d6b22 100644
@@ -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;
Signature · 1 line
1.7.6.4