Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

msg: Move struct msg_queue into ipc/msg.c

All of the users are now in ipc/msg.c so make the definition local to
that file to make code maintenance easier. AKA to prevent rebuilding
the entire kernel when struct msg_queue changes.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>

+17 -18
-18
include/linux/msg.h
··· 3 3 #define _LINUX_MSG_H 4 4 5 5 #include <linux/list.h> 6 - #include <linux/time64.h> 7 6 #include <uapi/linux/msg.h> 8 7 9 8 /* one msg_msg structure for each message */ ··· 14 15 void *security; 15 16 /* the actual message follows immediately */ 16 17 }; 17 - 18 - /* one msq_queue structure for each present queue on the system */ 19 - struct msg_queue { 20 - struct kern_ipc_perm q_perm; 21 - time64_t q_stime; /* last msgsnd time */ 22 - time64_t q_rtime; /* last msgrcv time */ 23 - time64_t q_ctime; /* last change time */ 24 - 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 - } __randomize_layout; 34 18 35 19 #endif /* _LINUX_MSG_H */
+17
ipc/msg.c
··· 43 43 #include <linux/uaccess.h> 44 44 #include "util.h" 45 45 46 + /* one msq_queue structure for each present queue on the system */ 47 + struct msg_queue { 48 + struct kern_ipc_perm q_perm; 49 + time64_t q_stime; /* last msgsnd time */ 50 + time64_t q_rtime; /* last msgrcv time */ 51 + time64_t q_ctime; /* last change time */ 52 + unsigned long q_cbytes; /* current number of bytes on queue */ 53 + unsigned long q_qnum; /* number of messages in queue */ 54 + unsigned long q_qbytes; /* max number of bytes on queue */ 55 + pid_t q_lspid; /* pid of last msgsnd */ 56 + pid_t q_lrpid; /* last receive pid */ 57 + 58 + struct list_head q_messages; 59 + struct list_head q_receivers; 60 + struct list_head q_senders; 61 + } __randomize_layout; 62 + 46 63 /* one msg_receiver structure for each sleeping receiver */ 47 64 struct msg_receiver { 48 65 struct list_head r_list;