16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 261730c53SDavid Howells #ifndef _ASM_MSGBUF_H 361730c53SDavid Howells #define _ASM_MSGBUF_H 461730c53SDavid Howells 59ef0e004SMasahiro Yamada #include <asm/ipcbuf.h> 661730c53SDavid Howells 761730c53SDavid Howells /* 861730c53SDavid Howells * The msqid64_ds structure for the MIPS architecture. 961730c53SDavid Howells * Note extra padding because this structure is passed back and forth 1061730c53SDavid Howells * between kernel and user space. 1161730c53SDavid Howells * 1261730c53SDavid Howells * Pad space is left for: 1361730c53SDavid Howells * - 2 miscellaneous unsigned long values 1461730c53SDavid Howells */ 1561730c53SDavid Howells 163f3a4b3fSArnd Bergmann #if defined(__mips64) 1761730c53SDavid Howells struct msqid64_ds { 1861730c53SDavid Howells struct ipc64_perm msg_perm; 19caf5e32dSArnd Bergmann long msg_stime; /* last msgsnd time */ 20caf5e32dSArnd Bergmann long msg_rtime; /* last msgrcv time */ 21caf5e32dSArnd Bergmann long msg_ctime; /* last change time */ 2261730c53SDavid Howells unsigned long msg_cbytes; /* current number of bytes on queue */ 2361730c53SDavid Howells unsigned long msg_qnum; /* number of messages in queue */ 2461730c53SDavid Howells unsigned long msg_qbytes; /* max number of bytes on queue */ 2561730c53SDavid Howells __kernel_pid_t msg_lspid; /* pid of last msgsnd */ 2661730c53SDavid Howells __kernel_pid_t msg_lrpid; /* last receive pid */ 2761730c53SDavid Howells unsigned long __unused4; 2861730c53SDavid Howells unsigned long __unused5; 2961730c53SDavid Howells }; 303f3a4b3fSArnd Bergmann #elif defined (__MIPSEB__) 313f3a4b3fSArnd Bergmann struct msqid64_ds { 323f3a4b3fSArnd Bergmann struct ipc64_perm msg_perm; 333f3a4b3fSArnd Bergmann unsigned long msg_stime_high; 343f3a4b3fSArnd Bergmann unsigned long msg_stime; /* last msgsnd time */ 353f3a4b3fSArnd Bergmann unsigned long msg_rtime_high; 363f3a4b3fSArnd Bergmann unsigned long msg_rtime; /* last msgrcv time */ 373f3a4b3fSArnd Bergmann unsigned long msg_ctime_high; 383f3a4b3fSArnd Bergmann unsigned long msg_ctime; /* last change time */ 393f3a4b3fSArnd Bergmann unsigned long msg_cbytes; /* current number of bytes on queue */ 403f3a4b3fSArnd Bergmann unsigned long msg_qnum; /* number of messages in queue */ 413f3a4b3fSArnd Bergmann unsigned long msg_qbytes; /* max number of bytes on queue */ 423f3a4b3fSArnd Bergmann __kernel_pid_t msg_lspid; /* pid of last msgsnd */ 433f3a4b3fSArnd Bergmann __kernel_pid_t msg_lrpid; /* last receive pid */ 443f3a4b3fSArnd Bergmann unsigned long __unused4; 453f3a4b3fSArnd Bergmann unsigned long __unused5; 463f3a4b3fSArnd Bergmann }; 473f3a4b3fSArnd Bergmann #elif defined (__MIPSEL__) 483f3a4b3fSArnd Bergmann struct msqid64_ds { 493f3a4b3fSArnd Bergmann struct ipc64_perm msg_perm; 503f3a4b3fSArnd Bergmann unsigned long msg_stime; /* last msgsnd time */ 513f3a4b3fSArnd Bergmann unsigned long msg_stime_high; 523f3a4b3fSArnd Bergmann unsigned long msg_rtime; /* last msgrcv time */ 533f3a4b3fSArnd Bergmann unsigned long msg_rtime_high; 543f3a4b3fSArnd Bergmann unsigned long msg_ctime; /* last change time */ 553f3a4b3fSArnd Bergmann unsigned long msg_ctime_high; 563f3a4b3fSArnd Bergmann unsigned long msg_cbytes; /* current number of bytes on queue */ 573f3a4b3fSArnd Bergmann unsigned long msg_qnum; /* number of messages in queue */ 583f3a4b3fSArnd Bergmann unsigned long msg_qbytes; /* max number of bytes on queue */ 593f3a4b3fSArnd Bergmann __kernel_pid_t msg_lspid; /* pid of last msgsnd */ 603f3a4b3fSArnd Bergmann __kernel_pid_t msg_lrpid; /* last receive pid */ 613f3a4b3fSArnd Bergmann unsigned long __unused4; 623f3a4b3fSArnd Bergmann unsigned long __unused5; 633f3a4b3fSArnd Bergmann }; 643f3a4b3fSArnd Bergmann #else 65*2f9060b1SBjorn Helgaas #warning no endianness set 663f3a4b3fSArnd Bergmann #endif 6761730c53SDavid Howells 6861730c53SDavid Howells #endif /* _ASM_MSGBUF_H */ 69