patch-2.3.15 linux/include/linux/msg.h

Next file: linux/include/linux/net.h
Previous file: linux/include/linux/mroute.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.14/linux/include/linux/msg.h linux/include/linux/msg.h
@@ -11,8 +11,10 @@
 #define MSG_NOERROR     010000  /* no error if message is too big */
 #define MSG_EXCEPT      020000  /* recv any msg except of specified type.*/
 
+#ifdef __KERNEL__
+
 /* one msqid structure for each queue on the system */
-struct msqid_ds {
+struct msqid_ds_kern {
 	struct ipc_perm msg_perm;
 	struct msg *msg_first;		/* first message on queue */
 	struct msg *msg_last;		/* last message in queue */
@@ -28,6 +30,24 @@
 	__kernel_ipc_pid_t msg_lrpid;	/* last receive pid */
 };
 
+#endif
+
+struct msqid_ds {
+	struct ipc_perm msg_perm;
+	struct msg *msg_first;		/* first message on queue */
+	struct msg *msg_last;		/* last message in queue */
+	__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_cbytes;	/* Reuse junk fields for 32 bit */
+	unsigned long  msg_qbytes;	/* ditto */
+	unsigned short msg_cbytes_old;	/* current number of bytes on queue */
+	unsigned short msg_qnum;	/* number of messages in queue */
+	unsigned short msg_qbytes_old;	/* 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 */
+};
+
 /* message buffer for msgsnd and msgrcv calls */
 struct msgbuf {
 	long mtype;         /* type of message */
@@ -69,11 +89,10 @@
 	short msg_ts;           /* message text size */
 };
 
-asmlinkage int sys_msgget (key_t key, int msgflg);
-asmlinkage int sys_msgsnd (int msqid, struct msgbuf *msgp, size_t msgsz, int msgflg);
-asmlinkage int sys_msgrcv (int msqid, struct msgbuf *msgp, size_t msgsz, long msgtyp,
-		       int msgflg);
-asmlinkage int sys_msgctl (int msqid, int cmd, struct msqid_ds *buf);
+asmlinkage long sys_msgget (key_t key, int msgflg);
+asmlinkage long sys_msgsnd (int msqid, struct msgbuf *msgp, size_t msgsz, int msgflg);
+asmlinkage long sys_msgrcv (int msqid, struct msgbuf *msgp, size_t msgsz, long msgtyp, int msgflg);
+asmlinkage long sys_msgctl (int msqid, int cmd, struct msqid_ds *buf);
 
 #endif /* __KERNEL__ */
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)