xref: /openbmc/linux/arch/x86/include/uapi/asm/sembuf.h (revision 0b26ca68)
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _ASM_X86_SEMBUF_H
3 #define _ASM_X86_SEMBUF_H
4 
5 #include <asm/ipcbuf.h>
6 
7 /*
8  * The semid64_ds structure for x86 architecture.
9  * Note extra padding because this structure is passed back and forth
10  * between kernel and user space.
11  *
12  * Pad space is left for:
13  * - 2 miscellaneous 32-bit values
14  *
15  * x86_64 and x32 incorrectly added padding here, so the structures
16  * are still incompatible with the padding on x86.
17  */
18 struct semid64_ds {
19 	struct ipc64_perm sem_perm;	/* permissions .. see ipc.h */
20 #ifdef __i386__
21 	unsigned long	sem_otime;	/* last semop time */
22 	unsigned long	sem_otime_high;
23 	unsigned long	sem_ctime;	/* last change time */
24 	unsigned long	sem_ctime_high;
25 #else
26 	__kernel_long_t sem_otime;	/* last semop time */
27 	__kernel_ulong_t __unused1;
28 	__kernel_long_t sem_ctime;	/* last change time */
29 	__kernel_ulong_t __unused2;
30 #endif
31 	__kernel_ulong_t sem_nsems;	/* no. of semaphores in array */
32 	__kernel_ulong_t __unused3;
33 	__kernel_ulong_t __unused4;
34 };
35 
36 #endif /* _ASM_X86_SEMBUF_H */
37