blob: 89de6cd9f0a778408600d51849caa3ee8971f93a [file] [log] [blame]
Greg Kroah-Hartman6f52b162017-11-01 15:08:43 +01001/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
H. Peter Anvin1965aae2008-10-22 22:26:29 -07002#ifndef _ASM_X86_SEMBUF_H
3#define _ASM_X86_SEMBUF_H
Thomas Gleixner003a46c2007-10-15 13:57:47 +02004
5/*
6 * The semid64_ds structure for x86 architecture.
7 * Note extra padding because this structure is passed back and forth
8 * between kernel and user space.
9 *
10 * Pad space is left for:
Thomas Gleixner003a46c2007-10-15 13:57:47 +020011 * - 2 miscellaneous 32-bit values
Arnd Bergmannc039dbd2015-05-05 23:05:19 +020012 *
13 * x86_64 and x32 incorrectly added padding here, so the structures
14 * are still incompatible with the padding on x86.
Thomas Gleixner003a46c2007-10-15 13:57:47 +020015 */
16struct semid64_ds {
17 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
Arnd Bergmannc039dbd2015-05-05 23:05:19 +020018#ifdef __i386__
19 unsigned long sem_otime; /* last semop time */
20 unsigned long sem_otime_high;
21 unsigned long sem_ctime; /* last change time */
22 unsigned long sem_ctime_high;
23#else
Thomas Gleixner003a46c2007-10-15 13:57:47 +020024 __kernel_time_t sem_otime; /* last semop time */
H.J. Lu38691652013-12-27 14:14:22 -080025 __kernel_ulong_t __unused1;
Thomas Gleixner003a46c2007-10-15 13:57:47 +020026 __kernel_time_t sem_ctime; /* last change time */
H.J. Lu38691652013-12-27 14:14:22 -080027 __kernel_ulong_t __unused2;
Arnd Bergmannc039dbd2015-05-05 23:05:19 +020028#endif
H.J. Lu38691652013-12-27 14:14:22 -080029 __kernel_ulong_t sem_nsems; /* no. of semaphores in array */
30 __kernel_ulong_t __unused3;
31 __kernel_ulong_t __unused4;
Thomas Gleixner003a46c2007-10-15 13:57:47 +020032};
33
H. Peter Anvin1965aae2008-10-22 22:26:29 -070034#endif /* _ASM_X86_SEMBUF_H */