18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci#ifndef _ASM_X86_SEMBUF_H
38c2ecf20Sopenharmony_ci#define _ASM_X86_SEMBUF_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <asm/ipcbuf.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci/*
88c2ecf20Sopenharmony_ci * The semid64_ds structure for x86 architecture.
98c2ecf20Sopenharmony_ci * Note extra padding because this structure is passed back and forth
108c2ecf20Sopenharmony_ci * between kernel and user space.
118c2ecf20Sopenharmony_ci *
128c2ecf20Sopenharmony_ci * Pad space is left for:
138c2ecf20Sopenharmony_ci * - 2 miscellaneous 32-bit values
148c2ecf20Sopenharmony_ci *
158c2ecf20Sopenharmony_ci * x86_64 and x32 incorrectly added padding here, so the structures
168c2ecf20Sopenharmony_ci * are still incompatible with the padding on x86.
178c2ecf20Sopenharmony_ci */
188c2ecf20Sopenharmony_cistruct semid64_ds {
198c2ecf20Sopenharmony_ci	struct ipc64_perm sem_perm;	/* permissions .. see ipc.h */
208c2ecf20Sopenharmony_ci#ifdef __i386__
218c2ecf20Sopenharmony_ci	unsigned long	sem_otime;	/* last semop time */
228c2ecf20Sopenharmony_ci	unsigned long	sem_otime_high;
238c2ecf20Sopenharmony_ci	unsigned long	sem_ctime;	/* last change time */
248c2ecf20Sopenharmony_ci	unsigned long	sem_ctime_high;
258c2ecf20Sopenharmony_ci#else
268c2ecf20Sopenharmony_ci	__kernel_long_t sem_otime;	/* last semop time */
278c2ecf20Sopenharmony_ci	__kernel_ulong_t __unused1;
288c2ecf20Sopenharmony_ci	__kernel_long_t sem_ctime;	/* last change time */
298c2ecf20Sopenharmony_ci	__kernel_ulong_t __unused2;
308c2ecf20Sopenharmony_ci#endif
318c2ecf20Sopenharmony_ci	__kernel_ulong_t sem_nsems;	/* no. of semaphores in array */
328c2ecf20Sopenharmony_ci	__kernel_ulong_t __unused3;
338c2ecf20Sopenharmony_ci	__kernel_ulong_t __unused4;
348c2ecf20Sopenharmony_ci};
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci#endif /* _ASM_X86_SEMBUF_H */
37