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">;
84 def StructSockAddr : NamedType<"struct sockaddr">;
85 def StructSockAddrPtr : PtrType<StructSockAddr>;
86 def ConstStructSockAddrPtr : ConstType<StructSockAddrPtr>;
88 def StructSockAddrUn : NamedType<"struct sockaddr_un">;
90 def StructStatvfs : NamedType<"struct statvfs">;
91 def StructStatvfsPtr : PtrType<StructStatvfs>;
92 def RestrictedStructStatvfsPtr : RestrictedPtrType<StructStatvfs>;
94 def POSIX : StandardSpec<"POSIX"> {
95 PtrType CharPtr = PtrType<CharType>;
96 RestrictedPtrType RestrictedCharPtr = RestrictedPtrType<CharType>;
97 RestrictedPtrType CharRestrictedDoublePtr = RestrictedPtrType<CharPtr>;
98 ConstType ConstCharPtr = ConstType<CharPtr>;
99 ConstType ConstRestrictedCharPtr = ConstType<RestrictedCharPtr>;
101 NamedType ModeTType = NamedType<"mode_t">;
103 NamedType PThreadAttrTType = NamedType<"pthread_attr_t">;
104 PtrType PThreadAttrTPtr = PtrType<PThreadAttrTType>;
105 RestrictedPtrType RestrictedPThreadAttrTPtr = RestrictedPtrType<PThreadAttrTType>;
106 ConstType ConstPThreadAttrTPtr = ConstType<PThreadAttrTPtr>;
107 ConstType ConstRestrictedPThreadAttrTPtr = ConstType<RestrictedPThreadAttrTPtr>;
109 NamedType PThreadCondAttrTType = NamedType<"pthread_condattr_t">;
110 PtrType PThreadCondAttrTPtr = PtrType<PThreadCondAttrTType>;
111 ConstType ConstRestrictedPThreadCondAttrTPtr = ConstType<RestrictedPtrType<PThreadCondAttrTType>>;
113 NamedType PThreadRWLockAttrTType = NamedType<"pthread_rwlockattr_t">;
114 PtrType PThreadRWLockAttrTPtr = PtrType<PThreadRWLockAttrTType>;
115 ConstType ConstPThreadRWLockAttrTPtr = ConstType<PThreadRWLockAttrTPtr>;
116 RestrictedPtrType RestrictedPThreadRWLockAttrTPtr = RestrictedPtrType<PThreadRWLockAttrTType>;
117 ConstType ConstRestrictedPThreadRWLockAttrTPtr = ConstType<RestrictedPThreadRWLockAttrTPtr>;
119 NamedType PThreadMutexAttrTType = NamedType<"pthread_mutexattr_t">;
120 PtrType PThreadMutexAttrTPtr = PtrType<PThreadMutexAttrTType>;
121 RestrictedPtrType RestrictedPThreadMutexAttrTPtr = RestrictedPtrType<PThreadMutexAttrTType>;
122 ConstType ConstPThreadMutexAttrTPtr = ConstType<PThreadMutexAttrTPtr>;
123 ConstType ConstRestrictedPThreadMutexAttrTPtr = ConstType<RestrictedPThreadMutexAttrTPtr>;
125 NamedType PThreadMutexTType = NamedType<"pthread_mutex_t">;
126 PtrType PThreadMutexTPtr = PtrType<PThreadMutexTType>;
127 RestrictedPtrType RestrictedPThreadMutexTPtr = RestrictedPtrType<PThreadMutexTType>;
128 ConstType ConstPThreadMutexTPtr = ConstType<PThreadMutexTPtr>;
129 ConstType ConstRestrictedPThreadMutexTPtr = ConstType<RestrictedPThreadMutexTPtr>;
131 NamedType PThreadRWLockTType = NamedType<"pthread_rwlock_t">;
132 PtrType PThreadRWLockTPtr = PtrType<PThreadRWLockTType>;
133 RestrictedPtrType RestrictedPThreadRWLockTPtr = RestrictedPtrType<PThreadRWLockTType>;
135 PtrType PThreadTPtr = PtrType<PThreadTType>;
136 RestrictedPtrType RestrictedPThreadTPtr = RestrictedPtrType<PThreadTType>;
138 HeaderSpec Errno = HeaderSpec<
144 Macro<"EADDRNOTAVAIL">,
145 Macro<"EAFNOSUPPORT">,
153 Macro<"ECONNABORTED">,
154 Macro<"ECONNREFUSED">,
157 Macro<"EDESTADDRREQ">,
162 Macro<"EHOSTUNREACH">,
164 Macro<"EINPROGRESS">,
175 Macro<"ENAMETOOLONG">,
178 Macro<"ENETUNREACH">,
189 Macro<"ENOPROTOOPT">,
197 Macro<"ENOTRECOVERABLE">,
208 Macro<"EPROTONOSUPPORT">,
217 Macro<"EWOULDBLOCK">,
225 HeaderSpec DlFcn = HeaderSpec<
230 Macro<"RTLD_GLOBAL">,
249 [ArgSpec<ConstCharPtr>, ArgSpec<IntType>]
254 [ArgSpec<VoidRestrictedPtr>, ArgSpec<ConstCharRestrictedPtr>]
259 HeaderSpec FCntl = HeaderSpec<
271 [ArgSpec<ConstCharPtr>, ArgSpec<ModeTType>]
276 [ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<VarArgType>]
281 [ArgSpec<ConstCharPtr>, ArgSpec<IntType>, ArgSpec<VarArgType>]
286 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>, ArgSpec<VarArgType>]
291 HeaderSpec SysMMan = HeaderSpec<
294 // TODO: Add a facility to bunch macros into bitwise-or-able groups.
295 // POSIX requires it, so such thing should be captured in this spec.
302 Macro<"MAP_PRIVATE">,
341 [ArgSpec<VoidPtr>, ArgSpec<SizeTType>]
353 [ArgSpec<VoidPtr>, ArgSpec<SizeTType>]
358 [ArgSpec<VoidPtr>, ArgSpec<SizeTType>]
373 [ArgSpec<VoidPtr>, ArgSpec<SizeTType>, ArgSpec<IntType>]
378 [ArgSpec<ConstCharPtr>, ArgSpec<IntType>, ArgSpec<ModeTType>]
383 [ArgSpec<ConstCharPtr>]
388 HeaderSpec Signal = HeaderSpec<
411 ArgSpec<ConstRestrictedStructSigactionPtr>,
412 ArgSpec<RestrictedStructSigactionPtr>]
417 [ArgSpec<ConstRestrictedStackTPtr>, ArgSpec<RestrictedStackTPtr>]
422 [ArgSpec<SigSetPtrType>,
428 [ArgSpec<IntType>, ArgSpec<ConstRestrictedSigSetType>, ArgSpec<RestrictedSigSetType>]
433 [ArgSpec<SigSetPtrType>]
438 [ArgSpec<SigSetPtrType>,
444 [ArgSpec<SigSetPtrType>]
449 HeaderSpec UniStd = HeaderSpec<
466 RetValSpec<NoReturn>,
472 [ArgSpec<ConstCharPtr>, ArgSpec<IntType>]
477 [ArgSpec<ConstCharPtr>]
487 [ArgSpec<IntType>, ArgSpec<IntType>]
492 [ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<IntType>]
502 [ArgSpec<CharPtr>, ArgSpec<SizeTType>]
512 [ArgSpec<ConstCharPtr>, ArgSpec<ExecArgvT>]
517 [ArgSpec<ConstCharPtr>, ArgSpec<ExecArgvT>, ArgSpec<ExecEnvpT>]
532 [ArgSpec<IntType>, ArgSpec<OffTType>]
567 [ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
572 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>]
576 RetValSpec<OffTType>,
577 [ArgSpec<IntType>, ArgSpec<OffTType>, ArgSpec<IntType>]
581 RetValSpec<SSizeTType>,
582 [ArgSpec<IntType>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>, ArgSpec<OffTType>]
586 RetValSpec<SSizeTType>,
587 [ArgSpec<IntType>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>, ArgSpec<OffTType>]
591 RetValSpec<SSizeTType>,
592 [ArgSpec<IntType>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>]
596 RetValSpec<SSizeTType>,
597 [ArgSpec<ConstCharRestrictedPtr>, ArgSpec<CharRestrictedPtr>, ArgSpec<SizeTType>]
601 RetValSpec<SSizeTType>,
602 [ArgSpec<ConstCharRestrictedPtr>, ArgSpec<CharRestrictedPtr>, ArgSpec<SizeTType>]
607 [ArgSpec<ConstCharPtr>]
612 [ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
617 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>]
621 RetValSpec<OffTType>,
622 [ArgSpec<IntType>, ArgSpec<OffTType>, ArgSpec<IntType>]
627 [ArgSpec<IntPtr>] //TODO: make this int[2]
631 RetValSpec<SSizeTType>,
632 [ArgSpec<IntType>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>, ArgSpec<OffTType>]
636 RetValSpec<SSizeTType>,
637 [ArgSpec<IntType>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>, ArgSpec<OffTType>]
641 RetValSpec<SSizeTType>,
642 [ArgSpec<IntType>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>]
646 RetValSpec<SSizeTType>,
647 [ArgSpec<ConstCharRestrictedPtr>, ArgSpec<CharRestrictedPtr>, ArgSpec<SizeTType>]
651 RetValSpec<SSizeTType>,
652 [ArgSpec<ConstCharRestrictedPtr>, ArgSpec<CharRestrictedPtr>, ArgSpec<SizeTType>]
657 [ArgSpec<ConstCharPtr>]
661 RetValSpec<VoidType>,
662 [ArgSpec<ConstVoidRestrictedPtr>, ArgSpec<VoidPtr>, ArgSpec<SSizeTType>]
667 [ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
672 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>, ArgSpec<ConstCharPtr>]
680 "__llvm_libc_syscall",
681 RetValSpec<LongType>,
682 [ArgSpec<LongType>,ArgSpec<LongType>,ArgSpec<LongType>,ArgSpec<LongType>,ArgSpec<LongType>,ArgSpec<LongType>,ArgSpec<LongType>]
687 [ArgSpec<ConstCharPtr>, ArgSpec<OffTType>]
692 [ArgSpec<ConstCharPtr>]
697 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<IntType>]
701 RetValSpec<SSizeTType>,
702 [ArgSpec<IntType>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>]
707 [ArgSpec<IntType>, ArgSpec<GetoptArgvT>, ArgSpec<ConstCharPtr>]
711 ObjectSpec<"environ", "char **">,
731 HeaderSpec StdLib = HeaderSpec<
740 [ArgSpec<ConstCharPtr>]
745 HeaderSpec Sched = HeaderSpec<
748 [PidT, TimeTType, StructTimeSpec, StructSchedParam], // Types
759 [ArgSpec<PidT>, ArgSpec<ConstStructSchedParamPtr>]
765 [ArgSpec<PidT>, ArgSpec<StructSchedParamPtr>]
769 "sched_setscheduler",
775 "sched_getscheduler",
777 [ArgSpec<PidT>, ArgSpec<IntType>, ArgSpec<ConstStructSchedParamPtr>]
781 "sched_get_priority_min",
787 "sched_get_priority_max",
793 "sched_rr_get_interval",
795 [ArgSpec<PidT>, ArgSpec<StructTimeSpecPtr>]
800 HeaderSpec String = HeaderSpec<
813 [ArgSpec<VoidRestrictedPtr>,
814 ArgSpec<ConstVoidRestrictedPtr>,
821 [ArgSpec<VoidRestrictedPtr>,
822 ArgSpec<ConstVoidRestrictedPtr>,
828 [ArgSpec<RestrictedCharPtr>,
829 ArgSpec<ConstRestrictedCharPtr>]
834 [ArgSpec<RestrictedCharPtr>,
835 ArgSpec<ConstRestrictedCharPtr>,
840 RetValSpec<SizeTType>,
841 [ArgSpec<ConstCharPtr>, ArgSpec<SizeTType>]
846 [ArgSpec<RestrictedCharPtr>,
847 ArgSpec<ConstRestrictedCharPtr>,
848 ArgSpec<CharRestrictedDoublePtr>]
858 HeaderSpec CType = HeaderSpec<
872 NamedType RLimTType = NamedType<"rlim_t">;
873 NamedType StructRLimitType = NamedType<"struct rlimit">;
874 PtrType StructRLimitPtr = PtrType<StructRLimitType>;
875 ConstType ConstStructRLimitPtr = ConstType<StructRLimitType>;
876 HeaderSpec SysResource = HeaderSpec<
879 [RLimTType, StructRLimitType], // Types
885 [ArgSpec<StructRLimitPtr>]
890 [ArgSpec<ConstStructRLimitPtr>]
895 HeaderSpec SysStat = HeaderSpec<
917 [ArgSpec<ConstCharPtr>, ArgSpec<ModeTType>]
922 [ArgSpec<IntType>, ArgSpec<ModeTType>]
927 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<ModeTType>, ArgSpec<IntType>]
932 [ArgSpec<IntType>, ArgSpec<StatTypePtr>]
937 [ArgSpec<ConstRestrictedCharPtr>, ArgSpec<RestrictedStatTypePtr>]
942 [ArgSpec<ConstCharPtr>, ArgSpec<ModeTType>]
947 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>, ArgSpec<ModeTType>]
952 [ArgSpec<ConstRestrictedCharPtr>, ArgSpec<RestrictedStatTypePtr>]
957 HeaderSpec SysStatvfs = HeaderSpec<
960 [StructStatvfs], // Types
967 ArgSpec<ConstRestrictedCharPtr>,
968 ArgSpec<RestrictedStructStatvfsPtr>
976 ArgSpec<StructStatvfsPtr>
982 NamedType StructUtsName = NamedType<"struct utsname">;
983 PtrType StructUtsNamePtr = PtrType<StructUtsName>;
984 HeaderSpec SysUtsName = HeaderSpec<
987 [StructUtsName], // Types
993 [ArgSpec<StructUtsNamePtr>]
998 HeaderSpec ArpaInet = HeaderSpec<
1006 RetValSpec<UInt32Type>,
1007 [ArgSpec<UInt32Type>]
1011 RetValSpec<UInt16Type>,
1012 [ArgSpec<UInt16Type>]
1016 RetValSpec<UInt32Type>,
1017 [ArgSpec<UInt32Type>]
1021 RetValSpec<UInt16Type>,
1022 [ArgSpec<UInt16Type>]
1027 HeaderSpec PThread = HeaderSpec<
1034 PThreadCondAttrTType,
1036 PThreadMutexAttrTType,
1038 PThreadOnceCallback,
1040 PThreadRWLockAttrTType,
1050 RetValSpec<IntType>,
1051 [ArgSpec<AtForkCallbackT>, ArgSpec<AtForkCallbackT>, ArgSpec<AtForkCallbackT>]
1054 "pthread_attr_init",
1055 RetValSpec<IntType>,
1056 [ArgSpec<PThreadAttrTPtr>]
1059 "pthread_attr_destroy",
1060 RetValSpec<IntType>,
1061 [ArgSpec<PThreadAttrTPtr>]
1064 "pthread_attr_getdetachstate",
1065 RetValSpec<IntType>,
1066 [ArgSpec<ConstPThreadAttrTPtr>, ArgSpec<IntPtr>]
1069 "pthread_attr_setdetachstate",
1070 RetValSpec<IntType>,
1071 [ArgSpec<PThreadAttrTPtr>, ArgSpec<IntType>]
1074 "pthread_attr_getguardsize",
1075 RetValSpec<IntType>,
1076 [ArgSpec<ConstRestrictedPThreadAttrTPtr>, ArgSpec<RestrictedSizeTPtr>]
1079 "pthread_attr_setguardsize",
1080 RetValSpec<IntType>,
1081 [ArgSpec<PThreadAttrTPtr>, ArgSpec<SizeTType>]
1084 "pthread_attr_getstacksize",
1085 RetValSpec<IntType>,
1086 [ArgSpec<ConstRestrictedPThreadAttrTPtr>, ArgSpec<RestrictedSizeTPtr>]
1089 "pthread_attr_setstacksize",
1090 RetValSpec<IntType>,
1091 [ArgSpec<PThreadAttrTPtr>, ArgSpec<SizeTType>]
1094 "pthread_attr_getstack",
1095 RetValSpec<IntType>,
1096 [ArgSpec<ConstRestrictedPThreadAttrTPtr>, ArgSpec<RestrictedVoidPtrPtr>, ArgSpec<RestrictedSizeTPtr>]
1099 "pthread_attr_setstack",
1100 RetValSpec<IntType>,
1101 [ArgSpec<PThreadAttrTPtr>, ArgSpec<VoidPtr>, ArgSpec<SizeTType>]
1104 "pthread_condattr_destroy",
1105 RetValSpec<IntType>,
1106 [ArgSpec<PThreadCondAttrTPtr>]
1109 "pthread_condattr_getclock",
1110 RetValSpec<IntType>,
1111 [ArgSpec<ConstRestrictedPThreadCondAttrTPtr>, ArgSpec<RestrictedClockIdTPtr>]
1114 "pthread_condattr_getpshared",
1115 RetValSpec<IntType>,
1116 [ArgSpec<ConstRestrictedPThreadCondAttrTPtr>, ArgSpec<RestrictedIntPtr>]
1119 "pthread_condattr_init",
1120 RetValSpec<IntType>,
1121 [ArgSpec<PThreadCondAttrTPtr>]
1124 "pthread_condattr_setclock",
1125 RetValSpec<IntType>,
1126 [ArgSpec<PThreadCondAttrTPtr>, ArgSpec<ClockIdT>]
1129 "pthread_condattr_setpshared",
1130 RetValSpec<IntType>,
1131 [ArgSpec<PThreadCondAttrTPtr>, ArgSpec<IntType>]
1135 RetValSpec<IntType>,
1136 [ArgSpec<RestrictedPThreadTPtr>, ArgSpec<ConstRestrictedPThreadAttrTPtr>, ArgSpec<PThreadStartT>, ArgSpec<VoidPtr>]
1140 RetValSpec<IntType>,
1141 [ArgSpec<PThreadTType>, ArgSpec<VoidPtrPtr>]
1145 RetValSpec<IntType>,
1146 [ArgSpec<PThreadTType>]
1150 RetValSpec<NoReturn>,
1155 RetValSpec<PThreadTType>,
1160 RetValSpec<IntType>,
1161 [ArgSpec<PThreadTType>, ArgSpec<PThreadTType>]
1164 "pthread_mutexattr_init",
1165 RetValSpec<IntType>,
1166 [ArgSpec<PThreadMutexAttrTPtr>]
1169 "pthread_mutexattr_destroy",
1170 RetValSpec<IntType>,
1171 [ArgSpec<PThreadMutexAttrTPtr>]
1174 "pthread_mutexattr_gettype",
1175 RetValSpec<IntType>,
1176 [ArgSpec<ConstRestrictedPThreadMutexAttrTPtr>, ArgSpec<RestrictedIntPtr>]
1179 "pthread_mutexattr_settype",
1180 RetValSpec<IntType>,
1181 [ArgSpec<RestrictedPThreadMutexAttrTPtr>, ArgSpec<IntType>]
1184 "pthread_mutexattr_getrobust",
1185 RetValSpec<IntType>,
1186 [ArgSpec<ConstRestrictedPThreadMutexAttrTPtr>, ArgSpec<RestrictedIntPtr>]
1189 "pthread_mutexattr_setrobust",
1190 RetValSpec<IntType>,
1191 [ArgSpec<RestrictedPThreadMutexAttrTPtr>, ArgSpec<IntType>]
1194 "pthread_mutexattr_getpshared",
1195 RetValSpec<IntType>,
1196 [ArgSpec<ConstRestrictedPThreadMutexAttrTPtr>, ArgSpec<RestrictedIntPtr>]
1199 "pthread_mutexattr_setpshared",
1200 RetValSpec<IntType>,
1201 [ArgSpec<RestrictedPThreadMutexAttrTPtr>, ArgSpec<IntType>]
1204 "pthread_mutexattr_getprotocol",
1205 RetValSpec<IntType>,
1206 [ArgSpec<ConstRestrictedPThreadMutexAttrTPtr>, ArgSpec<RestrictedIntPtr>]
1209 "pthread_mutexattr_setprotocol",
1210 RetValSpec<IntType>,
1211 [ArgSpec<RestrictedPThreadMutexAttrTPtr>, ArgSpec<IntType>]
1214 "pthread_mutexattr_getprioceiling",
1215 RetValSpec<IntType>,
1216 [ArgSpec<ConstRestrictedPThreadMutexAttrTPtr>, ArgSpec<RestrictedIntPtr>]
1219 "pthread_mutexattr_setprioceiling",
1220 RetValSpec<IntType>,
1221 [ArgSpec<RestrictedPThreadMutexAttrTPtr>, ArgSpec<IntType>]
1224 "pthread_mutex_init",
1225 RetValSpec<IntType>,
1226 [ArgSpec<RestrictedPThreadMutexTPtr>, ArgSpec<ConstRestrictedPThreadMutexAttrTPtr>]
1229 "pthread_mutex_destroy",
1230 RetValSpec<IntType>,
1231 [ArgSpec<PThreadMutexTPtr>]
1234 "pthread_mutex_lock",
1235 RetValSpec<IntType>,
1236 [ArgSpec<PThreadMutexTPtr>]
1239 "pthread_mutex_unlock",
1240 RetValSpec<IntType>,
1241 [ArgSpec<PThreadMutexTPtr>]
1244 "pthread_key_create",
1245 RetValSpec<IntType>,
1246 [ArgSpec<PThreadKeyTPtr>, ArgSpec<PThreadTSSDtorT>]
1249 "pthread_key_delete",
1250 RetValSpec<IntType>,
1251 [ArgSpec<PThreadKeyT>]
1254 "pthread_getspecific",
1255 RetValSpec<VoidPtr>,
1256 [ArgSpec<PThreadKeyT>]
1259 "pthread_setspecific",
1260 RetValSpec<VoidPtr>,
1261 [ArgSpec<PThreadKeyT>, ArgSpec<ConstVoidPtr>]
1265 RetValSpec<IntType>,
1266 [ArgSpec<PThreadOnceTPtr>, ArgSpec<PThreadOnceCallback>]
1269 "pthread_rwlockattr_destroy",
1270 RetValSpec<IntType>,
1271 [ArgSpec<PThreadRWLockAttrTPtr>]
1274 "pthread_rwlockattr_getkind_np",
1275 RetValSpec<IntType>,
1276 [ArgSpec<PThreadRWLockAttrTPtr>, ArgSpec<IntPtr>]
1279 "pthread_rwlockattr_getpshared",
1280 RetValSpec<IntType>,
1281 [ArgSpec<ConstPThreadRWLockAttrTPtr>, ArgSpec<IntPtr>]
1284 "pthread_rwlockattr_init",
1285 RetValSpec<IntType>,
1286 [ArgSpec<PThreadRWLockAttrTPtr>]
1289 "pthread_rwlockattr_setkind_np",
1290 RetValSpec<IntType>,
1291 [ArgSpec<PThreadRWLockAttrTPtr>, ArgSpec<IntType>]
1294 "pthread_rwlockattr_setpshared",
1295 RetValSpec<IntType>,
1296 [ArgSpec<PThreadRWLockAttrTPtr>, ArgSpec<IntType>]
1299 "pthread_rwlock_init",
1300 RetValSpec<IntType>,
1301 [ArgSpec<PThreadRWLockTPtr>, ArgSpec<ConstRestrictedPThreadRWLockAttrTPtr>]
1304 "pthread_rwlock_tryrdlock",
1305 RetValSpec<IntType>,
1306 [ArgSpec<PThreadRWLockTPtr>]
1309 "pthread_rwlock_trywrlock",
1310 RetValSpec<IntType>,
1311 [ArgSpec<PThreadRWLockTPtr>]
1314 "pthread_rwlock_timedrdlock",
1315 RetValSpec<IntType>,
1316 [ArgSpec<RestrictedPThreadRWLockTPtr>, ArgSpec<ConstRestrictStructTimeSpecPtr>]
1319 "pthread_rwlock_timedwrlock",
1320 RetValSpec<IntType>,
1321 [ArgSpec<RestrictedPThreadRWLockTPtr>, ArgSpec<ConstRestrictStructTimeSpecPtr>]
1324 "pthread_rwlock_rdlock",
1325 RetValSpec<IntType>,
1326 [ArgSpec<PThreadRWLockTPtr>]
1329 "pthread_rwlock_wrlock",
1330 RetValSpec<IntType>,
1331 [ArgSpec<PThreadRWLockTPtr>]
1334 "pthread_rwlock_unlock",
1335 RetValSpec<IntType>,
1336 [ArgSpec<PThreadRWLockTPtr>]
1339 "pthread_rwlock_destroy",
1340 RetValSpec<IntType>,
1341 [ArgSpec<PThreadRWLockTPtr>]
1346 HeaderSpec StdIO = HeaderSpec<
1349 [OffTType], // Types
1354 RetValSpec<VoidType>,
1359 RetValSpec<VoidType>,
1364 RetValSpec<IntType>,
1369 RetValSpec<IntType>,
1374 RetValSpec<IntType>,
1379 RetValSpec<FILEPtr>,
1380 [ArgSpec<IntType>, ArgSpec<ConstCharPtr>]
1385 HeaderSpec Dirent = HeaderSpec<
1388 [InoT, StructDirent, DIR], // Types
1393 RetValSpec<IntType>,
1394 [ArgSpec<ConstStructDirentPtrPtr>, ArgSpec<ConstStructDirentPtrPtr>]
1398 RetValSpec<IntType>,
1403 RetValSpec<IntType>,
1414 [ArgSpec<ConstCharPtr>]
1418 RetValSpec<StructDirentPtr>,
1424 HeaderSpec Time = HeaderSpec<
1427 [ClockIdT, StructTimeSpec, StructTimevalType], // Types
1432 RetValSpec<IntType>,
1433 [ArgSpec<ClockIdT>, ArgSpec<StructTimeSpecPtr>]
1437 RetValSpec<IntType>,
1438 [ArgSpec<StructTimevalPtr>, ArgSpec<VoidPtr>]
1442 RetValSpec<IntType>,
1443 [ArgSpec<ConstStructTimeSpecPtr>, ArgSpec<StructTimeSpecPtr>]
1448 HeaderSpec SysWait = HeaderSpec<
1451 [PidT, StructRUsage, SigInfoType],
1462 [ArgSpec<PidT>, ArgSpec<IntPtr>, ArgSpec<IntType>]
1467 HeaderSpec SysIOctl = HeaderSpec<
1477 HeaderSpec Spawn = HeaderSpec<
1480 [ModeTType, PosixSpawnAttrT, PidT, PosixSpawnFileActionsT],
1484 "posix_spawn_file_actions_addclose",
1485 RetValSpec<IntType>,
1486 [ArgSpec<PosixSpawnFileActionsTPtr>, ArgSpec<IntType>]
1489 "posix_spawn_file_actions_adddup2",
1490 RetValSpec<IntType>,
1491 [ArgSpec<PosixSpawnFileActionsTPtr>, ArgSpec<IntType>, ArgSpec<IntType>]
1494 "posix_spawn_file_actions_addopen",
1495 RetValSpec<IntType>,
1496 [ArgSpec<PosixSpawnFileActionsTRestrictedPtr>, ArgSpec<IntType>,
1497 ArgSpec<ConstCharRestrictedPtr>, ArgSpec<IntType>, ArgSpec<ModeTType>]
1500 "posix_spawn_file_actions_destroy",
1501 RetValSpec<IntType>,
1502 [ArgSpec<PosixSpawnFileActionsTPtr>]
1505 "posix_spawn_file_actions_init",
1506 RetValSpec<IntType>,
1507 [ArgSpec<PosixSpawnFileActionsTPtr>]
1511 RetValSpec<IntType>,
1512 [ArgSpec<RestrictedPidTPtr>, ArgSpec<ConstCharRestrictedPtr>,
1513 ArgSpec<PosixSpawnFileActionsTPtr>, ArgSpec<RestrictedPosixSpawnAttrTPtrType>,
1514 ArgSpec<ConstCharRestrictedPtrPtr>, ArgSpec<ConstCharRestrictedPtrPtr>]
1519 HeaderSpec Search = HeaderSpec<
1530 RetValSpec<IntType>,
1537 RetValSpec<VoidType>,
1542 RetValSpec<EntryTypePtr>,
1550 RetValSpec<VoidType>,
1558 RetValSpec<VoidType>,
1566 HeaderSpec Termios = HeaderSpec<
1571 [CcT, PidT, SpeedT, StructTermios, TcFlagT], // Types
1577 [ArgSpec<ConstStructTermiosPtr>]
1582 [ArgSpec<ConstStructTermiosPtr>]
1587 [ArgSpec<StructTermiosPtr>, ArgSpec<SpeedT>]
1592 [ArgSpec<StructTermiosPtr>, ArgSpec<SpeedT>]
1596 RetValSpec<IntType>,
1601 RetValSpec<IntType>,
1602 [ArgSpec<IntType>, ArgSpec<IntType>]
1606 RetValSpec<IntType>,
1607 [ArgSpec<IntType>, ArgSpec<IntType>]
1611 RetValSpec<IntType>,
1612 [ArgSpec<IntType>, ArgSpec<StructTermiosPtr>]
1621 RetValSpec<IntType>,
1622 [ArgSpec<IntType>, ArgSpec<IntType>]
1626 RetValSpec<IntType>,
1627 [ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<StructTermiosPtr>]
1632 HeaderSpec SysSelect = HeaderSpec<
1635 [FdSet, SigSetType, StructTimevalType, StructTimeSpec, SuSecondsT, TimeTType],
1640 RetValSpec<IntType>,
1642 ArgSpec<IntType>, ArgSpec<RestrictedFdSetPtr>, ArgSpec<RestrictedFdSetPtr>,
1643 ArgSpec<RestrictedFdSetPtr>, ArgSpec<RestrictedStructTimevalPtr>
1649 HeaderSpec SysSocket = HeaderSpec<
1657 Macro<"SOCK_STREAM">,
1658 Macro<"SOCK_DGRAM">,
1661 Macro<"SOCK_SEQPACKET">,
1662 Macro<"SOCK_PACKET">,
1674 RetValSpec<IntType>,
1675 [ArgSpec<IntType>, ArgSpec<IntType>, ArgSpec<IntType>]
1679 RetValSpec<IntType>,
1680 [ArgSpec<IntType>, ArgSpec<ConstStructSockAddrPtr>, ArgSpec<SocklenType>]
1685 HeaderSpec SysTypes = HeaderSpec<
1699 PThreadCondAttrTType,
1701 PThreadMutexAttrTType,
1704 PThreadRWLockAttrTType,