• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
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 #endif /* LAPI_SEM_H__ */
28