/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef __ASM_GENERIC_SHMBUF_H2#define __ASM_GENERIC_SHMBUF_H34#include <asm/bitsperlong.h>5#include <asm/ipcbuf.h>6#include <asm/posix_types.h>78/*9* The shmid64_ds structure for x86 architecture.10* Note extra padding because this structure is passed back and forth11* between kernel and user space.12*13* shmid64_ds was originally meant to be architecture specific, but14* everyone just ended up making identical copies without specific15* optimizations, so we may just as well all use the same one.16*17* 64 bit architectures use a 64-bit long time field here, while18* 32 bit architectures have a pair of unsigned long values.19* On big-endian systems, the lower half is in the wrong place.20*21*22* Pad space is left for:23* - 2 miscellaneous 32-bit values24*/2526struct shmid64_ds {27struct ipc64_perm shm_perm; /* operation perms */28__kernel_size_t shm_segsz; /* size of segment (bytes) */29#if __BITS_PER_LONG == 6430long shm_atime; /* last attach time */31long shm_dtime; /* last detach time */32long shm_ctime; /* last change time */33#else34unsigned long shm_atime; /* last attach time */35unsigned long shm_atime_high;36unsigned long shm_dtime; /* last detach time */37unsigned long shm_dtime_high;38unsigned long shm_ctime; /* last change time */39unsigned long shm_ctime_high;40#endif41__kernel_pid_t shm_cpid; /* pid of creator */42__kernel_pid_t shm_lpid; /* pid of last operator */43unsigned long shm_nattch; /* no. of current attaches */44unsigned long __unused4;45unsigned long __unused5;46};4748struct shminfo64 {49unsigned long shmmax;50unsigned long shmmin;51unsigned long shmmni;52unsigned long shmseg;53unsigned long shmall;54unsigned long __unused1;55unsigned long __unused2;56unsigned long __unused3;57unsigned long __unused4;58};5960#endif /* __ASM_GENERIC_SHMBUF_H */616263