summaryrefslogtreecommitdiff
path: root/include/arch/x86_64/asm/shmbuf.h
blob: c5400cdf0a37ebb5737c425142e0c3165ce4f2cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef __ASM_X86_SHMBUF_H
#define __ASM_X86_SHMBUF_H

#if !defined(__x86_64__) || !defined(__ILP32__)
#include <asm-generic/shmbuf.h>
#else

#include <asm/ipcbuf.h>
#include <asm/posix_types.h>

/*
 * The shmid64_ds structure for x86 architecture with x32 ABI.
 *
 * On x86-32 and x86-64 we can just use the generic definition, but
 * x32 uses the same binary layout as x86_64, which is different
 * from other 32-bit architectures.
 */

struct shmid64_ds {
	struct ipc64_perm shm_perm;  /* operation perms */
	__kernel_size_t shm_segsz;   /* size of segment (bytes) */
	__kernel_long_t shm_atime;   /* last attach time */
	__kernel_long_t shm_dtime;   /* last detach time */
	__kernel_long_t shm_ctime;   /* last change time */
	__kernel_pid_t shm_cpid;     /* pid of creator */
	__kernel_pid_t shm_lpid;     /* pid of last operator */
	__kernel_ulong_t shm_nattch; /* no. of current attaches */
	__kernel_ulong_t __unused4;
	__kernel_ulong_t __unused5;
};

struct shminfo64 {
	__kernel_ulong_t shmmax;
	__kernel_ulong_t shmmin;
	__kernel_ulong_t shmmni;
	__kernel_ulong_t shmseg;
	__kernel_ulong_t shmall;
	__kernel_ulong_t __unused1;
	__kernel_ulong_t __unused2;
	__kernel_ulong_t __unused3;
	__kernel_ulong_t __unused4;
};

#endif

#endif /* __ASM_X86_SHMBUF_H */