18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci#ifndef _ASM_MSGBUF_H
38c2ecf20Sopenharmony_ci#define _ASM_MSGBUF_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <asm/ipcbuf.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci/*
88c2ecf20Sopenharmony_ci * The msqid64_ds structure for the MIPS architecture.
98c2ecf20Sopenharmony_ci * Note extra padding because this structure is passed back and forth
108c2ecf20Sopenharmony_ci * between kernel and user space.
118c2ecf20Sopenharmony_ci *
128c2ecf20Sopenharmony_ci * Pad space is left for:
138c2ecf20Sopenharmony_ci * - 2 miscellaneous unsigned long values
148c2ecf20Sopenharmony_ci */
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#if defined(__mips64)
178c2ecf20Sopenharmony_cistruct msqid64_ds {
188c2ecf20Sopenharmony_ci	struct ipc64_perm msg_perm;
198c2ecf20Sopenharmony_ci	long msg_stime;			/* last msgsnd time */
208c2ecf20Sopenharmony_ci	long msg_rtime;			/* last msgrcv time */
218c2ecf20Sopenharmony_ci	long msg_ctime;			/* last change time */
228c2ecf20Sopenharmony_ci	unsigned long  msg_cbytes;	/* current number of bytes on queue */
238c2ecf20Sopenharmony_ci	unsigned long  msg_qnum;	/* number of messages in queue */
248c2ecf20Sopenharmony_ci	unsigned long  msg_qbytes;	/* max number of bytes on queue */
258c2ecf20Sopenharmony_ci	__kernel_pid_t msg_lspid;	/* pid of last msgsnd */
268c2ecf20Sopenharmony_ci	__kernel_pid_t msg_lrpid;	/* last receive pid */
278c2ecf20Sopenharmony_ci	unsigned long  __unused4;
288c2ecf20Sopenharmony_ci	unsigned long  __unused5;
298c2ecf20Sopenharmony_ci};
308c2ecf20Sopenharmony_ci#elif defined (__MIPSEB__)
318c2ecf20Sopenharmony_cistruct msqid64_ds {
328c2ecf20Sopenharmony_ci	struct ipc64_perm msg_perm;
338c2ecf20Sopenharmony_ci	unsigned long  msg_stime_high;
348c2ecf20Sopenharmony_ci	unsigned long  msg_stime;	/* last msgsnd time */
358c2ecf20Sopenharmony_ci	unsigned long  msg_rtime_high;
368c2ecf20Sopenharmony_ci	unsigned long  msg_rtime;	/* last msgrcv time */
378c2ecf20Sopenharmony_ci	unsigned long  msg_ctime_high;
388c2ecf20Sopenharmony_ci	unsigned long  msg_ctime;	/* last change time */
398c2ecf20Sopenharmony_ci	unsigned long  msg_cbytes;	/* current number of bytes on queue */
408c2ecf20Sopenharmony_ci	unsigned long  msg_qnum;	/* number of messages in queue */
418c2ecf20Sopenharmony_ci	unsigned long  msg_qbytes;	/* max number of bytes on queue */
428c2ecf20Sopenharmony_ci	__kernel_pid_t msg_lspid;	/* pid of last msgsnd */
438c2ecf20Sopenharmony_ci	__kernel_pid_t msg_lrpid;	/* last receive pid */
448c2ecf20Sopenharmony_ci	unsigned long  __unused4;
458c2ecf20Sopenharmony_ci	unsigned long  __unused5;
468c2ecf20Sopenharmony_ci};
478c2ecf20Sopenharmony_ci#elif defined (__MIPSEL__)
488c2ecf20Sopenharmony_cistruct msqid64_ds {
498c2ecf20Sopenharmony_ci	struct ipc64_perm msg_perm;
508c2ecf20Sopenharmony_ci	unsigned long  msg_stime;	/* last msgsnd time */
518c2ecf20Sopenharmony_ci	unsigned long  msg_stime_high;
528c2ecf20Sopenharmony_ci	unsigned long  msg_rtime;	/* last msgrcv time */
538c2ecf20Sopenharmony_ci	unsigned long  msg_rtime_high;
548c2ecf20Sopenharmony_ci	unsigned long  msg_ctime;	/* last change time */
558c2ecf20Sopenharmony_ci	unsigned long  msg_ctime_high;
568c2ecf20Sopenharmony_ci	unsigned long  msg_cbytes;	/* current number of bytes on queue */
578c2ecf20Sopenharmony_ci	unsigned long  msg_qnum;	/* number of messages in queue */
588c2ecf20Sopenharmony_ci	unsigned long  msg_qbytes;	/* max number of bytes on queue */
598c2ecf20Sopenharmony_ci	__kernel_pid_t msg_lspid;	/* pid of last msgsnd */
608c2ecf20Sopenharmony_ci	__kernel_pid_t msg_lrpid;	/* last receive pid */
618c2ecf20Sopenharmony_ci	unsigned long  __unused4;
628c2ecf20Sopenharmony_ci	unsigned long  __unused5;
638c2ecf20Sopenharmony_ci};
648c2ecf20Sopenharmony_ci#else
658c2ecf20Sopenharmony_ci#warning no endianess set
668c2ecf20Sopenharmony_ci#endif
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci#endif /* _ASM_MSGBUF_H */
69