xref: /OK3568_Linux_fs/kernel/arch/xtensa/include/uapi/asm/msgbuf.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * include/asm-xtensa/msgbuf.h
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * The msqid64_ds structure for the Xtensa architecture.
6*4882a593Smuzhiyun  * Note extra padding because this structure is passed back and forth
7*4882a593Smuzhiyun  * between kernel and user space.
8*4882a593Smuzhiyun  *
9*4882a593Smuzhiyun  * Pad space is left for:
10*4882a593Smuzhiyun  * - 2 miscellaneous 32-bit values
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  * This file is subject to the terms and conditions of the GNU General
13*4882a593Smuzhiyun  * Public License.  See the file "COPYING" in the main directory of
14*4882a593Smuzhiyun  * this archive for more details.
15*4882a593Smuzhiyun  */
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun #ifndef _XTENSA_MSGBUF_H
18*4882a593Smuzhiyun #define _XTENSA_MSGBUF_H
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun #include <asm/ipcbuf.h>
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun struct msqid64_ds {
23*4882a593Smuzhiyun 	struct ipc64_perm msg_perm;
24*4882a593Smuzhiyun #ifdef __XTENSA_EB__
25*4882a593Smuzhiyun 	unsigned long  msg_stime_high;
26*4882a593Smuzhiyun 	unsigned long  msg_stime;	/* last msgsnd time */
27*4882a593Smuzhiyun 	unsigned long  msg_rtime_high;
28*4882a593Smuzhiyun 	unsigned long  msg_rtime;	/* last msgrcv time */
29*4882a593Smuzhiyun 	unsigned long  msg_ctime_high;
30*4882a593Smuzhiyun 	unsigned long  msg_ctime;	/* last change time */
31*4882a593Smuzhiyun #elif defined(__XTENSA_EL__)
32*4882a593Smuzhiyun 	unsigned long  msg_stime;	/* last msgsnd time */
33*4882a593Smuzhiyun 	unsigned long  msg_stime_high;
34*4882a593Smuzhiyun 	unsigned long  msg_rtime;	/* last msgrcv time */
35*4882a593Smuzhiyun 	unsigned long  msg_rtime_high;
36*4882a593Smuzhiyun 	unsigned long  msg_ctime;	/* last change time */
37*4882a593Smuzhiyun 	unsigned long  msg_ctime_high;
38*4882a593Smuzhiyun #else
39*4882a593Smuzhiyun # error processor byte order undefined!
40*4882a593Smuzhiyun #endif
41*4882a593Smuzhiyun 	unsigned long  msg_cbytes;	/* current number of bytes on queue */
42*4882a593Smuzhiyun 	unsigned long  msg_qnum;	/* number of messages in queue */
43*4882a593Smuzhiyun 	unsigned long  msg_qbytes;	/* max number of bytes on queue */
44*4882a593Smuzhiyun 	__kernel_pid_t msg_lspid;	/* pid of last msgsnd */
45*4882a593Smuzhiyun 	__kernel_pid_t msg_lrpid;	/* last receive pid */
46*4882a593Smuzhiyun 	unsigned long  __unused4;
47*4882a593Smuzhiyun 	unsigned long  __unused5;
48*4882a593Smuzhiyun };
49*4882a593Smuzhiyun 
50*4882a593Smuzhiyun #endif	/* _XTENSA_MSGBUF_H */
51