blob: 05115342daa342dd77d6649989a06f2c86380cb7 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _LINUX_MSG_H
2#define _LINUX_MSG_H
3
David Woodhouse77597ad2006-04-25 14:26:46 +01004#include <linux/list.h>
Deepa Dinamani50578ea2017-08-02 19:51:12 -07005#include <linux/time64.h>
David Howells607ca462012-10-13 10:46:48 +01006#include <uapi/linux/msg.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
8/* one msg_msg structure for each message */
9struct msg_msg {
Mathias Krause4e9b45a2013-11-12 15:11:47 -080010 struct list_head m_list;
11 long m_type;
12 size_t m_ts; /* message text size */
Manfred Spraul239521f2014-01-27 17:07:04 -080013 struct msg_msgseg *next;
Linus Torvalds1da177e2005-04-16 15:20:36 -070014 void *security;
15 /* the actual message follows immediately */
16};
17
18/* one msq_queue structure for each present queue on the system */
19struct msg_queue {
20 struct kern_ipc_perm q_perm;
Deepa Dinamani50578ea2017-08-02 19:51:12 -070021 time64_t q_stime; /* last msgsnd time */
22 time64_t q_rtime; /* last msgrcv time */
23 time64_t q_ctime; /* last change time */
Linus Torvalds1da177e2005-04-16 15:20:36 -070024 unsigned long q_cbytes; /* current number of bytes on queue */
25 unsigned long q_qnum; /* number of messages in queue */
26 unsigned long q_qbytes; /* max number of bytes on queue */
27 pid_t q_lspid; /* pid of last msgsnd */
28 pid_t q_lrpid; /* last receive pid */
29
30 struct list_head q_messages;
31 struct list_head q_receivers;
32 struct list_head q_senders;
33};
34
Linus Torvalds1da177e2005-04-16 15:20:36 -070035#endif /* _LINUX_MSG_H */