Greg Kroah-Hartman | 6f52b16 | 2017-11-01 15:08:43 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 2 | #ifndef _ASM_X86_SEMBUF_H |
| 3 | #define _ASM_X86_SEMBUF_H |
Thomas Gleixner | 003a46c | 2007-10-15 13:57:47 +0200 | [diff] [blame] | 4 | |
| 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 Gleixner | 003a46c | 2007-10-15 13:57:47 +0200 | [diff] [blame] | 11 | * - 2 miscellaneous 32-bit values |
Arnd Bergmann | c039dbd | 2015-05-05 23:05:19 +0200 | [diff] [blame^] | 12 | * |
| 13 | * x86_64 and x32 incorrectly added padding here, so the structures |
| 14 | * are still incompatible with the padding on x86. |
Thomas Gleixner | 003a46c | 2007-10-15 13:57:47 +0200 | [diff] [blame] | 15 | */ |
| 16 | struct semid64_ds { |
| 17 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ |
Arnd Bergmann | c039dbd | 2015-05-05 23:05:19 +0200 | [diff] [blame^] | 18 | #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 Gleixner | 003a46c | 2007-10-15 13:57:47 +0200 | [diff] [blame] | 24 | __kernel_time_t sem_otime; /* last semop time */ |
H.J. Lu | 3869165 | 2013-12-27 14:14:22 -0800 | [diff] [blame] | 25 | __kernel_ulong_t __unused1; |
Thomas Gleixner | 003a46c | 2007-10-15 13:57:47 +0200 | [diff] [blame] | 26 | __kernel_time_t sem_ctime; /* last change time */ |
H.J. Lu | 3869165 | 2013-12-27 14:14:22 -0800 | [diff] [blame] | 27 | __kernel_ulong_t __unused2; |
Arnd Bergmann | c039dbd | 2015-05-05 23:05:19 +0200 | [diff] [blame^] | 28 | #endif |
H.J. Lu | 3869165 | 2013-12-27 14:14:22 -0800 | [diff] [blame] | 29 | __kernel_ulong_t sem_nsems; /* no. of semaphores in array */ |
| 30 | __kernel_ulong_t __unused3; |
| 31 | __kernel_ulong_t __unused4; |
Thomas Gleixner | 003a46c | 2007-10-15 13:57:47 +0200 | [diff] [blame] | 32 | }; |
| 33 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 34 | #endif /* _ASM_X86_SEMBUF_H */ |