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