fix sem_close unmapping of still-referenced semaphore
[musl.git] / include / alltypes.h.in
blobd47aeea9aa8b8cf06a8eb64055d6d4a48cda2557
1 #define __LITTLE_ENDIAN 1234
2 #define __BIG_ENDIAN 4321
3 #define __USE_TIME_BITS64 1
5 TYPEDEF unsigned _Addr size_t;
6 TYPEDEF unsigned _Addr uintptr_t;
7 TYPEDEF _Addr ptrdiff_t;
8 TYPEDEF _Addr ssize_t;
9 TYPEDEF _Addr intptr_t;
10 TYPEDEF _Addr regoff_t;
11 TYPEDEF _Reg register_t;
12 TYPEDEF _Int64 time_t;
13 TYPEDEF _Int64 suseconds_t;
15 TYPEDEF signed char int8_t;
16 TYPEDEF signed short int16_t;
17 TYPEDEF signed int int32_t;
18 TYPEDEF signed _Int64 int64_t;
19 TYPEDEF signed _Int64 intmax_t;
20 TYPEDEF unsigned char uint8_t;
21 TYPEDEF unsigned short uint16_t;
22 TYPEDEF unsigned int uint32_t;
23 TYPEDEF unsigned _Int64 uint64_t;
24 TYPEDEF unsigned _Int64 u_int64_t;
25 TYPEDEF unsigned _Int64 uintmax_t;
27 TYPEDEF unsigned mode_t;
28 TYPEDEF unsigned _Reg nlink_t;
29 TYPEDEF _Int64 off_t;
30 TYPEDEF unsigned _Int64 ino_t;
31 TYPEDEF unsigned _Int64 dev_t;
32 TYPEDEF long blksize_t;
33 TYPEDEF _Int64 blkcnt_t;
34 TYPEDEF unsigned _Int64 fsblkcnt_t;
35 TYPEDEF unsigned _Int64 fsfilcnt_t;
37 TYPEDEF unsigned wint_t;
38 TYPEDEF unsigned long wctype_t;
40 TYPEDEF void * timer_t;
41 TYPEDEF int clockid_t;
42 TYPEDEF long clock_t;
43 STRUCT timeval { time_t tv_sec; suseconds_t tv_usec; };
44 STRUCT timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
46 TYPEDEF int pid_t;
47 TYPEDEF unsigned id_t;
48 TYPEDEF unsigned uid_t;
49 TYPEDEF unsigned gid_t;
50 TYPEDEF int key_t;
51 TYPEDEF unsigned useconds_t;
53 #ifdef __cplusplus
54 TYPEDEF unsigned long pthread_t;
55 #else
56 TYPEDEF struct __pthread * pthread_t;
57 #endif
58 TYPEDEF int pthread_once_t;
59 TYPEDEF unsigned pthread_key_t;
60 TYPEDEF int pthread_spinlock_t;
61 TYPEDEF struct { unsigned __attr; } pthread_mutexattr_t;
62 TYPEDEF struct { unsigned __attr; } pthread_condattr_t;
63 TYPEDEF struct { unsigned __attr; } pthread_barrierattr_t;
64 TYPEDEF struct { unsigned __attr[2]; } pthread_rwlockattr_t;
66 STRUCT _IO_FILE { char __x; };
67 TYPEDEF struct _IO_FILE FILE;
69 TYPEDEF __builtin_va_list va_list;
70 TYPEDEF __builtin_va_list __isoc_va_list;
72 TYPEDEF struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
74 TYPEDEF struct __locale_struct * locale_t;
76 TYPEDEF struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t;
78 STRUCT iovec { void *iov_base; size_t iov_len; };
80 STRUCT winsize { unsigned short ws_row, ws_col, ws_xpixel, ws_ypixel; };
82 TYPEDEF unsigned socklen_t;
83 TYPEDEF unsigned short sa_family_t;
85 TYPEDEF struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
86 TYPEDEF struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
87 TYPEDEF struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
88 TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
89 TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
90 TYPEDEF struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
91 TYPEDEF struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
93 #undef _Addr
94 #undef _Int64
95 #undef _Reg