xref: /OK3568_Linux_fs/kernel/arch/xtensa/include/uapi/asm/sembuf.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * include/asm-xtensa/sembuf.h
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * The semid64_ds structure for Xtensa architecture.
6*4882a593Smuzhiyun  *
7*4882a593Smuzhiyun  * This file is subject to the terms and conditions of the GNU General Public
8*4882a593Smuzhiyun  * License.  See the file "COPYING" in the main directory of this archive
9*4882a593Smuzhiyun  * for more details.
10*4882a593Smuzhiyun  *
11*4882a593Smuzhiyun  * Copyright (C) 2001 - 2005 Tensilica Inc.
12*4882a593Smuzhiyun  *
13*4882a593Smuzhiyun  * Note extra padding because this structure is passed back and forth
14*4882a593Smuzhiyun  * between kernel and user space.
15*4882a593Smuzhiyun  *
16*4882a593Smuzhiyun  * Pad space is left for:
17*4882a593Smuzhiyun  * - 2 miscellaneous 32-bit values
18*4882a593Smuzhiyun  *
19*4882a593Smuzhiyun  */
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun #ifndef _XTENSA_SEMBUF_H
22*4882a593Smuzhiyun #define _XTENSA_SEMBUF_H
23*4882a593Smuzhiyun 
24*4882a593Smuzhiyun #include <asm/byteorder.h>
25*4882a593Smuzhiyun #include <asm/ipcbuf.h>
26*4882a593Smuzhiyun 
27*4882a593Smuzhiyun struct semid64_ds {
28*4882a593Smuzhiyun 	struct ipc64_perm sem_perm;		/* permissions .. see ipc.h */
29*4882a593Smuzhiyun #ifdef __XTENSA_EL__
30*4882a593Smuzhiyun 	unsigned long	sem_otime;		/* last semop time */
31*4882a593Smuzhiyun 	unsigned long	sem_otime_high;
32*4882a593Smuzhiyun 	unsigned long	sem_ctime;		/* last change time */
33*4882a593Smuzhiyun 	unsigned long	sem_ctime_high;
34*4882a593Smuzhiyun #else
35*4882a593Smuzhiyun 	unsigned long	sem_otime_high;
36*4882a593Smuzhiyun 	unsigned long	sem_otime;		/* last semop time */
37*4882a593Smuzhiyun 	unsigned long	sem_ctime_high;
38*4882a593Smuzhiyun 	unsigned long	sem_ctime;		/* last change time */
39*4882a593Smuzhiyun #endif
40*4882a593Smuzhiyun 	unsigned long	sem_nsems;		/* no. of semaphores in array */
41*4882a593Smuzhiyun 	unsigned long	__unused3;
42*4882a593Smuzhiyun 	unsigned long	__unused4;
43*4882a593Smuzhiyun };
44*4882a593Smuzhiyun 
45*4882a593Smuzhiyun #endif /* __ASM_XTENSA_SEMBUF_H */
46