acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
semun.h
1//
2// Created by camilo on 13/02/2021 <3TBS_!!
3// as copy of source excerpt at https://man7.org/tlpi/code/online/dist/svsem/semun.h.html
4//
5/* semun.h
6
7 Definition of the semun union used by the ::acmeacmesystem() V semaphore semop()
8 system call.
9*/
10
11
12#if !defined(__ANDROID__)
13#ifndef SEMUN_H
14#define SEMUN_H /* Prevent accidental ::f64 inclusion */
15
16#include <sys/types.h> /* For portability */
17#include <sys/sem.h>
18#if defined(__APPLE__)
19#include <sys/ipc.h>
20#endif
21
22//#if ! defined(__FreeBSD__) && ! defined(__OpenBSD__) &&
23#if ! defined(__OpenBSD__) && ! defined(__sgi) && ! defined(__APPLE__)
24/* Some implementations already declare this union */
25
26union semun { /* Used in calls to semctl() */
27 ::i32 val;
28 struct semid_ds * buf;
29 ::u16 * array;
30#if defined(__linux__)
31 struct seminfo * __buf;
32#endif
33};
34
35#endif
36
37#endif // !defined(SEMUN_H)
38#endif // !defined(__ANDROID__)
39
40
Definition semun.h:26