18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci#ifndef __ASM_X64_MSGBUF_H
38c2ecf20Sopenharmony_ci#define __ASM_X64_MSGBUF_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#if !defined(__x86_64__) || !defined(__ILP32__)
68c2ecf20Sopenharmony_ci#include <asm-generic/msgbuf.h>
78c2ecf20Sopenharmony_ci#else
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#include <asm/ipcbuf.h>
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci/*
128c2ecf20Sopenharmony_ci * The msqid64_ds structure for x86 architecture with x32 ABI.
138c2ecf20Sopenharmony_ci *
148c2ecf20Sopenharmony_ci * On x86-32 and x86-64 we can just use the generic definition, but
158c2ecf20Sopenharmony_ci * x32 uses the same binary layout as x86_64, which is differnet
168c2ecf20Sopenharmony_ci * from other 32-bit architectures.
178c2ecf20Sopenharmony_ci */
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_cistruct msqid64_ds {
208c2ecf20Sopenharmony_ci	struct ipc64_perm msg_perm;
218c2ecf20Sopenharmony_ci	__kernel_long_t msg_stime;	/* last msgsnd time */
228c2ecf20Sopenharmony_ci	__kernel_long_t msg_rtime;	/* last msgrcv time */
238c2ecf20Sopenharmony_ci	__kernel_long_t msg_ctime;	/* last change time */
248c2ecf20Sopenharmony_ci	__kernel_ulong_t msg_cbytes;	/* current number of bytes on queue */
258c2ecf20Sopenharmony_ci	__kernel_ulong_t msg_qnum;	/* number of messages in queue */
268c2ecf20Sopenharmony_ci	__kernel_ulong_t msg_qbytes;	/* max number of bytes on queue */
278c2ecf20Sopenharmony_ci	__kernel_pid_t msg_lspid;	/* pid of last msgsnd */
288c2ecf20Sopenharmony_ci	__kernel_pid_t msg_lrpid;	/* last receive pid */
298c2ecf20Sopenharmony_ci	__kernel_ulong_t __unused4;
308c2ecf20Sopenharmony_ci	__kernel_ulong_t __unused5;
318c2ecf20Sopenharmony_ci};
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#endif
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#endif /* __ASM_GENERIC_MSGBUF_H */
36