1 def SigSetType : NamedType<"sigset_t">;
2 def SigSetPtrType : PtrType<SigSetType>;
3 def ConstSigSetPtrType : ConstType<SigSetPtrType>;
4 def RestrictedSigSetType : RestrictedPtrType<SigSetType>;
5 def ConstRestrictedSigSetType : ConstType<RestrictedSigSetType>;
7 def SigInfoType : NamedType<"siginfo_t">;
8 def UnionSigVal : NamedType<"union sigval">;
10 def StructSigaction : NamedType<"struct sigaction">;
11 def StructSigactionPtr : PtrType<StructSigaction>;
12 def ConstStructSigactionPtr : ConstType<StructSigactionPtr>;
13 def RestrictedStructSigactionPtr : RestrictedPtrType<StructSigaction>;
14 def ConstRestrictedStructSigactionPtr : ConstType<RestrictedStructSigactionPtr>;
16 def PThreadStartT : NamedType<"__pthread_start_t">;
17 def PThreadTSSDtorT : NamedType<"__pthread_tss_dtor_t">;
18 def PThreadKeyT : NamedType<"pthread_key_t">;
19 def PThreadKeyTPtr : PtrType<PThreadKeyT>;
20 def PThreadOnceT : NamedType<"pthread_once_t">;
21 def PThreadOnceTPtr : PtrType<PThreadOnceT>;
22 def PThreadOnceCallback : NamedType<"__pthread_once_func_t">;
24 def InoT : NamedType<"ino_t">;
25 def UidT : NamedType<"uid_t">;
26 def GidT : NamedType<"gid_t">;
27 def DevT : NamedType<"dev_t">;
28 def ClockIdT : NamedType<"clockid_t">;
29 def RestrictedClockIdTPtr : RestrictedPtrType<ClockIdT>;
30 def BlkSizeT : NamedType<"blksize_t">;
31 def BlkCntT : NamedType<"blkcnt_t">;
32 def NLinkT : NamedType<"nlink_t">;
34 def StatType : NamedType<"struct stat">;
35 def StatTypePtr : PtrType<StatType>;
36 def RestrictedStatTypePtr : RestrictedPtrType<StatType>;
38 def DIR : NamedType<"DIR">;
39 def DIRPtr : PtrType<DIR>;
40 def DIRRestrictedPtr : RestrictedPtrType<DIR>;
41 def StructDirent : NamedType<"struct dirent">;
42 def StructDirentPtr : PtrType<StructDirent>;
43 def StructDirentPtrPtr : PtrType<StructDirentPtr>;
44 def ConstStructDirentPtrPtr : ConstType<StructDirentPtrPtr>;
46 def StructSchedParam : NamedType<"struct sched_param">;
47 def StructSchedParamPtr : PtrType<StructSchedParam>;
48 def ConstStructSchedParamPtr : ConstType<StructSchedParamPtr>;
50 def ExecArgvT : NamedType<"__exec_argv_t">;
51 def ExecEnvpT : NamedType<"__exec_envp_t">;
53 def AtForkCallbackT : NamedType<"__atfork_callback_t">;
55 def PosixSpawnFileActionsT : NamedType<"posix_spawn_file_actions_t">;
56 def PosixSpawnFileActionsTPtr : PtrType<PosixSpawnFileActionsT>;
57 def ConstPosixSpawnFileActionsTPtr : ConstType<PosixSpawnFileActionsTPtr>;
58 def PosixSpawnFileActionsTRestrictedPtr : RestrictedPtrType<PosixSpawnFileActionsT>;
60 def PosixSpawnAttrT : NamedType<"posix_spawnattr_t">;
61 def RestrictedPosixSpawnAttrTPtrType : RestrictedPtrType<PosixSpawnAttrT>;
63 def CcT : NamedType<"cc_t">;
64 def SpeedT : NamedType<"speed_t">;
65 def StructTermios : NamedType<"struct termios">;
66 def StructTermiosPtr : PtrType<StructTermios>;
67 def ConstStructTermiosPtr : ConstType<StructTermiosPtr>;
68 def TcFlagT : NamedType<"tcflag_t">;
70 def StackT : NamedType<"stack_t">;
71 def StackTPtr : PtrType<StackT>;
72 def RestrictedStackTPtr : RestrictedPtrType<StackT>;
73 def ConstRestrictedStackTPtr : ConstType<RestrictedStackTPtr>;
75 def FdSet : NamedType<"fd_set">;
76 def FdSetPtr : PtrType<FdSet>;
77 def RestrictedFdSetPtr : RestrictedPtrType<FdSet>;
79 def GetoptArgvT : NamedType<"__getoptargv_t">;
81 def SAFamilyType : NamedType<"sa_family_t">;
82 def SocklenType : NamedType<"socklen_t">;
83 def SocklenPtr : PtrType<SocklenType>;
85 def StructSockAddr : NamedType<"struct sockaddr">;
86 def StructSockAddrPtr : PtrType<StructSockAddr>;
87 def ConstStructSockAddrPtr : ConstType<StructSockAddrPtr>;
89 def StructMsghdr : NamedType<"struct msghdr">;
90 def StructMsghdrPtr : PtrType<StructMsghdr>;
91 def ConstStructMsghdrPtr : ConstType<StructMsghdrPtr>;
93 def StructIovec : NamedType<"struct iovec">;
94 def StructIovecPtr : PtrType<StructIovec>;
95 def ConstStructIovecPtr : ConstType<StructIovecPtr>;
97 def StructSockAddrUn : NamedType<"struct sockaddr_un">;
99 def StructStatvfs : NamedType<"struct statvfs">;
100 def StructStatvfsPtr : PtrType<StructStatvfs>;
101 def RestrictedStructStatvfsPtr : RestrictedPtrType<StructStatvfs>;
103 // The function pointer type for the predicate for lsearch, lfind
104 def LSearchCompareT : NamedType<"__lsearchcompare_t">;
106 def POSIX : StandardSpec<"POSIX"> {
107 PtrType CharPtr = PtrType<CharType>;
108 RestrictedPtrType RestrictedCharPtr = RestrictedPtrType<CharType>;
109 RestrictedPtrType CharRestrictedDoublePtr = RestrictedPtrType<CharPtr>;
110 ConstType ConstCharPtr = ConstType<CharPtr>;
111 ConstType ConstRestrictedCharPtr = ConstType<RestrictedCharPtr>;
113 NamedType ModeTType = NamedType<"mode_t">;
115 NamedType PThreadAttrTType = NamedType<"pthread_attr_t">;
116 PtrType PThreadAttrTPtr = PtrType<PThreadAttrTType>;
117 RestrictedPtrType RestrictedPThreadAttrTPtr = RestrictedPtrType<PThreadAttrTType>;
118 ConstType ConstPThreadAttrTPtr = ConstType<PThreadAttrTPtr>;
119 ConstType ConstRestrictedPThreadAttrTPtr = ConstType<RestrictedPThreadAttrTPtr>;
121 NamedType PThreadCondAttrTType = NamedType<"pthread_condattr_t">;
122 PtrType PThreadCondAttrTPtr = PtrType<PThreadCondAttrTType>;
123 ConstType ConstRestrictedPThreadCondAttrTPtr = ConstType<RestrictedPtrType<PThreadCondAttrTType>>;
125 NamedType PThreadRWLockAttrTType = NamedType<"pthread_rwlockattr_t">;
126 PtrType PThreadRWLockAttrTPtr = PtrType<PThreadRWLockAttrTType>;
127 ConstType ConstPThreadRWLockAttrTPtr = ConstType<PThreadRWLockAttrTPtr>;
128 RestrictedPtrType RestrictedPThreadRWLockAttrTPtr = RestrictedPtrType<PThreadRWLockAttrTType>;
129 ConstType ConstRestrictedPThreadRWLockAttrTPtr = ConstType<RestrictedPThreadRWLockAttrTPtr>;
131 NamedType PThreadMutexAttrTType = NamedType<"pthread_mutexattr_t">;
132 PtrType PThreadMutexAttrTPtr = PtrType<PThreadMutexAttrTType>;
133 RestrictedPtrType RestrictedPThreadMutexAttrTPtr = RestrictedPtrType<PThreadMutexAttrTType>;
134 ConstType ConstPThreadMutexAttrTPtr = ConstType<PThreadMutexAttrTPtr>;
135 ConstType ConstRestrictedPThreadMutexAttrTPtr = ConstType<RestrictedPThreadMutexAttrTPtr>;
137 NamedType PThreadMutexTType = NamedType<"pthread_mutex_t">;
138 PtrType PThreadMutexTPtr = PtrType<PThreadMutexTType>;
139 RestrictedPtrType RestrictedPThreadMutexTPtr = RestrictedPtrType<PThreadMutexTType>;
140 ConstType ConstPThreadMutexTPtr = ConstType<PThreadMutexTPtr>;
141 ConstType ConstRestrictedPThreadMutexTPtr = ConstType<RestrictedPThreadMutexTPtr>;
143 NamedType PThreadRWLockTType = NamedType<"pthread_rwlock_t">;
144 PtrType PThreadRWLockTPtr = PtrType<PThreadRWLockTType>;
145 RestrictedPtrType RestrictedPThreadRWLockTPtr = RestrictedPtrType<PThreadRWLockTType>;
147 NamedType PThreadSpinLockTType = NamedType<"pthread_spinlock_t">;
148 PtrType PThreadSpinLockTPtr = PtrType<PThreadSpinLockTType>;
150 PtrType PThreadTPtr = PtrType<PThreadTType>;
151 RestrictedPtrType RestrictedPThreadTPtr = RestrictedPtrType<PThreadTType>;
153 HeaderSpec Errno = HeaderSpec<
159 Macro<"EADDRNOTAVAIL">,
160 Macro<"EAFNOSUPPORT">,
168 Macro<"ECONNABORTED">,
169 Macro<"ECONNREFUSED">,
172 Macro<"EDESTADDRREQ">,
177 Macro<"EHOSTUNREACH">,
179 Macro<"EINPROGRESS">,
190 Macro<"ENAMETOOLONG">,
193 Macro<"ENETUNREACH">,
204 Macro<"ENOPROTOOPT">,
212 Macro<"ENOTRECOVERABLE">,
223 Macro<"EPROTONOSUPPORT">,
232 Macro<"EWOULDBLOCK">,
240 HeaderSpec DlFcn = HeaderSpec<
245 Macro<"RTLD_GLOBAL">,
264 [ArgSpec<ConstCharPtr>, ArgSpec<IntType>]
269 [ArgSpec<VoidRestrictedPtr>, ArgSpec<ConstCharRestrictedPtr>]
274 HeaderSpec FCntl = HeaderSpec<
286 [ArgSpec<ConstCharPtr>, ArgSpec<ModeTType>]
291 [ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<VarArgType>]
296 [ArgSpec<ConstCharPtr>, ArgSpec<IntType>, ArgSpec<VarArgType>]
301 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>, ArgSpec<VarArgType>]
306 HeaderSpec SysMMan = HeaderSpec<
309 // TODO: Add a facility to bunch macros into bitwise-or-able groups.
310 // POSIX requires it, so such thing should be captured in this spec.
317 Macro<"MAP_PRIVATE">,
356 [ArgSpec<VoidPtr>, ArgSpec<SizeTType>]
368 [ArgSpec<VoidPtr>, ArgSpec<SizeTType>]
373 [ArgSpec<VoidPtr>, ArgSpec<SizeTType>]
388 [ArgSpec<VoidPtr>, ArgSpec<SizeTType>, ArgSpec<IntType>]
393 [ArgSpec<ConstCharPtr>, ArgSpec<IntType>, ArgSpec<ModeTType>]
398 [ArgSpec<ConstCharPtr>]
403 HeaderSpec Signal = HeaderSpec<
426 ArgSpec<ConstRestrictedStructSigactionPtr>,
427 ArgSpec<RestrictedStructSigactionPtr>]
432 [ArgSpec<ConstRestrictedStackTPtr>, ArgSpec<RestrictedStackTPtr>]
437 [ArgSpec<SigSetPtrType>,
443 [ArgSpec<IntType>, ArgSpec<ConstRestrictedSigSetType>, ArgSpec<RestrictedSigSetType>]
448 [ArgSpec<SigSetPtrType>]
453 [ArgSpec<SigSetPtrType>,
459 [ArgSpec<SigSetPtrType>]
464 HeaderSpec UniStd = HeaderSpec<
481 RetValSpec<NoReturn>,
487 [ArgSpec<ConstCharPtr>, ArgSpec<IntType>]
492 [ArgSpec<ConstCharPtr>]
502 [ArgSpec<IntType>, ArgSpec<IntType>]
507 [ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<IntType>]
517 [ArgSpec<CharPtr>, ArgSpec<SizeTType>]
527 [ArgSpec<ConstCharPtr>, ArgSpec<ExecArgvT>]
532 [ArgSpec<ConstCharPtr>, ArgSpec<ExecArgvT>, ArgSpec<ExecEnvpT>]
547 [ArgSpec<IntType>, ArgSpec<OffTType>]
582 [ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
587 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>]
591 RetValSpec<OffTType>,
592 [ArgSpec<IntType>, ArgSpec<OffTType>, ArgSpec<IntType>]
596 RetValSpec<SSizeTType>,
597 [ArgSpec<IntType>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>, ArgSpec<OffTType>]
601 RetValSpec<SSizeTType>,
602 [ArgSpec<IntType>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>, ArgSpec<OffTType>]
606 RetValSpec<SSizeTType>,
607 [ArgSpec<IntType>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>]
611 RetValSpec<SSizeTType>,
612 [ArgSpec<ConstCharRestrictedPtr>, ArgSpec<CharRestrictedPtr>, ArgSpec<SizeTType>]
616 RetValSpec<SSizeTType>,
617 [ArgSpec<ConstCharRestrictedPtr>, ArgSpec<CharRestrictedPtr>, ArgSpec<SizeTType>]
622 [ArgSpec<ConstCharPtr>]
637 [ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
642 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>]
646 RetValSpec<OffTType>,
647 [ArgSpec<IntType>, ArgSpec<OffTType>, ArgSpec<IntType>]
652 [ArgSpec<IntPtr>] //TODO: make this int[2]
656 RetValSpec<SSizeTType>,
657 [ArgSpec<IntType>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>, ArgSpec<OffTType>]
661 RetValSpec<SSizeTType>,
662 [ArgSpec<IntType>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>, ArgSpec<OffTType>]
666 RetValSpec<SSizeTType>,
667 [ArgSpec<IntType>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>]
671 RetValSpec<SSizeTType>,
672 [ArgSpec<ConstCharRestrictedPtr>, ArgSpec<CharRestrictedPtr>, ArgSpec<SizeTType>]
676 RetValSpec<SSizeTType>,
677 [ArgSpec<ConstCharRestrictedPtr>, ArgSpec<CharRestrictedPtr>, ArgSpec<SizeTType>]
682 [ArgSpec<ConstCharPtr>]
686 RetValSpec<VoidType>,
687 [ArgSpec<ConstVoidRestrictedPtr>, ArgSpec<VoidPtr>, ArgSpec<SSizeTType>]
692 [ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
697 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>, ArgSpec<ConstCharPtr>]
705 "__llvm_libc_syscall",
706 RetValSpec<LongType>,
707 [ArgSpec<LongType>,ArgSpec<LongType>,ArgSpec<LongType>,ArgSpec<LongType>,ArgSpec<LongType>,ArgSpec<LongType>,ArgSpec<LongType>]
712 [ArgSpec<ConstCharPtr>, ArgSpec<OffTType>]
717 [ArgSpec<ConstCharPtr>]
722 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>]
726 RetValSpec<SSizeTType>,
727 [ArgSpec<IntType>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>]
732 [ArgSpec<IntType>, ArgSpec<GetoptArgvT>, ArgSpec<ConstCharPtr>]
736 ObjectSpec<"environ", "char **">,
756 HeaderSpec StdLib = HeaderSpec<
765 [ArgSpec<ConstCharPtr>]
770 HeaderSpec Sched = HeaderSpec<
773 [PidT, TimeTType, StructTimeSpec, StructSchedParam], // Types
784 [ArgSpec<PidT>, ArgSpec<ConstStructSchedParamPtr>]
790 [ArgSpec<PidT>, ArgSpec<StructSchedParamPtr>]
794 "sched_setscheduler",
800 "sched_getscheduler",
802 [ArgSpec<PidT>, ArgSpec<IntType>, ArgSpec<ConstStructSchedParamPtr>]
806 "sched_get_priority_min",
812 "sched_get_priority_max",
818 "sched_rr_get_interval",
820 [ArgSpec<PidT>, ArgSpec<StructTimeSpecPtr>]
825 HeaderSpec String = HeaderSpec<
838 [ArgSpec<VoidRestrictedPtr>,
839 ArgSpec<ConstVoidRestrictedPtr>,
846 [ArgSpec<VoidRestrictedPtr>,
847 ArgSpec<ConstVoidRestrictedPtr>,
853 [ArgSpec<RestrictedCharPtr>,
854 ArgSpec<ConstRestrictedCharPtr>]
859 [ArgSpec<RestrictedCharPtr>,
860 ArgSpec<ConstRestrictedCharPtr>,
865 RetValSpec<SizeTType>,
866 [ArgSpec<ConstCharPtr>, ArgSpec<SizeTType>]
871 [ArgSpec<RestrictedCharPtr>,
872 ArgSpec<ConstRestrictedCharPtr>,
873 ArgSpec<CharRestrictedDoublePtr>]
883 HeaderSpec CType = HeaderSpec<
897 NamedType RLimTType = NamedType<"rlim_t">;
898 NamedType StructRLimitType = NamedType<"struct rlimit">;
899 PtrType StructRLimitPtr = PtrType<StructRLimitType>;
900 ConstType ConstStructRLimitPtr = ConstType<StructRLimitType>;
901 HeaderSpec SysResource = HeaderSpec<
904 [RLimTType, StructRLimitType], // Types
910 [ArgSpec<StructRLimitPtr>]
915 [ArgSpec<ConstStructRLimitPtr>]
920 HeaderSpec SysStat = HeaderSpec<
942 [ArgSpec<ConstCharPtr>, ArgSpec<ModeTType>]
947 [ArgSpec<IntType>, ArgSpec<ModeTType>]
952 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<ModeTType>, ArgSpec<IntType>]
957 [ArgSpec<IntType>, ArgSpec<StatTypePtr>]
962 [ArgSpec<ConstRestrictedCharPtr>, ArgSpec<RestrictedStatTypePtr>]
967 [ArgSpec<ConstCharPtr>, ArgSpec<ModeTType>]
972 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<ModeTType>]
977 [ArgSpec<ConstRestrictedCharPtr>, ArgSpec<RestrictedStatTypePtr>]
982 HeaderSpec SysStatvfs = HeaderSpec<
985 [StructStatvfs], // Types
992 ArgSpec<ConstRestrictedCharPtr>,
993 ArgSpec<RestrictedStructStatvfsPtr>
1001 ArgSpec<StructStatvfsPtr>
1007 NamedType StructUtsName = NamedType<"struct utsname">;
1008 PtrType StructUtsNamePtr = PtrType<StructUtsName>;
1009 HeaderSpec SysUtsName = HeaderSpec<
1012 [StructUtsName], // Types
1017 RetValSpec<IntType>,
1018 [ArgSpec<StructUtsNamePtr>]
1023 HeaderSpec ArpaInet = HeaderSpec<
1031 RetValSpec<UInt32Type>,
1032 [ArgSpec<UInt32Type>]
1036 RetValSpec<UInt16Type>,
1037 [ArgSpec<UInt16Type>]
1041 RetValSpec<UInt32Type>,
1042 [ArgSpec<UInt32Type>]
1046 RetValSpec<UInt16Type>,
1047 [ArgSpec<UInt16Type>]
1052 HeaderSpec PThread = HeaderSpec<
1059 PThreadCondAttrTType,
1061 PThreadMutexAttrTType,
1063 PThreadOnceCallback,
1065 PThreadRWLockAttrTType,
1067 PThreadSpinLockTType,
1076 RetValSpec<IntType>,
1077 [ArgSpec<AtForkCallbackT>, ArgSpec<AtForkCallbackT>, ArgSpec<AtForkCallbackT>]
1080 "pthread_attr_init",
1081 RetValSpec<IntType>,
1082 [ArgSpec<PThreadAttrTPtr>]
1085 "pthread_attr_destroy",
1086 RetValSpec<IntType>,
1087 [ArgSpec<PThreadAttrTPtr>]
1090 "pthread_attr_getdetachstate",
1091 RetValSpec<IntType>,
1092 [ArgSpec<ConstPThreadAttrTPtr>, ArgSpec<IntPtr>]
1095 "pthread_attr_setdetachstate",
1096 RetValSpec<IntType>,
1097 [ArgSpec<PThreadAttrTPtr>, ArgSpec<IntType>]
1100 "pthread_attr_getguardsize",
1101 RetValSpec<IntType>,
1102 [ArgSpec<ConstRestrictedPThreadAttrTPtr>, ArgSpec<RestrictedSizeTPtr>]
1105 "pthread_attr_setguardsize",
1106 RetValSpec<IntType>,
1107 [ArgSpec<PThreadAttrTPtr>, ArgSpec<SizeTType>]
1110 "pthread_attr_getstacksize",
1111 RetValSpec<IntType>,
1112 [ArgSpec<ConstRestrictedPThreadAttrTPtr>, ArgSpec<RestrictedSizeTPtr>]
1115 "pthread_attr_setstacksize",
1116 RetValSpec<IntType>,
1117 [ArgSpec<PThreadAttrTPtr>, ArgSpec<SizeTType>]
1120 "pthread_attr_getstack",
1121 RetValSpec<IntType>,
1122 [ArgSpec<ConstRestrictedPThreadAttrTPtr>, ArgSpec<RestrictedVoidPtrPtr>, ArgSpec<RestrictedSizeTPtr>]
1125 "pthread_attr_setstack",
1126 RetValSpec<IntType>,
1127 [ArgSpec<PThreadAttrTPtr>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>]
1130 "pthread_condattr_destroy",
1131 RetValSpec<IntType>,
1132 [ArgSpec<PThreadCondAttrTPtr>]
1135 "pthread_condattr_getclock",
1136 RetValSpec<IntType>,
1137 [ArgSpec<ConstRestrictedPThreadCondAttrTPtr>, ArgSpec<RestrictedClockIdTPtr>]
1140 "pthread_condattr_getpshared",
1141 RetValSpec<IntType>,
1142 [ArgSpec<ConstRestrictedPThreadCondAttrTPtr>, ArgSpec<RestrictedIntPtr>]
1145 "pthread_condattr_init",
1146 RetValSpec<IntType>,
1147 [ArgSpec<PThreadCondAttrTPtr>]
1150 "pthread_condattr_setclock",
1151 RetValSpec<IntType>,
1152 [ArgSpec<PThreadCondAttrTPtr>, ArgSpec<ClockIdT>]
1155 "pthread_condattr_setpshared",
1156 RetValSpec<IntType>,
1157 [ArgSpec<PThreadCondAttrTPtr>, ArgSpec<IntType>]
1161 RetValSpec<IntType>,
1162 [ArgSpec<RestrictedPThreadTPtr>, ArgSpec<ConstRestrictedPThreadAttrTPtr>, ArgSpec<PThreadStartT>, ArgSpec<VoidPtr>]
1166 RetValSpec<IntType>,
1167 [ArgSpec<PThreadTType>, ArgSpec<VoidPtrPtr>]
1171 RetValSpec<IntType>,
1172 [ArgSpec<PThreadTType>]
1176 RetValSpec<NoReturn>,
1181 RetValSpec<PThreadTType>,
1186 RetValSpec<IntType>,
1187 [ArgSpec<PThreadTType>, ArgSpec<PThreadTType>]
1190 "pthread_mutexattr_init",
1191 RetValSpec<IntType>,
1192 [ArgSpec<PThreadMutexAttrTPtr>]
1195 "pthread_mutexattr_destroy",
1196 RetValSpec<IntType>,
1197 [ArgSpec<PThreadMutexAttrTPtr>]
1200 "pthread_mutexattr_gettype",
1201 RetValSpec<IntType>,
1202 [ArgSpec<ConstRestrictedPThreadMutexAttrTPtr>, ArgSpec<RestrictedIntPtr>]
1205 "pthread_mutexattr_settype",
1206 RetValSpec<IntType>,
1207 [ArgSpec<RestrictedPThreadMutexAttrTPtr>, ArgSpec<IntType>]
1210 "pthread_mutexattr_getrobust",
1211 RetValSpec<IntType>,
1212 [ArgSpec<ConstRestrictedPThreadMutexAttrTPtr>, ArgSpec<RestrictedIntPtr>]
1215 "pthread_mutexattr_setrobust",
1216 RetValSpec<IntType>,
1217 [ArgSpec<RestrictedPThreadMutexAttrTPtr>, ArgSpec<IntType>]
1220 "pthread_mutexattr_getpshared",
1221 RetValSpec<IntType>,
1222 [ArgSpec<ConstRestrictedPThreadMutexAttrTPtr>, ArgSpec<RestrictedIntPtr>]
1225 "pthread_mutexattr_setpshared",
1226 RetValSpec<IntType>,
1227 [ArgSpec<RestrictedPThreadMutexAttrTPtr>, ArgSpec<IntType>]
1230 "pthread_mutexattr_getprotocol",
1231 RetValSpec<IntType>,
1232 [ArgSpec<ConstRestrictedPThreadMutexAttrTPtr>, ArgSpec<RestrictedIntPtr>]
1235 "pthread_mutexattr_setprotocol",
1236 RetValSpec<IntType>,
1237 [ArgSpec<RestrictedPThreadMutexAttrTPtr>, ArgSpec<IntType>]
1240 "pthread_mutexattr_getprioceiling",
1241 RetValSpec<IntType>,
1242 [ArgSpec<ConstRestrictedPThreadMutexAttrTPtr>, ArgSpec<RestrictedIntPtr>]
1245 "pthread_mutexattr_setprioceiling",
1246 RetValSpec<IntType>,
1247 [ArgSpec<RestrictedPThreadMutexAttrTPtr>, ArgSpec<IntType>]
1250 "pthread_mutex_init",
1251 RetValSpec<IntType>,
1252 [ArgSpec<RestrictedPThreadMutexTPtr>, ArgSpec<ConstRestrictedPThreadMutexAttrTPtr>]
1255 "pthread_mutex_destroy",
1256 RetValSpec<IntType>,
1257 [ArgSpec<PThreadMutexTPtr>]
1260 "pthread_mutex_lock",
1261 RetValSpec<IntType>,
1262 [ArgSpec<PThreadMutexTPtr>]
1265 "pthread_mutex_unlock",
1266 RetValSpec<IntType>,
1267 [ArgSpec<PThreadMutexTPtr>]
1270 "pthread_key_create",
1271 RetValSpec<IntType>,
1272 [ArgSpec<PThreadKeyTPtr>, ArgSpec<PThreadTSSDtorT>]
1275 "pthread_key_delete",
1276 RetValSpec<IntType>,
1277 [ArgSpec<PThreadKeyT>]
1280 "pthread_getspecific",
1281 RetValSpec<VoidPtr>,
1282 [ArgSpec<PThreadKeyT>]
1285 "pthread_setspecific",
1286 RetValSpec<VoidPtr>,
1287 [ArgSpec<PThreadKeyT>, ArgSpec<ConstVoidPtr>]
1291 RetValSpec<IntType>,
1292 [ArgSpec<PThreadOnceTPtr>, ArgSpec<PThreadOnceCallback>]
1295 "pthread_rwlockattr_destroy",
1296 RetValSpec<IntType>,
1297 [ArgSpec<PThreadRWLockAttrTPtr>]
1300 "pthread_rwlockattr_getkind_np",
1301 RetValSpec<IntType>,
1302 [ArgSpec<PThreadRWLockAttrTPtr>, ArgSpec<IntPtr>]
1305 "pthread_rwlockattr_getpshared",
1306 RetValSpec<IntType>,
1307 [ArgSpec<ConstPThreadRWLockAttrTPtr>, ArgSpec<IntPtr>]
1310 "pthread_rwlockattr_init",
1311 RetValSpec<IntType>,
1312 [ArgSpec<PThreadRWLockAttrTPtr>]
1315 "pthread_rwlockattr_setkind_np",
1316 RetValSpec<IntType>,
1317 [ArgSpec<PThreadRWLockAttrTPtr>, ArgSpec<IntType>]
1320 "pthread_rwlockattr_setpshared",
1321 RetValSpec<IntType>,
1322 [ArgSpec<PThreadRWLockAttrTPtr>, ArgSpec<IntType>]
1325 "pthread_rwlock_init",
1326 RetValSpec<IntType>,
1327 [ArgSpec<PThreadRWLockTPtr>, ArgSpec<ConstRestrictedPThreadRWLockAttrTPtr>]
1330 "pthread_rwlock_tryrdlock",
1331 RetValSpec<IntType>,
1332 [ArgSpec<PThreadRWLockTPtr>]
1335 "pthread_rwlock_trywrlock",
1336 RetValSpec<IntType>,
1337 [ArgSpec<PThreadRWLockTPtr>]
1340 "pthread_rwlock_timedrdlock",
1341 RetValSpec<IntType>,
1342 [ArgSpec<RestrictedPThreadRWLockTPtr>, ArgSpec<ConstRestrictStructTimeSpecPtr>]
1345 "pthread_rwlock_timedwrlock",
1346 RetValSpec<IntType>,
1347 [ArgSpec<RestrictedPThreadRWLockTPtr>, ArgSpec<ConstRestrictStructTimeSpecPtr>]
1350 "pthread_rwlock_clockrdlock",
1351 RetValSpec<IntType>,
1352 [ArgSpec<RestrictedPThreadRWLockTPtr>, ArgSpec<ClockIdT>, ArgSpec<ConstRestrictStructTimeSpecPtr>]
1355 "pthread_rwlock_clockwrlock",
1356 RetValSpec<IntType>,
1357 [ArgSpec<RestrictedPThreadRWLockTPtr>, ArgSpec<ClockIdT>, ArgSpec<ConstRestrictStructTimeSpecPtr>]
1360 "pthread_rwlock_rdlock",
1361 RetValSpec<IntType>,
1362 [ArgSpec<PThreadRWLockTPtr>]
1365 "pthread_rwlock_wrlock",
1366 RetValSpec<IntType>,
1367 [ArgSpec<PThreadRWLockTPtr>]
1370 "pthread_rwlock_unlock",
1371 RetValSpec<IntType>,
1372 [ArgSpec<PThreadRWLockTPtr>]
1375 "pthread_rwlock_destroy",
1376 RetValSpec<IntType>,
1377 [ArgSpec<PThreadRWLockTPtr>]
1380 "pthread_spin_init",
1381 RetValSpec<IntType>,
1382 [ArgSpec<PThreadSpinLockTPtr>, ArgSpec<IntType>]
1385 "pthread_spin_destroy",
1386 RetValSpec<IntType>,
1387 [ArgSpec<PThreadSpinLockTPtr>]
1390 "pthread_spin_lock",
1391 RetValSpec<IntType>,
1392 [ArgSpec<PThreadSpinLockTPtr>]
1395 "pthread_spin_trylock",
1396 RetValSpec<IntType>,
1397 [ArgSpec<PThreadSpinLockTPtr>]
1400 "pthread_spin_unlock",
1401 RetValSpec<IntType>,
1402 [ArgSpec<PThreadSpinLockTPtr>]
1407 HeaderSpec StdIO = HeaderSpec<
1410 [OffTType], // Types
1415 RetValSpec<VoidType>,
1420 RetValSpec<VoidType>,
1425 RetValSpec<IntType>,
1430 RetValSpec<IntType>,
1435 RetValSpec<IntType>,
1440 RetValSpec<FILEPtr>,
1441 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>]
1446 HeaderSpec Dirent = HeaderSpec<
1449 [InoT, StructDirent, DIR], // Types
1454 RetValSpec<IntType>,
1455 [ArgSpec<ConstStructDirentPtrPtr>, ArgSpec<ConstStructDirentPtrPtr>]
1459 RetValSpec<IntType>,
1464 RetValSpec<IntType>,
1475 [ArgSpec<ConstCharPtr>]
1479 RetValSpec<StructDirentPtr>,
1485 HeaderSpec Time = HeaderSpec<
1488 [ClockIdT, StructTimeSpec, StructTimevalType], // Types
1493 RetValSpec<IntType>,
1494 [ArgSpec<ClockIdT>, ArgSpec<StructTimeSpecPtr>]
1498 RetValSpec<IntType>,
1499 [ArgSpec<StructTimevalPtr>, ArgSpec<VoidPtr>]
1503 RetValSpec<IntType>,
1504 [ArgSpec<ConstStructTimeSpecPtr>, ArgSpec<StructTimeSpecPtr>]
1509 HeaderSpec SysWait = HeaderSpec<
1512 [PidT, StructRUsage, SigInfoType],
1523 [ArgSpec<PidT>, ArgSpec<IntPtr>, ArgSpec<IntType>]
1528 HeaderSpec SysIOctl = HeaderSpec<
1538 HeaderSpec Spawn = HeaderSpec<
1541 [ModeTType, PosixSpawnAttrT, PidT, PosixSpawnFileActionsT],
1545 "posix_spawn_file_actions_addclose",
1546 RetValSpec<IntType>,
1547 [ArgSpec<PosixSpawnFileActionsTPtr>, ArgSpec<IntType>]
1550 "posix_spawn_file_actions_adddup2",
1551 RetValSpec<IntType>,
1552 [ArgSpec<PosixSpawnFileActionsTPtr>, ArgSpec<IntType>, ArgSpec<IntType>]
1555 "posix_spawn_file_actions_addopen",
1556 RetValSpec<IntType>,
1557 [ArgSpec<PosixSpawnFileActionsTRestrictedPtr>, ArgSpec<IntType>,
1558 ArgSpec<ConstCharRestrictedPtr>, ArgSpec<IntType>, ArgSpec<ModeTType>]
1561 "posix_spawn_file_actions_destroy",
1562 RetValSpec<IntType>,
1563 [ArgSpec<PosixSpawnFileActionsTPtr>]
1566 "posix_spawn_file_actions_init",
1567 RetValSpec<IntType>,
1568 [ArgSpec<PosixSpawnFileActionsTPtr>]
1572 RetValSpec<IntType>,
1573 [ArgSpec<RestrictedPidTPtr>, ArgSpec<ConstCharRestrictedPtr>,
1574 ArgSpec<PosixSpawnFileActionsTPtr>, ArgSpec<RestrictedPosixSpawnAttrTPtrType>,
1575 ArgSpec<ConstCharRestrictedPtrPtr>, ArgSpec<ConstCharRestrictedPtrPtr>]
1580 HeaderSpec Search = HeaderSpec<
1592 RetValSpec<IntType>,
1599 RetValSpec<VoidType>,
1604 RetValSpec<EntryTypePtr>,
1612 RetValSpec<VoidType>,
1620 RetValSpec<VoidType>,
1627 RetValSpec<VoidPtr>,
1629 ArgSpec<ConstVoidPtr>,
1630 ArgSpec<ConstVoidPtr>,
1633 ArgSpec<LSearchCompareT>
1639 HeaderSpec Termios = HeaderSpec<
1644 [CcT, PidT, SpeedT, StructTermios, TcFlagT], // Types
1650 [ArgSpec<ConstStructTermiosPtr>]
1655 [ArgSpec<ConstStructTermiosPtr>]
1660 [ArgSpec<StructTermiosPtr>, ArgSpec<SpeedT>]
1665 [ArgSpec<StructTermiosPtr>, ArgSpec<SpeedT>]
1669 RetValSpec<IntType>,
1674 RetValSpec<IntType>,
1675 [ArgSpec<IntType>, ArgSpec<IntType>]
1679 RetValSpec<IntType>,
1680 [ArgSpec<IntType>, ArgSpec<IntType>]
1684 RetValSpec<IntType>,
1685 [ArgSpec<IntType>, ArgSpec<StructTermiosPtr>]
1694 RetValSpec<IntType>,
1695 [ArgSpec<IntType>, ArgSpec<IntType>]
1699 RetValSpec<IntType>,
1700 [ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<StructTermiosPtr>]
1705 HeaderSpec SysSelect = HeaderSpec<
1708 [FdSet, SigSetType, StructTimevalType, StructTimeSpec, SuSecondsT, TimeTType],
1713 RetValSpec<IntType>,
1715 ArgSpec<IntType>, ArgSpec<RestrictedFdSetPtr>, ArgSpec<RestrictedFdSetPtr>,
1716 ArgSpec<RestrictedFdSetPtr>, ArgSpec<RestrictedStructTimevalPtr>
1722 HeaderSpec SysSocket = HeaderSpec<
1730 Macro<"SOCK_STREAM">,
1731 Macro<"SOCK_DGRAM">,
1734 Macro<"SOCK_SEQPACKET">,
1735 Macro<"SOCK_PACKET">,
1751 RetValSpec<IntType>,
1752 [ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<IntType>]
1756 RetValSpec<IntType>,
1757 [ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<IntPtr>]
1761 RetValSpec<IntType>,
1762 [ArgSpec<IntType>, ArgSpec<ConstStructSockAddrPtr>, ArgSpec<SocklenType>]
1766 RetValSpec<SSizeTType>,
1767 [ArgSpec<IntType>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>, ArgSpec<IntType>]
1771 RetValSpec<SSizeTType>,
1773 ArgSpec<IntType>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>,
1774 ArgSpec<IntType>, ArgSpec<ConstStructSockAddrPtr>,
1775 ArgSpec<SocklenType>
1780 RetValSpec<SSizeTType>,
1781 [ArgSpec<IntType>, ArgSpec<ConstStructMsghdrPtr>, ArgSpec<IntType>]
1785 RetValSpec<SSizeTType>,
1786 [ArgSpec<IntType>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>, ArgSpec<IntType>]
1790 RetValSpec<SSizeTType>,
1792 ArgSpec<IntType>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>,
1793 ArgSpec<IntType>, ArgSpec<StructSockAddrPtr>,
1799 RetValSpec<SSizeTType>,
1800 [ArgSpec<IntType>, ArgSpec<StructMsghdrPtr>, ArgSpec<IntType>]
1805 HeaderSpec SysTypes = HeaderSpec<
1819 PThreadCondAttrTType,
1821 PThreadMutexAttrTType,
1824 PThreadRWLockAttrTType,