162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 262306a36Sopenharmony_ci#ifndef __ASM_X86_SHMBUF_H 362306a36Sopenharmony_ci#define __ASM_X86_SHMBUF_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#if !defined(__x86_64__) || !defined(__ILP32__) 662306a36Sopenharmony_ci#include <asm-generic/shmbuf.h> 762306a36Sopenharmony_ci#else 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#include <asm/ipcbuf.h> 1062306a36Sopenharmony_ci#include <asm/posix_types.h> 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci/* 1362306a36Sopenharmony_ci * The shmid64_ds structure for x86 architecture with x32 ABI. 1462306a36Sopenharmony_ci * 1562306a36Sopenharmony_ci * On x86-32 and x86-64 we can just use the generic definition, but 1662306a36Sopenharmony_ci * x32 uses the same binary layout as x86_64, which is different 1762306a36Sopenharmony_ci * from other 32-bit architectures. 1862306a36Sopenharmony_ci */ 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_cistruct shmid64_ds { 2162306a36Sopenharmony_ci struct ipc64_perm shm_perm; /* operation perms */ 2262306a36Sopenharmony_ci __kernel_size_t shm_segsz; /* size of segment (bytes) */ 2362306a36Sopenharmony_ci __kernel_long_t shm_atime; /* last attach time */ 2462306a36Sopenharmony_ci __kernel_long_t shm_dtime; /* last detach time */ 2562306a36Sopenharmony_ci __kernel_long_t shm_ctime; /* last change time */ 2662306a36Sopenharmony_ci __kernel_pid_t shm_cpid; /* pid of creator */ 2762306a36Sopenharmony_ci __kernel_pid_t shm_lpid; /* pid of last operator */ 2862306a36Sopenharmony_ci __kernel_ulong_t shm_nattch; /* no. of current attaches */ 2962306a36Sopenharmony_ci __kernel_ulong_t __unused4; 3062306a36Sopenharmony_ci __kernel_ulong_t __unused5; 3162306a36Sopenharmony_ci}; 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_cistruct shminfo64 { 3462306a36Sopenharmony_ci __kernel_ulong_t shmmax; 3562306a36Sopenharmony_ci __kernel_ulong_t shmmin; 3662306a36Sopenharmony_ci __kernel_ulong_t shmmni; 3762306a36Sopenharmony_ci __kernel_ulong_t shmseg; 3862306a36Sopenharmony_ci __kernel_ulong_t shmall; 3962306a36Sopenharmony_ci __kernel_ulong_t __unused1; 4062306a36Sopenharmony_ci __kernel_ulong_t __unused2; 4162306a36Sopenharmony_ci __kernel_ulong_t __unused3; 4262306a36Sopenharmony_ci __kernel_ulong_t __unused4; 4362306a36Sopenharmony_ci}; 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci#endif 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci#endif /* __ASM_X86_SHMBUF_H */ 48