Skip to content

Commit

Permalink
include/linux/sem.h: make sysv_sem empty if SYSVIPC is disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Manfred Spraul authored and Linus Torvalds committed Nov 2, 2011
1 parent e57940d commit f567a18
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions include/linux/sem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f567a18

Please sign in to comment.