defer free of thread-local dlerror buffers from inconsistent context
[musl.git] / include / sys / sem.h
blob61cdb83d3fb3ec33c089a67d82d3908ccf3957f5
1 #ifndef _SYS_SEM_H
2 #define _SYS_SEM_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
7 #include <features.h>
9 #define __NEED_size_t
10 #define __NEED_pid_t
11 #define __NEED_time_t
12 #ifdef _GNU_SOURCE
13 #define __NEED_struct_timespec
14 #endif
15 #include <bits/alltypes.h>
17 #include <sys/ipc.h>
19 #define SEM_UNDO 0x1000
20 #define GETPID 11
21 #define GETVAL 12
22 #define GETALL 13
23 #define GETNCNT 14
24 #define GETZCNT 15
25 #define SETVAL 16
26 #define SETALL 17
28 #include <endian.h>
30 #include <bits/sem.h>
32 #define _SEM_SEMUN_UNDEFINED 1
34 #define SEM_STAT 18
35 #define SEM_INFO 19
36 #define SEM_STAT_ANY 20
38 struct seminfo {
39 int semmap;
40 int semmni;
41 int semmns;
42 int semmnu;
43 int semmsl;
44 int semopm;
45 int semume;
46 int semusz;
47 int semvmx;
48 int semaem;
51 struct sembuf {
52 unsigned short sem_num;
53 short sem_op;
54 short sem_flg;
57 int semctl(int, int, int, ...);
58 int semget(key_t, int, int);
59 int semop(int, struct sembuf *, size_t);
61 #ifdef _GNU_SOURCE
62 int semtimedop(int, struct sembuf *, size_t, const struct timespec *);
63 #endif
65 #ifdef __cplusplus
67 #endif
68 #endif