summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-11 22:53:50 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-11 22:53:50 -0700
commitc334f752d8e9d3847d4459d06f7544dea9a49923 (patch)
treee443483a21ab52769cba5030004ecbdd2768eb53 /include
parent00d1b0e9990815e31be7e502801f3a421fcccafa (diff)
[PATCH] posix message queues: code move
From: Manfred Spraul <manfred@colorfullife.com> cleanup of sysv ipc as a preparation for posix message queues: - replace !CONFIG_SYSVIPC wrappers for copy_semundo and exit_sem with static inline wrappers. Now the whole ipc/util.c file is only used if CONFIG_SYSVIPC is set, use makefile magic instead of #ifdef. - remove the prototypes for copy_semundo and exit_sem from kernel/fork.c - they belong into a header file. - create a new msgutil.c with the helper functions for message queues. - cleanup the helper functions: run Lindent, add __user tags.
Diffstat (limited to 'include')
-rw-r--r--include/linux/msg.h3
-rw-r--r--include/linux/sem.h17
2 files changed, 16 insertions, 4 deletions
diff --git a/include/linux/msg.h b/include/linux/msg.h
index b235e862a3dd..2c4c6aa643ff 100644
--- a/include/linux/msg.h
+++ b/include/linux/msg.h
@@ -74,9 +74,6 @@ struct msg_msg {
/* the actual message follows immediately */
};
-#define DATALEN_MSG (PAGE_SIZE-sizeof(struct msg_msg))
-#define DATALEN_SEG (PAGE_SIZE-sizeof(struct msg_msgseg))
-
/* one msq_queue structure for each present queue on the system */
struct msg_queue {
struct kern_ipc_perm q_perm;
diff --git a/include/linux/sem.h b/include/linux/sem.h
index b337c509ac29..aaf45764a56e 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -134,7 +134,22 @@ struct sysv_sem {
struct sem_undo_list *undo_list;
};
-void exit_sem(struct task_struct *p);
+#ifdef CONFIG_SYSVIPC
+
+extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
+extern void exit_sem(struct task_struct *tsk);
+
+#else
+static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
+{
+ return 0;
+}
+
+static inline void exit_sem(struct task_struct *tsk)
+{
+ return;
+}
+#endif
#endif /* __KERNEL__ */