summaryrefslogtreecommitdiff
path: root/include/linux/msg.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-10-13 13:46:48 +0400
committerDavid Howells <dhowells@redhat.com>2012-10-13 13:46:48 +0400
commit607ca46e97a1b6594b29647d98a32d545c24bdff (patch)
tree30f4c0784bfddb57332cdc0678bd06d1e77fa185 /include/linux/msg.h
parent08cce05c5a91f5017f4edc9866cf026908c73f9f (diff)
downloadlinux-607ca46e97a1b6594b29647d98a32d545c24bdff.tar.xz
UAPI: (Scripted) Disintegrate include/linux
Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'include/linux/msg.h')
-rw-r--r--include/linux/msg.h74
1 files changed, 1 insertions, 73 deletions
diff --git a/include/linux/msg.h b/include/linux/msg.h
index 56abf1558fdd..7a4b9e97d29a 100644
--- a/include/linux/msg.h
+++ b/include/linux/msg.h
@@ -1,78 +1,8 @@
#ifndef _LINUX_MSG_H
#define _LINUX_MSG_H
-#include <linux/ipc.h>
-
-/* ipcs ctl commands */
-#define MSG_STAT 11
-#define MSG_INFO 12
-
-/* msgrcv options */
-#define MSG_NOERROR 010000 /* no error if message is too big */
-#define MSG_EXCEPT 020000 /* recv any msg except of specified type.*/
-
-/* Obsolete, used only for backwards compatibility and libc5 compiles */
-struct msqid_ds {
- struct ipc_perm msg_perm;
- struct msg *msg_first; /* first message on queue,unused */
- struct msg *msg_last; /* last message in queue,unused */
- __kernel_time_t msg_stime; /* last msgsnd time */
- __kernel_time_t msg_rtime; /* last msgrcv time */
- __kernel_time_t msg_ctime; /* last change time */
- unsigned long msg_lcbytes; /* Reuse junk fields for 32 bit */
- unsigned long msg_lqbytes; /* ditto */
- unsigned short msg_cbytes; /* current number of bytes on queue */
- unsigned short msg_qnum; /* number of messages in queue */
- unsigned short msg_qbytes; /* max number of bytes on queue */
- __kernel_ipc_pid_t msg_lspid; /* pid of last msgsnd */
- __kernel_ipc_pid_t msg_lrpid; /* last receive pid */
-};
-
-/* Include the definition of msqid64_ds */
-#include <asm/msgbuf.h>
-
-/* message buffer for msgsnd and msgrcv calls */
-struct msgbuf {
- long mtype; /* type of message */
- char mtext[1]; /* message text */
-};
-
-/* buffer for msgctl calls IPC_INFO, MSG_INFO */
-struct msginfo {
- int msgpool;
- int msgmap;
- int msgmax;
- int msgmnb;
- int msgmni;
- int msgssz;
- int msgtql;
- unsigned short msgseg;
-};
-
-/*
- * Scaling factor to compute msgmni:
- * the memory dedicated to msg queues (msgmni * msgmnb) should occupy
- * at most 1/MSG_MEM_SCALE of the lowmem (see the formula in ipc/msg.c):
- * up to 8MB : msgmni = 16 (MSGMNI)
- * 4 GB : msgmni = 8K
- * more than 16 GB : msgmni = 32K (IPCMNI)
- */
-#define MSG_MEM_SCALE 32
-
-#define MSGMNI 16 /* <= IPCMNI */ /* max # of msg queue identifiers */
-#define MSGMAX 8192 /* <= INT_MAX */ /* max size of message (bytes) */
-#define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */
-
-/* unused */
-#define MSGPOOL (MSGMNI * MSGMNB / 1024) /* size in kbytes of message pool */
-#define MSGTQL MSGMNB /* number of system message headers */
-#define MSGMAP MSGMNB /* number of entries in message map */
-#define MSGSSZ 16 /* message segment size */
-#define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) /* max no. of segments */
-#define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff)
-
-#ifdef __KERNEL__
#include <linux/list.h>
+#include <uapi/linux/msg.h>
/* one msg_msg structure for each message */
struct msg_msg {
@@ -107,6 +37,4 @@ extern long do_msgsnd(int msqid, long mtype, void __user *mtext,
extern long do_msgrcv(int msqid, long *pmtype, void __user *mtext,
size_t msgsz, long msgtyp, int msgflg);
-#endif /* __KERNEL__ */
-
#endif /* _LINUX_MSG_H */