xref: /aosp_15_r20/external/ltp/include/lapi/sem.h (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Worker // SPDX-License-Identifier: GPL-2.0-or-later
2*49cdfc7eSAndroid Build Coastguard Worker /*
3*49cdfc7eSAndroid Build Coastguard Worker  * Copyright (c) 2015 Linux Test Project
4*49cdfc7eSAndroid Build Coastguard Worker  */
5*49cdfc7eSAndroid Build Coastguard Worker #ifndef LAPI_SEM_H__
6*49cdfc7eSAndroid Build Coastguard Worker #define LAPI_SEM_H__
7*49cdfc7eSAndroid Build Coastguard Worker 
8*49cdfc7eSAndroid Build Coastguard Worker #include <sys/sem.h>
9*49cdfc7eSAndroid Build Coastguard Worker 
10*49cdfc7eSAndroid Build Coastguard Worker #ifdef HAVE_STRUCT_SEMUN
11*49cdfc7eSAndroid Build Coastguard Worker /* union semun is defined by including <sys/sem.h> */
12*49cdfc7eSAndroid Build Coastguard Worker #else
13*49cdfc7eSAndroid Build Coastguard Worker /* according to X/OPEN we have to define it ourselves */
14*49cdfc7eSAndroid Build Coastguard Worker union semun {
15*49cdfc7eSAndroid Build Coastguard Worker 	int val;                /* value for SETVAL */
16*49cdfc7eSAndroid Build Coastguard Worker 	struct semid_ds *buf;   /* buffer for IPC_STAT, IPC_SET */
17*49cdfc7eSAndroid Build Coastguard Worker 	unsigned short *array;  /* array for GETALL, SETALL */
18*49cdfc7eSAndroid Build Coastguard Worker 	/* Linux specific part: */
19*49cdfc7eSAndroid Build Coastguard Worker 	struct seminfo *__buf;  /* buffer for IPC_INFO */
20*49cdfc7eSAndroid Build Coastguard Worker };
21*49cdfc7eSAndroid Build Coastguard Worker #endif
22*49cdfc7eSAndroid Build Coastguard Worker 
23*49cdfc7eSAndroid Build Coastguard Worker #ifndef SEM_STAT_ANY
24*49cdfc7eSAndroid Build Coastguard Worker # define SEM_STAT_ANY 20
25*49cdfc7eSAndroid Build Coastguard Worker #endif
26*49cdfc7eSAndroid Build Coastguard Worker 
27*49cdfc7eSAndroid Build Coastguard Worker #ifndef SEMMSL
28*49cdfc7eSAndroid Build Coastguard Worker # define SEMMSL 32000
29*49cdfc7eSAndroid Build Coastguard Worker #endif
30*49cdfc7eSAndroid Build Coastguard Worker 
31*49cdfc7eSAndroid Build Coastguard Worker #endif /* LAPI_SEM_H__ */
32