162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
262306a36Sopenharmony_ci#ifndef __ASM_X64_MSGBUF_H
362306a36Sopenharmony_ci#define __ASM_X64_MSGBUF_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#if !defined(__x86_64__) || !defined(__ILP32__)
662306a36Sopenharmony_ci#include <asm-generic/msgbuf.h>
762306a36Sopenharmony_ci#else
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#include <asm/ipcbuf.h>
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci/*
1262306a36Sopenharmony_ci * The msqid64_ds structure for x86 architecture with x32 ABI.
1362306a36Sopenharmony_ci *
1462306a36Sopenharmony_ci * On x86-32 and x86-64 we can just use the generic definition, but
1562306a36Sopenharmony_ci * x32 uses the same binary layout as x86_64, which is different
1662306a36Sopenharmony_ci * from other 32-bit architectures.
1762306a36Sopenharmony_ci */
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_cistruct msqid64_ds {
2062306a36Sopenharmony_ci	struct ipc64_perm msg_perm;
2162306a36Sopenharmony_ci	__kernel_long_t msg_stime;	/* last msgsnd time */
2262306a36Sopenharmony_ci	__kernel_long_t msg_rtime;	/* last msgrcv time */
2362306a36Sopenharmony_ci	__kernel_long_t msg_ctime;	/* last change time */
2462306a36Sopenharmony_ci	__kernel_ulong_t msg_cbytes;	/* current number of bytes on queue */
2562306a36Sopenharmony_ci	__kernel_ulong_t msg_qnum;	/* number of messages in queue */
2662306a36Sopenharmony_ci	__kernel_ulong_t msg_qbytes;	/* max number of bytes on queue */
2762306a36Sopenharmony_ci	__kernel_pid_t msg_lspid;	/* pid of last msgsnd */
2862306a36Sopenharmony_ci	__kernel_pid_t msg_lrpid;	/* last receive pid */
2962306a36Sopenharmony_ci	__kernel_ulong_t __unused4;
3062306a36Sopenharmony_ci	__kernel_ulong_t __unused5;
3162306a36Sopenharmony_ci};
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci#endif
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci#endif /* __ASM_GENERIC_MSGBUF_H */
36