summaryrefslogtreecommitdiff
path: root/lib/sys/sys+linux-x64.myr
blob: 61bb8b2df85ece344e1f41de02aa0c51fef10a8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
/*
  generated-ish source
  stitched for linux arch:x64
  edit with caution.
 */
pkg sys =
	type size	= int64		/* spans entire address space */
	type usize	= uint64	/* unsigned size */
	type off	= int64         /* file offsets */
	type intptr	= uint64	/* can hold any pointer losslessly */
	type time	= int64		/* milliseconds since epoch */
	type scno	= int64		/* syscall */
	type ioctlno	= int64		/* ioctl */
	
	/* processes/threads */
	type pid	= int	/* process id */
	type tid	= int	/* thread id */
	type cloneopt	= int64	/* options for clone(2) */
	
	/* file descriptor manipulation */
	type fdopt	= int64	/* fd options */
	type fd		= int32	/* fd */
	type whence	= uint64	/* seek from whence */
	type filemode	= uint32	/* file open mode */
	
	type mprot	= int64	/* memory protection */
	type mopt	= int64	/* memory mapping options */
	type socktype	= int64	/* socket type */
	type sockproto	= int32	/* socket protocol */
	type sockfam	= uint16	/* socket family */
	type sockopt	= int64
	type msgflags	= uint32
	type cmsgtype	= uint32
	
	type epollflags	= uint32
	type epollop	= uint32
	type epollevttype	= uint32
	
	type pollevt	= uint16
	
	type futexop	= uint32
	type signo	= int32
	type sigflags	= int64
	type fallocmode	= uint32
	type mfdflags	= uint32
	type aiocontext	= uint64
	type msg	= void#
	
	
	type clock = union
		`Clockrealtime
		`Clockmonotonic
		`Clockproccpu
		`Clockthreadcpu
		`Clockmonotonicraw
		`Clockrealtimecoarse
		`Clockmonotoniccoarse
		`Clockboottime
		`Clockrealtimealarm
		`Clockboottimealarm
	;;
	
	type waitstatus = union
		`Waitexit int32
		`Waitsig  int32
		`Waitstop int32
		`Waitfail int32
	;;
	
	type sigset = struct
		bits	: uint32[2]
	;;
	
	type sigaction = struct
		handler	: byte#	/* code pointer */
		flags	: sigflags
		restore	: byte#	/* code pointer */
		mask	: sigset
	;;
	
	const Sipadsz = 128
	type siginfo = struct
		signo	: int
		errno	: int
		code	: int
	
		_pad	: int[Sipadsz]
	;;
	
	/* union { int, void* } */
	type sigval = struct
		_pad	: void#
	;;
	
	const Sigevmaxsz = 64
	const Sigevpadsz = Sigevmaxsz / sizeof(int) - 4
	type sigevent = struct
		value	: sigval
		signo	: int
		notify	: int
		_pad	: int[Sigevpadsz]
	;;
	
	type timespec = struct
		sec	: int64
		nsec	: int64
	;;
	
	type timeval = struct
		sec	: int64
		usec	: int64
	;;
	
	type timex = struct
	        modes		: uint     	/* mode selector */
	        offset		: int64 	/* time offset (usec) */
	        freq		: int64		/* frequency offset (scaled ppm) */
	        maxerror	: int64		/* maximum error (usec) */
	        esterror	: int64		/* estimated error (usec) */
	        status		: int             /* clock command/status */
	        constant	: int64		/* pll time constant */
	        precision	: int64		/* clock precision (usec) (read only) */
	        tolerance	: int64		/* clock frequency tolerance (ppm) */
	        time		: timeval	/* (read only, except for ADJ_SETOFFSET) */
	        tick		: int64		/* (modified) usecs between clock ticks */
	
	        ppsfreq		: int64		/* pps frequency (scaled ppm) (ro) */
	        jitter		: int64		/* pps jitter (us) (ro) */
	        shift		: int		/* interval duration (s) (shift) (ro) */
	        stabil		: int64		/* pps stability (scaled ppm) (ro) */
	        jitcnt		: int64		/* jitter limit exceeded (ro) */
	        calcnt		: int64		/* calibration intervals (ro) */
	        errcnt		: int64		/* calibration errors (ro) */
	        stbcnt		: int64		/* stability limit exceeded (ro) */
	
	        tai		: int		/* TAI offset (ro) */
	
		__pad		: int[11]
	;;
	
	
	type rusage = struct
		utime	: timeval	/* user time */
		stime	: timeval	/* system time */
		_opaque	: uint64[14]	/* padding (darwin-specific data) */
	;;
	
	type sched_param = struct
		priority	: int
	;;
	
	type sched_attr = struct
	        size	: uint32
	        sched_policy	: uint32
	        sched_flags	: uint64
	
	        /* SCHED_NORMAL, SCHED_BATCH */
	        sched_nice	: int32
	
	        /* SCHED_FIFO, SCHED_RR */
	        sched_priority	: uint32
	
	        /* SCHED_DEADLINE */
	        sched_runtime	: uint64
	        sched_deadline	: uint64
	        sched_period	: uint64
	
	;;
	
	type statbuf = struct
		dev	: uint64
		ino	: uint64
		nlink	: uint64
		mode	: filemode
		uid	: uint32
		gid	: uint32
		__pad0	: uint32
		rdev	: uint64
		size	: uint64
		blksz	: uint32
		blocks	: uint64
		atime	: timespec
		mtime	: timespec
		ctime	: timespec
		__pad1	: uint64[3]
	;;
	
	type statfs = struct
		kind	: uint64
		bsize	: uint64
		blocks	: uint64
		bfree	: uint64
		bavail	: uint64
		files	: uint64
		ffree	: uint64
		fsid	: int[2]
		namelen	: uint64
		frsize	: uint64
		flags	: uint64
		spare	: uint64[4]
	;;
	
	type ustat = struct
	 	tfree	: uint32;		/* Number of free blocks.  */
	    	tinode	: uint64;		/* Number of free inodes.  */
		fname	: byte[6]
		fpack	: byte[6]
	;;
	
	type dirent64 = struct
		ino	: uint64
		off	: uint64
		reclen	: uint16
		etype	: byte
		name	: byte[...]	/* special case; zero length => unchecked indexing */
	;;
	
	type utsname = struct
		system	: byte[65]
		node	: byte[65]
		release	: byte[65]
		version	: byte[65]
		machine	: byte[65]
		domain	: byte[65]
	;;
	
	type sockaddr = struct
		fam	: sockfam
		data	: byte[14]
	;;
	
	type sockaddr_in = struct
		fam	: sockfam
		port	: uint16
		addr	: byte[4]
		zero	: byte[8]
	;;
	
	type sockaddr_in6 = struct
		fam	: sockfam
		port	: uint16
		addr	: byte[16]
		scope	: uint32
	;;
	
	type sockaddr_un = struct
		fam	: sockfam
		path	: byte[108]
	;;
	
	type sockaddr_storage = struct
		fam	: sockfam
		__align	: uint32
		__pad	: byte[112]
	;;
	
	type bpfgattr = void#
	type bpfmapattr = struct
		maptype	: uint32
		keysz	: uint32
		valsz	: uint32
		mapents	: uint32
		mapflg	: uint32
	;;
	
	type bpfeltattr = struct
		fd	: uint32
		key	: uint64
		val	: uint64
		flg	: uint64
	;;
	
	type bpfprogattr = struct
		kind	: uint32
		insncnt	: uint32
		insns	: uint64
		license	: uint64
		loglev	: uint32
		logsz	: uint32
		logbuf	: uint64
		kvers	: uint32
	;;
	
	type bpfobjattr = struct
		path	: uint64
		fd	: uint32
	;;
	
	type bfpattachattr = struct
		targfd	: uint32
		fd	: uint32
		kind	: uint32
		flags	: uint32
	;;
	
	type epollevt = struct
		events	: epollevttype
		data	: byte[8]
	;;
	
	type pollfd = struct
		fd	: fd
		events	: pollevt
		revents	: pollevt
	;;
	
	type file_handle = struct
		bytes	: uint
		kind	: int
		handle	: byte[...]
	;;
	
	type iovec = struct
		base	: byte#
		len	: uint64
	;;
	
	type semun = struct
		__pad	: void#
	;;
	
	type msgbuf = struct
		mtype	: int64
		buf	: byte[...]
	;;
	
	type msghdr = struct
		name		: sockaddr#
		namelen		: int32
		iov		: iovec#
		iovlen		: uint64
		control		: byte#
		controllen	: uint64
		flags		: msgflags
	;;
	
	type getcpu_cache = struct
		__opaque	: byte[128]
	;;
	
	type perf_event_attr = struct
		kind		: uint32
		size		: uint32
		config		: uint64
		timing		: uint64	/* frequency or period */
		samplekind	: uint64
		readformat	: uint64
		flags		: uint64
		wakeups		: uint32	/* events or watermarks */
		addr		: uint32	/* can also be extension of config */
		len		: uint32	/* can also be extension of config1 */
		brsamplekind	: uint64
		uregs		: uint64
		ustack		: uint32
		clockid		: int32
		intrregs	: uint64
		auxwatermark	: uint32
		samplestack	: uint16
		reserved	: uint16
	;;
	
	type mmsghdr = struct
		hdr	: msghdr
		len	: uint32
	;;
	
	type cmsghdr = struct
		len	: uint64
		level	: sockproto
		cmtype	: cmsgtype
		data	: byte[...]
	;;
	
	type capuserheader = struct
		version	: uint32
		pid	: int
	;;
	
	type capuserdata = struct
		effective	: uint32
		permitted	: uint32
		inheritable	: uint32
	;;
	
	type kexec_segment = struct
		buf	: void#
		bufsz	: size
		mem	: void#
		memsz	: size
	;;
	
	/* clone options */
	const Clonesignal	: cloneopt = 0xff
	const Clonevm		: cloneopt = 0x100
	const Clonefs		: cloneopt = 0x200
	const Clonefiles	: cloneopt = 0x400
	const Clonesighand	: cloneopt = 0x800
	const Cloneptrace	: cloneopt = 0x2000
	const Clonevfork	: cloneopt = 0x4000
	const Cloneparent	: cloneopt = 0x8000
	const Clonethread	: cloneopt = 0x10000
	const Clonenewns	: cloneopt = 0x20000
	const Clonesysvsem	: cloneopt = 0x40000
	const Clonesettls	: cloneopt = 0x80000
	const Cloneparentsettid	: cloneopt = 0x100000
	const Clonechildcleartid: cloneopt = 0x200000
	const Clonedetached	: cloneopt = 0x400000
	const Cloneuntraced	: cloneopt = 0x800000
	const Clonechildsettid	: cloneopt = 0x1000000
	const Clonenewuts	: cloneopt = 0x4000000
	const Clonenewipc	: cloneopt = 0x8000000
	const Clonenewuser	: cloneopt = 0x10000000
	const Clonenewpid	: cloneopt = 0x20000000
	const Clonenewnet	: cloneopt = 0x40000000
	const Cloneio		: cloneopt = 0x80000000
	
	type ptregs = struct
	;;
	
	/* open options */
	const Ordonly  	: fdopt = 0x0
	const Owronly  	: fdopt = 0x1
	const Ordwr    	: fdopt = 0x2
	const Ocreat   	: fdopt = 0x40
	const Oexcl  	: fdopt = 0x80
	const Otrunc   	: fdopt = 0x200
	const Oappend  	: fdopt = 0x400
	const Ondelay  	: fdopt = 0x800
	const Odirect	: fdopt = 0x4000
	const Olarge	: fdopt = 0x8000
	const Odir	: fdopt = 0x10000
	const Onofollow	: fdopt = 0x20000
	const Onoatime	: fdopt = 0x40000
	const Ocloexec	: fdopt = 0x80000
	
	/* stat modes */
	const Sifmt	: filemode = 0xf000
	const Sififo	: filemode = 0x1000
	const Sifchr	: filemode = 0x2000
	const Sifdir	: filemode = 0x4000
	const Sifblk	: filemode = 0x6000
	const Sifreg	: filemode = 0x8000
	const Siflnk	: filemode = 0xa000
	const Sifsock	: filemode = 0xc000
	
	/* mmap protection */
	const Mprotnone	: mprot = 0x0
	const Mprotrd	: mprot = 0x1
	const Mprotwr	: mprot = 0x2
	const Mprotexec	: mprot = 0x4
	const Mprotrw	: mprot = 0x3 /* convenience */
	
	/* mmap options */
	const Mshared	: mopt = 0x1
	const Mpriv	: mopt = 0x2
	const Mfixed	: mopt = 0x10
	const Mfile	: mopt = 0x0
	const Manon	: mopt = 0x20
	const M32bit	: mopt = 0x40
	
	/* socket families. INCOMPLETE. */
	const Afunspec	: sockfam = 0
	const Afunix	: sockfam = 1
	const Afinet	: sockfam = 2
	const Afinet6	: sockfam = 10
	
	/* socket types. */
	const Sockstream	: socktype = 1	/* sequenced, reliable byte stream */
	const Sockdgram		: socktype = 2	/* datagrams */
	const Sockraw		: socktype = 3	/* raw proto */
	const Sockrdm		: socktype = 4	/* reliably delivered messages */
	const Sockseqpacket	: socktype = 5	/* sequenced, reliable packets */
	const Sockdccp		: socktype = 6	/* data congestion control protocol */
	const Sockpack		: socktype = 10	/* linux specific packet */
	
	/* socket options */
	const Sodebug		: sockopt = 1
	const Soreuseaddr	: sockopt = 2
	const Sotype		: sockopt = 3
	const Soerror		: sockopt = 4
	const Sodontroute	: sockopt = 5
	const Sobroadcast	: sockopt = 6
	const Sosndbuf		: sockopt = 7
	const Sorcvbuf		: sockopt = 8
	const Sosndbufforce	: sockopt = 32
	const Sorcvbufforce	: sockopt = 33
	const Sokeepalive	: sockopt = 9
	const Sooobinline	: sockopt = 10
	const Sono_check	: sockopt = 11
	const Sopriority	: sockopt = 12
	const Solinger		: sockopt = 13
	const Sobsdcompat	: sockopt = 14
	const Soreuseport	: sockopt = 15
	const Sopasscred	: sockopt = 16
	const Sopeercred	: sockopt = 17
	const Sorcvlowat	: sockopt = 18
	const Sosndlowat	: sockopt = 19
	const Sorcvtimeo	: sockopt = 20
	const Sosndtimeo	: sockopt = 21
	
	/* socket option levels */
	const Solsocket		: sockproto = 1
	
	/* network protocols */
	const Ipproto_ip	: sockproto = 0
	const Ipproto_icmp	: sockproto = 1
	const Ipproto_tcp	: sockproto = 6
	const Ipproto_udp	: sockproto = 17
	const Ipproto_raw	: sockproto = 255
	
	/* message flags */
	const Msgoob		: msgflags = 0x0001
	const Msgpeek		: msgflags = 0x0002
	const Msgdontroute	: msgflags = 0x0004
	const Msgctrunc		: msgflags = 0x0008
	const Msgtrunc		: msgflags = 0x0020
	const Msgeor		: msgflags = 0x0080
	const Msgwaitall	: msgflags = 0x0100
	const Msgnosignal	: msgflags = 0x4000
	
	/* ancillary data */
	const Scmrights		: cmsgtype = 1
	
	/* epoll flags */
	const Epollcloexec	: epollflags	= 0o2000000
	
	/* epoll ops */
	const Epollctladd	: epollop	= 1
	const Epollctlmod	: epollop	= 2
	const Epollctldel	: epollop	= 3
	
	/* epoll events */
	const Epollin	: epollevttype = 0x001
	const Epollpri	: epollevttype = 0x002
	const Epollout	: epollevttype = 0x004
	const Epollerr	: epollevttype = 0x008
	const Epollhup	: epollevttype = 0x010
	const Epollrdnorm	: epollevttype = 0x040
	const Epollrdband	: epollevttype = 0x080
	const Epollwrnorm	: epollevttype = 0x100
	const Epollwrband	: epollevttype = 0x200
	const Epollmsg		: epollevttype = 0x400
	const Epollrdhup	: epollevttype = 0x2000
	const Epollwakeup	: epollevttype = 1 << 29
	const Epolloneshot	: epollevttype = 1 << 30
	const Epolledge	: epollevttype = 1 << 31
	
	/* futex ops */
	const Futexwait	: futexop = 0
	const Futexwake	: futexop = 1
	/* Futexfd: removed */
	const Futexrequeue	: futexop = 3
	const Futexcmprequeue	: futexop = 4
	const Futexwakeop	: futexop = 5
	const Futexlockpi	: futexop = 6
	const Futexunlockpi	: futexop = 7
	const Futextrylockpi	: futexop = 8
	const Futexwaitbitset	: futexop = 9
	const Futexwakebitset	: futexop = 10
	const Futexwaitrequeuepi	: futexop = 11
	const Futexcmprequeuepi	: futexop = 12
	
	const Futexpriv	: futexop = 128
	const Futexclockrt	: futexop = 256
	
	const Futexbitsetmatchany : int32 = -1
	
	/* poll events : posix */
	const Pollin	: pollevt = 0x001	/* There is data to read.  */
	const Pollpri	: pollevt = 0x002	/* There is urgent data to read.  */
	const Pollout	: pollevt = 0x004	/* Writing now will not block.  */
	const Pollerr	: pollevt = 0x008           /* Error condition.  */
	const Pollhup	: pollevt = 0x010           /* Hung up.  */
	const Pollnval	: pollevt = 0x020           /* Invalid polling request.  */
	
	/* poll events: xopen */
	const Pollrdnorm	: pollevt = 0x040	/* Normal data may be read.  */
	const Pollrdband	: pollevt = 0x080	/* Priority data may be read.  */
	const Pollwrnorm	: pollevt = 0x100	/* Writing now will not block.  */
	const Pollwrband	: pollevt = 0x200	/* Priority data may be written.  */
	
	/* poll events: linux */
	const Pollmsg		: pollevt = 0x400
	const Pollremove	: pollevt = 0x1000
	const Pollrdhup		: pollevt = 0x2000
	
	const Seekset	: whence = 0
	const Seekcur	: whence = 1
	const Seekend	: whence = 2
	
	/* return value for a failed mapping */
	const Mapbad	: byte# = (-1 : byte#)
	
	/* signal flags */
	const Sanocldstop	: sigflags = 0x00000001
	const Sanocldwait	: sigflags = 0x00000002
	const Sasiginfo		: sigflags = 0x00000004
	const Sarestorer	: sigflags = 0x04000000
	const Saonstack		: sigflags = 0x08000000
	const Sarestart		: sigflags = 0x10000000
	const Sanodefer		: sigflags = 0x40000000
	const Saresethand	: sigflags = 0x80000000
	const Sanomask		: sigflags = Sanodefer
	const Saoneshot		: sigflags = Saresethand
	
	/* signal numbers */
	const Sighup	: signo = 1
	const Sigint	: signo = 2
	const Sigquit	: signo = 3
	const Sigill	: signo = 4
	const Sigtrap	: signo = 5
	const Sigabrt	: signo = 6
	const Sigiot	: signo = 6
	const Sigbus	: signo = 7
	const Sigfpe	: signo = 8
	const Sigkill	: signo = 9
	const Sigusr1	: signo = 10
	const Sigsegv	: signo = 11
	const Sigusr2	: signo = 12
	const Sigpipe	: signo = 13
	const Sigalrm	: signo = 14
	const Sigterm	: signo = 15
	const Sigstkflt	: signo = 16
	const Sigchld	: signo = 17
	const Sigcont	: signo = 18
	const Sigstop	: signo = 19
	const Sigtstp	: signo = 20
	const Sigttin	: signo = 21
	const Sigttou	: signo = 22
	const Sigurg	: signo = 23
	const Sigxcpu	: signo = 24
	const Sigxfsz	: signo = 25
	const Sigvtalrm	: signo = 26
	const Sigprof	: signo = 27
	const Sigwinch	: signo = 28
	const Sigio	: signo = 29
	const Sigpoll	: signo = Sigio
	
	/* fallocate mode */
	const Fallockeepsize		: fallocmode = 0x01
	const Fallocpunchhole		: fallocmode = 0x02
	const Fallocnohidestale		: fallocmode = 0x04
	const Falloccollapserange	: fallocmode = 0x08
	const Falloczerorange		: fallocmode = 0x10
	const Fallocinsertrange		: fallocmode = 0x20
	
	/* memfd flags */
	const Mfdcloexec	: mfdflags = 0x01
	const Mfdallowsealing	: mfdflags = 0x02
	
	/* exported values: initialized by start code */
	extern var __cenvp : byte##
	
	type kernel_clock = int64
	type uid = uint
	type gid = uint
	type cap_user_header = user_cap_header_struct#
	type cap_user_data = user_cap_data_struct#
	type clockid = int
	type timer = void#
	type loff = int64
	type s64 = int64
	type s16 = int16
	type kernel_time = int64
	type fd_mask = int64
	type kernel_ulong = uint64
	type key = int
	type kernel_key = int
	type kernel_uid = uint
	type kernel_gid = uint
	type kernel_mode = uint
	type kernel_ipc_pid = int
	type kernel_long = int64
	type s32 = int
	
	type timezone = struct
		minuteswest	: int
		dsttime	: int
	
	;;
	
	type tms = struct
		utime	: kernel_clock
		stime	: kernel_clock
		cutime	: kernel_clock
		cstime	: kernel_clock
	
	;;
	
	type user_cap_header_struct = struct
		version	: uint32
		pid	: int
	
	;;
	
	type user_cap_data_struct = struct
		effective	: uint32
		permitted	: uint32
		inheritable	: uint32
	
	;;
	
	type sigaltstack = struct
		sp	: void#
		flags	: int
		size	: size
	
	;;
	
	type itimerval = struct
		interval	: timeval
		value	: timeval
	
	;;
	
	type itimerspec = struct
		interval	: timespec
		value	: timespec
	
	;;
	
	type io_event = struct
		data	: uint64
		obj	: uint64
		res	: s64
		res2	: s64
	
	;;
	
	type iocb = struct
		data	: uint64
		key	: uint32
		reserved1	: uint32
		lio_opcode	: uint16
		reqprio	: s16
		fildes	: uint32
		buf	: uint64
		nbytes	: uint64
		offset	: s64
		reserved2	: uint64
		flags	: uint32
		resfd	: uint32
	
	;;
	
	type utimbuf = struct
		actime	: kernel_time
		modtime	: kernel_time
	
	;;
	
	type fdset = struct
		bits	: fd_mask[16]
	
	;;
	
	type rlimit = struct
		cur	: kernel_ulong
		max	: kernel_ulong
	
	;;
	
	type rlimit64 = struct
		cur	: uint64
		max	: uint64
	
	;;
	
	type ipc_perm = struct
		key	: kernel_key
		uid	: kernel_uid
		gid	: kernel_gid
		cuid	: kernel_uid
		cgid	: kernel_gid
		mode	: kernel_mode
		seq	: uint16
	
	;;
	
	type msqid_ds = struct
		perm	: ipc_perm
		first	: msg#
		last	: msg#
		stime	: kernel_time
		rtime	: kernel_time
		ctime	: kernel_time
		lcbytes	: uint64
		lqbytes	: uint64
		cbytes	: uint16
		qnum	: uint16
		qbytes	: uint16
		lspid	: kernel_ipc_pid
		lrpid	: kernel_ipc_pid
	
	;;
	
	type sembuf = struct
		num	: uint16
		op	: int16
		flg	: int16
	
	;;
	
	type shmid_ds = struct
		perm	: ipc_perm
		segsz	: int
		atime	: kernel_time
		dtime	: kernel_time
		ctime	: kernel_time
		cpid	: kernel_ipc_pid
		lpid	: kernel_ipc_pid
		nattch	: uint16
		unused	: uint16
		unused2	: void#
		unused3	: void#
	
	;;
	
	type mq_attr = struct
		mq_flags	: kernel_long
		mq_maxmsg	: kernel_long
		mq_msgsize	: kernel_long
		mq_curmsgs	: kernel_long
		__reserved	: kernel_long[4]
	
	;;
	
	type sysctl_args = struct
		name	: int#
		nlen	: int
		oldval	: void#
		oldlenp	: size#
		newval	: void#
		newlen	: size
		__unused	: uint64[4]
	
	;;
	
	type sysinfo = struct
		uptime	: kernel_long
		loads	: kernel_ulong[3]
		totalram	: kernel_ulong
		freeram	: kernel_ulong
		sharedram	: kernel_ulong
		bufferram	: kernel_ulong
		totalswap	: kernel_ulong
		freeswap	: kernel_ulong
		procs	: uint16
		pad	: uint16
		totalhigh	: kernel_ulong
		freehigh	: kernel_ulong
		mem_unit	: uint32
		_f	: byte[0]
	
	;;
	
	type robust_list = struct
		next	: robust_list#
	
	;;
	
	type robust_list_head = struct
		list	: robust_list
		futex_offset	: int64
		list_op_pending	: robust_list#
	
	;;
	

	const Systime			: scno = 201
	const Sysgettimeofday		: scno = 96
	const Syssettimeofday		: scno = 164
	const Sysadjtimex		: scno = 159
	const Systimes			: scno = 100
	const Sysgettid			: scno = 186
	const Sysnanosleep		: scno = 35
	const Sysalarm			: scno = 37
	const Sysgetpid			: scno = 39
	const Sysgetppid		: scno = 110
	const Sysgetuid			: scno = 102
	const Sysgeteuid		: scno = 107
	const Sysgetgid			: scno = 104
	const Sysgetegid		: scno = 108
	const Sysgetresuid		: scno = 118
	const Sysgetresgid		: scno = 120
	const Sysgetpgid		: scno = 121
	const Sysgetpgrp		: scno = 111
	const Sysgetsid			: scno = 124
	const Sysgetgroups		: scno = 115
	const Syssetregid		: scno = 114
	const Syssetgid			: scno = 106
	const Syssetreuid		: scno = 113
	const Syssetuid			: scno = 105
	const Syssetresuid		: scno = 117
	const Syssetresgid		: scno = 119
	const Syssetfsuid		: scno = 122
	const Syssetfsgid		: scno = 123
	const Syssetpgid		: scno = 109
	const Syssetsid			: scno = 112
	const Syssetgroups		: scno = 116
	const Sysacct			: scno = 163
	const Syscapget			: scno = 125
	const Syscapset			: scno = 126
	const Syspersonality		: scno = 135
	const Syssigaltstack		: scno = 131
	const Sysgetitimer		: scno = 36
	const Syssetitimer		: scno = 38
	const Systimer_create		: scno = 222
	const Systimer_gettime		: scno = 224
	const Systimer_getoverrun	: scno = 225
	const Systimer_settime		: scno = 223
	const Systimer_delete		: scno = 226
	const Sysclock_settime		: scno = 227
	const Sysclock_gettime		: scno = 228
	const Sysclock_adjtime		: scno = 305
	const Sysclock_getres		: scno = 229
	const Sysclock_nanosleep	: scno = 230
	const Syssched_setscheduler	: scno = 144
	const Syssched_setparam		: scno = 142
	const Syssched_setattr		: scno = 314
	const Syssched_getscheduler	: scno = 145
	const Syssched_getparam		: scno = 143
	const Syssched_getattr		: scno = 315
	const Syssched_setaffinity	: scno = 203
	const Syssched_getaffinity	: scno = 204
	const Syssched_yield		: scno = 24
	const Syssched_get_priority_max	: scno = 146
	const Syssched_get_priority_min	: scno = 147
	const Syssched_rr_get_interval	: scno = 148
	const Syssetpriority		: scno = 141
	const Sysgetpriority		: scno = 140
	const Sysshutdown		: scno = 48
	const Sysreboot			: scno = 169
	const Sysrestart_syscall	: scno = 219
	const Syskexec_load		: scno = 246
	const Syskexec_file_load	: scno = 320
	const Sysexit			: scno = 60
	const Sysexit_group		: scno = 231
	const Syswait4			: scno = 61
	const Syswaitid			: scno = 247
	const Sysset_tid_address	: scno = 218
	const Sysfutex			: scno = 202
	const Sysinit_module		: scno = 175
	const Sysdelete_module		: scno = 176
	const Sysrt_sigsuspend		: scno = 130
	const Sysrt_sigaction		: scno = 13
	const Sysrt_sigprocmask		: scno = 14
	const Sysrt_sigpending		: scno = 127
	const Sysrt_sigtimedwait	: scno = 128
	const Sysrt_tgsigqueueinfo	: scno = 297
	const Syskill			: scno = 62
	const Systgkill			: scno = 234
	const Systkill			: scno = 200
	const Sysrt_sigqueueinfo	: scno = 129
	const Syspause			: scno = 34
	const Syssync			: scno = 162
	const Sysfsync			: scno = 74
	const Sysfdatasync		: scno = 75
	const Sysmount			: scno = 165
	const Sysumount2		: scno = 166
	const Systruncate		: scno = 76
	const Sysftruncate		: scno = 77
	const Sysstatfs			: scno = 137
	const Sysfstatfs		: scno = 138
	const Sysstat			: scno = 4
	const Syslstat			: scno = 6
	const Sysfstat			: scno = 5
	const Sysustat			: scno = 136
	const Syssetxattr		: scno = 188
	const Syslsetxattr		: scno = 189
	const Sysfsetxattr		: scno = 190
	const Sysgetxattr		: scno = 191
	const Syslgetxattr		: scno = 192
	const Sysfgetxattr		: scno = 193
	const Syslistxattr		: scno = 194
	const Sysllistxattr		: scno = 195
	const Sysflistxattr		: scno = 196
	const Sysremovexattr		: scno = 197
	const Syslremovexattr		: scno = 198
	const Sysfremovexattr		: scno = 199
	const Sysbrk			: scno = 12
	const Sysmprotect		: scno = 10
	const Sysmremap			: scno = 25
	const Sysremap_file_pages	: scno = 216
	const Sysmsync			: scno = 26
	const Sysfadvise		: scno = 0
	const Sysmunmap			: scno = 11
	const Sysmlock			: scno = 149
	const Sysmunlock		: scno = 150
	const Sysmlockall		: scno = 151
	const Sysmunlockall		: scno = 152
	const Sysmadvise		: scno = 28
	const Sysmincore		: scno = 27
	const Syspivot_root		: scno = 155
	const Syschroot			: scno = 161
	const Sysmknod			: scno = 133
	const Syslink			: scno = 86
	const Syssymlink		: scno = 88
	const Sysunlink			: scno = 87
	const Sysrename			: scno = 82
	const Syschmod			: scno = 90
	const Sysfchmod			: scno = 91
	const Sysfcntl			: scno = 72
	const Syspipe			: scno = 22
	const Syspipe2			: scno = 293
	const Sysdup			: scno = 32
	const Sysdup2			: scno = 33
	const Sysdup3			: scno = 292
	const Sysioperm			: scno = 173
	const Sysioctl			: scno = 16
	const Sysflock			: scno = 73
	const Sysio_setup		: scno = 206
	const Sysio_destroy		: scno = 207
	const Sysio_getevents		: scno = 208
	const Sysio_submit		: scno = 209
	const Sysio_cancel		: scno = 210
	const Syssendfile		: scno = 40
	const Sysreadlink		: scno = 89
	const Syscreat			: scno = 85
	const Sysopen			: scno = 2
	const Sysclose			: scno = 3
	const Sysaccess			: scno = 21
	const Sysvhangup		: scno = 153
	const Syschown			: scno = 92
	const Syslchown			: scno = 94
	const Sysfchown			: scno = 93
	const Sysutime			: scno = 132
	const Sysutimes			: scno = 235
	const Syslseek			: scno = 8
	const Sysread			: scno = 0
	const Sysreadahead		: scno = 187
	const Sysreadv			: scno = 19
	const Syswrite			: scno = 1
	const Syswritev			: scno = 20
	const Syspread			: scno = 17
	const Syspwrite			: scno = 18
	const Syspreadv			: scno = 295
	const Syspreadv2		: scno = 327
	const Syspwritev		: scno = 296
	const Syspwritev2		: scno = 328
	const Sysgetcwd			: scno = 79
	const Sysmkdir			: scno = 83
	const Syschdir			: scno = 80
	const Sysfchdir			: scno = 81
	const Sysrmdir			: scno = 84
	const Syslookup_dcookie		: scno = 212
	const Sysquotactl		: scno = 179
	const Sysgetdents64		: scno = 217
	const Syssetsockopt		: scno = 54
	const Sysgetsockopt		: scno = 55
	const Sysbind			: scno = 49
	const Sysconnect		: scno = 42
	const Sysaccept			: scno = 43
	const Sysaccept4		: scno = 288
	const Sysgetsockname		: scno = 51
	const Sysgetpeername		: scno = 52
	const Syssendto			: scno = 44
	const Syssendmsg		: scno = 46
	const Syssendmmsg		: scno = 307
	const Sysrecvfrom		: scno = 45
	const Sysrecvmsg		: scno = 47
	const Sysrecvmmsg		: scno = 299
	const Syssocket			: scno = 41
	const Syssocketpair		: scno = 53
	const Syslisten			: scno = 50
	const Syspoll			: scno = 7
	const Sysselect			: scno = 23
	const Sysepoll_create		: scno = 213
	const Sysepoll_create1		: scno = 291
	const Sysepoll_ctl		: scno = 233
	const Sysepoll_wait		: scno = 232
	const Sysepoll_pwait		: scno = 281
	const Syssethostname		: scno = 170
	const Syssetdomainname		: scno = 171
	const Sysuname			: scno = 63
	const Sysgetrlimit		: scno = 97
	const Syssetrlimit		: scno = 160
	const Sysprlimit		: scno = 0
	const Sysgetrusage		: scno = 98
	const Sysumask			: scno = 95
	const Sysmsgget			: scno = 68
	const Sysmsgsnd			: scno = 69
	const Sysmsgrcv			: scno = 70
	const Sysmsgctl			: scno = 71
	const Syssemget			: scno = 64
	const Syssemop			: scno = 65
	const Syssemctl			: scno = 66
	const Syssemtimedop		: scno = 220
	const Sysshmat			: scno = 30
	const Sysshmget			: scno = 29
	const Sysshmdt			: scno = 67
	const Sysshmctl			: scno = 31
	const Sysmq_open		: scno = 240
	const Sysmq_unlink		: scno = 241
	const Sysmq_timedsend		: scno = 242
	const Sysmq_timedreceive	: scno = 243
	const Sysmq_notify		: scno = 244
	const Sysmq_getsetattr		: scno = 245
	const Sysprctl			: scno = 157
	const Sysswapon			: scno = 167
	const Sysswapoff		: scno = 168
	const Sys_sysctl		: scno = 156
	const Syssysinfo		: scno = 99
	const Syssysfs			: scno = 139
	const Syssyslog			: scno = 103
	const Sysptrace			: scno = 101
	const Sysadd_key		: scno = 248
	const Sysrequest_key		: scno = 249
	const Syskeyctl			: scno = 250
	const Sysioprio_set		: scno = 251
	const Sysioprio_get		: scno = 252
	const Sysset_mempolicy		: scno = 238
	const Sysmigrate_pages		: scno = 256
	const Sysmove_pages		: scno = 279
	const Sysmbind			: scno = 237
	const Sysget_mempolicy		: scno = 239
	const Sysinotify_init		: scno = 253
	const Sysinotify_init1		: scno = 294
	const Sysinotify_add_watch	: scno = 254
	const Sysinotify_rm_watch	: scno = 255
	const Sysmknodat		: scno = 259
	const Sysmkdirat		: scno = 258
	const Sysunlinkat		: scno = 263
	const Syssymlinkat		: scno = 266
	const Syslinkat			: scno = 265
	const Sysrenameat		: scno = 264
	const Sysrenameat2		: scno = 316
	const Sysfutimesat		: scno = 261
	const Sysfaccessat		: scno = 269
	const Sysfchmodat		: scno = 268
	const Sysfchownat		: scno = 260
	const Sysopenat			: scno = 257
	const Sysnewfstatat		: scno = 262
	const Sysreadlinkat		: scno = 267
	const Sysutimensat		: scno = 280
	const Sysunshare		: scno = 272
	const Syssplice			: scno = 275
	const Sysvmsplice		: scno = 278
	const Systee			: scno = 276
	const Syssync_file_range	: scno = 277
	const Sysget_robust_list	: scno = 274
	const Sysset_robust_list	: scno = 273
	const Sysgetcpu			: scno = 309
	const Syssignalfd		: scno = 282
	const Syssignalfd4		: scno = 289
	const Systimerfd_create		: scno = 283
	const Systimerfd_settime	: scno = 286
	const Systimerfd_gettime	: scno = 287
	const Syseventfd		: scno = 284
	const Syseventfd2		: scno = 290
	const Sysmemfd_create		: scno = 319
	const Sysuserfaultfd		: scno = 323
	const Sysfallocate		: scno = 285
	const Syspselect6		: scno = 270
	const Sysppoll			: scno = 271
	const Sysfanotify_init		: scno = 300
	const Sysfanotify_mark		: scno = 301
	const Syssyncfs			: scno = 306
	const Sysfork			: scno = 57
	const Sysvfork			: scno = 58
	const Sysclone			: scno = 56
	const Sysexecve			: scno = 59
	const Sysperf_event_open	: scno = 298
	const Sysmmap			: scno = 9
	const Sysname_to_handle_at	: scno = 303
	const Sysopen_by_handle_at	: scno = 304
	const Syssetns			: scno = 308
	const Sysprocess_vm_readv	: scno = 310
	const Sysprocess_vm_writev	: scno = 311
	const Syskcmp			: scno = 312
	const Sysfinit_module		: scno = 313
	const Sysseccomp		: scno = 317
	const Sysgetrandom		: scno = 318
	const Sysbpf			: scno = 321
	const Sysexecveat		: scno = 322
	const Sysmembarrier		: scno = 324
	const Syscopy_file_range	: scno = 326
	const Sysmlock2			: scno = 325
	const Syspkey_mprotect		: scno = 329
	const Syspkey_alloc		: scno = 330
	const Syspkey_free		: scno = 331

	const Tcsetaf		: ioctlno = 0x00005408
	const Tcsbrk		: ioctlno = 0x00005409
	const Tcxonc		: ioctlno = 0x0000540A
	const Tcflsh		: ioctlno = 0x0000540B
	const Tiocexcl		: ioctlno = 0x0000540C
	const Tiocnxcl		: ioctlno = 0x0000540D
	const Tiocsctty		: ioctlno = 0x0000540E
	const Tiocgpgrp		: ioctlno = 0x0000540F
	const Tiocspgrp		: ioctlno = 0x00005410
	const Tiocoutq		: ioctlno = 0x00005411
	const Tiocsti		: ioctlno = 0x00005412
	const Tiocgwinsz	: ioctlno = 0x00005413
	const Tiocswinsz	: ioctlno = 0x00005414
	const Tiocmget		: ioctlno = 0x00005415
	const Tiocmbis		: ioctlno = 0x00005416
	const Tiocmbic		: ioctlno = 0x00005417
	const Tiocmset		: ioctlno = 0x00005418
	const Tiocgsoftcar	: ioctlno = 0x00005419
	const Tiocssoftcar	: ioctlno = 0x0000541A
	const Fionread		: ioctlno = 0x0000541B
	const Tiocinq		: ioctlno = 0x0000541B
	const Tioclinux		: ioctlno = 0x0000541C
	const Tioccons		: ioctlno = 0x0000541D
	const Tiocgserial	: ioctlno = 0x0000541E
	const Tiocsserial	: ioctlno = 0x0000541F
	const Tiocpkt		: ioctlno = 0x00005420
	const Fionbio		: ioctlno = 0x00005421
	const Tiocnotty		: ioctlno = 0x00005422
	const Tiocsetd		: ioctlno = 0x00005423
	const Tiocgetd		: ioctlno = 0x00005424
	const Tcsbrkp		: ioctlno = 0x00005425
	const Tiocttygstruct	: ioctlno = 0x00005426
	const Fionclex		: ioctlno = 0x00005450
	const Fioclex		: ioctlno = 0x00005451
	const Fioasync		: ioctlno = 0x00005452
	const Tiocserconfig	: ioctlno = 0x00005453
	const Tiocsergwild	: ioctlno = 0x00005454
	const Tiocserswild	: ioctlno = 0x00005455
	const Tiocglcktrmios	: ioctlno = 0x00005456
	const Tiocslcktrmios	: ioctlno = 0x00005457
	const Tiocsergstruct	: ioctlno = 0x00005458
	const Tiocsergetlsr	: ioctlno = 0x00005459

	/* start manual overrides { */
	extern const syscall	: (sc:scno, args:... -> int64)
	extern const sigreturn	: (-> void)
	const exit	: (status:int -> void)
	const exit_group	: (status:int -> void)
	const getpid	: ( -> pid)
	const kill	: (pid:pid, sig:int64 -> int64)
	const fork	: (-> pid)
	const clone	: (flags : cloneopt, stk : byte#, ptid : pid#, ctid : pid#, ptreg : byte# -> pid)
	extern const fnclone	: ( flags : cloneopt, \
			stk : byte#, \
			ptid : pid#, \
			tls : byte#, \
			ctid : pid#, \
			ptreg : byte#, \
			fn : void#  /* we need a raw pointer */ \
			-> pid)
	const wait4	: (pid:pid, loc:int32#, opt : int64, usage:rusage#	-> int64)
	const waitpid	: (pid:pid, loc:int32#, opt : int64	-> int64)
	const execv	: (cmd : byte[:], args : byte[:][:] -> int64)
	const execve	: (cmd : byte[:], args : byte[:][:], env : byte[:][:] -> int64)
	const waitstatus	: (st : int32 -> waitstatus)
	const open	: (path:byte[:], opts:fdopt -> fd)
	const openmode	: (path:byte[:], opts:fdopt, mode:int64 -> fd)
	const close	: (fd:fd -> int64)
	const rename	: (from : byte[:], to : byte[:] -> int64)
	const creat	: (path:byte[:], mode:int64 -> fd)
	const unlink	: (path:byte[:] -> int)
	const readlink	: (path:byte[:], buf:byte[:] -> int64)
	const read	: (fd:fd, buf:byte[:] -> size)
	const pread	: (fd:fd, buf:byte[:], off : off -> size)
	const write	: (fd:fd, buf:byte[:] -> size)
	const pwrite	: (fd:fd, buf:byte[:], off : off -> size)
	const lseek	: (fd:fd, off:off, whence:whence -> int64)
	const stat	: (path:byte[:], sb:statbuf# -> int64)
	const lstat	: (path:byte[:], sb:statbuf# -> int64)
	const fstat	: (fd:fd, sb:statbuf# -> int64)
	const mkdir	: (path : byte[:], mode : int64	-> int64)
	generic ioctl	: (fd:fd, req : ioctlno, arg:@a# -> int64)
	const getdents64	: (fd:fd, buf : byte[:] -> int64)
	const chdir	: (p : byte[:] -> int64)
	const getcwd	: (buf : byte[:] -> int64)
	const sendmsg	: (fd:fd, msg:msghdr#, flags:msgflags -> int64)
	const recvmsg	: (fd:fd, msg:msghdr#, flags:msgflags -> int64)
	const fallocate : (fd:fd, mode:fallocmode, off:off, len:off -> int64)
	const memfdcreate       : (name:byte[:], flags:mfdflags -> fd)
	const sigaction	: (sig : signo, act : sigaction#, oact : sigaction# -> int)
	const sigprocmask	: (how : int32, set : sigset#, oset : sigset# -> int)
	const pipe	: (fds : fd[2]# -> int64)
	const dup	: (fd : fd -> fd)
	const dup2	: (src : fd, dst : fd -> fd)
	const futex	: (uaddr : int32#, op : futexop, val : int32, \
		timeout : timespec#, uaddr2 : int32#, val3 : int32 -> int)
	const semctl	:  (semid : int, semnum : int, cmd : int, arg : void# -> int)
	const epollcreate	: (flg : epollflags	-> fd)	/* actually epoll_create1 */
	const epollctl	: (epfd : fd, op : int, fd : fd, evt : epollevt# -> int)
	const epollwait	: (epfd : fd, evts : epollevt[:], timeout : int -> int)
	const poll	: (pfd	: pollfd[:], timeout : int	-> int)
	const socket	: (dom : sockfam, stype : socktype, proto : sockproto	-> fd)
	const connect	: (sock	: fd, addr : sockaddr#, len : size -> int)
	const accept	: (sock : fd, addr : sockaddr#, len : size# -> fd)
	const listen	: (sock : fd, backlog : int	-> int)
	const bind	: (sock : fd, addr : sockaddr#, len : size -> int)
	const setsockopt	: (sock : fd, lev : sockproto, opt : sockopt, val : void#, len : size -> int)
	const getsockopt	: (sock : fd, lev : sockproto, opt : sockopt, val : void#, len : size# -> int)
	const munmap	: (addr:byte#, len:size -> int64)
	const mmap	: (addr:byte#, len:size, prot:mprot, flags:mopt, fd:fd, off:off -> byte#)
	const clock_getres	: (clk : clock, ts : timespec# -> int32)
	const clock_gettime	: (clk : clock, ts : timespec# -> int32)
	const clock_settime	: (clk : clock, ts : timespec# -> int32)
	const nanosleep	: (req : timespec#, rem : timespec# -> int32)
	const getuid : ( -> uint32)
	const getgid : ( -> uint32)
	const setuid : (uid : uint32 -> int32)
	const setgid : (gid : uint32 -> int32)
	const uname 	: (buf : utsname# -> int)
	extern const cstring	: (str : byte[:] -> byte#)
	extern const alloca	: (sz : size	-> byte#)
	/* } end manual overrides */

	const time			:  (tloc : time# -> int64)
	const gettimeofday		:  (tv : timeval#, tz : timezone# -> int64)
	const settimeofday		:  (tv : timeval#, tz : timezone# -> int64)
	const adjtimex			:  (txc_p : timex# -> int64)
	const times			:  (tbuf : tms# -> int64)
	const gettid			:  ( -> int64)
	const alarm			:  (seconds : uint -> int64)
	const getppid			:  ( -> int64)
	const geteuid			:  ( -> int64)
	const getegid			:  ( -> int64)
	const getresuid			:  (ruid : uid#, euid : uid#, suid : uid# -> int64)
	const getresgid			:  (rgid : gid#, egid : gid#, sgid : gid# -> int64)
	const getpgid			:  (pid : pid -> int64)
	const getpgrp			:  ( -> int64)
	const getsid			:  (pid : pid -> int64)
	const getgroups			:  (gidsetsize : int, grouplist : gid# -> int64)
	const setregid			:  (rgid : gid, egid : gid -> int64)
	const setreuid			:  (ruid : uid, euid : uid -> int64)
	const setresuid			:  (ruid : uid, euid : uid, suid : uid -> int64)
	const setresgid			:  (rgid : gid, egid : gid, sgid : gid -> int64)
	const setfsuid			:  (uid : uid -> int64)
	const setfsgid			:  (gid : gid -> int64)
	const setpgid			:  (pid : pid, pgid : pid -> int64)
	const setsid			:  ( -> int64)
	const setgroups			:  (gidsetsize : int, grouplist : gid# -> int64)
	const acct			:  (name : byte# -> int64)
	const capget			:  (header : cap_user_header, dataptr : cap_user_data -> int64)
	const capset			:  (header : cap_user_header, data : cap_user_data -> int64)
	const personality		:  (personality : uint -> int64)
	const sigaltstack		:  (uss : sigaltstack#, uoss : sigaltstack# -> int64)
	const getitimer			:  (which : int, value : itimerval# -> int64)
	const setitimer			:  (which : int, value : itimerval#, ovalue : itimerval# -> int64)
	const timer_create		:  (which_clock : clockid, timer_event_spec : sigevent#, created_timer_id : timer# -> int64)
	const timer_gettime		:  (timer_id : timer, setting : itimerspec# -> int64)
	const timer_getoverrun		:  (timer_id : timer -> int64)
	const timer_settime		:  (timer_id : timer, flags : int, new_setting : itimerspec#, old_setting : itimerspec# -> int64)
	const timer_delete		:  (timer_id : timer -> int64)
	const clock_adjtime		:  (which_clock : clockid, tx : timex# -> int64)
	const clock_nanosleep		:  (which_clock : clockid, flags : int, rqtp : timespec#, rmtp : timespec# -> int64)
	const sched_setscheduler	:  (pid : pid, policy : int, param : sched_param# -> int64)
	const sched_setparam		:  (pid : pid, param : sched_param# -> int64)
	const sched_setattr		:  (pid : pid, attr : sched_attr#, flags : uint -> int64)
	const sched_getscheduler	:  (pid : pid -> int64)
	const sched_getparam		:  (pid : pid, param : sched_param# -> int64)
	const sched_getattr		:  (pid : pid, attr : sched_attr#, size : uint, flags : uint -> int64)
	const sched_setaffinity		:  (pid : pid, len : uint, user_mask_ptr : uint64# -> int64)
	const sched_getaffinity		:  (pid : pid, len : uint, user_mask_ptr : uint64# -> int64)
	const sched_yield		:  ( -> int64)
	const sched_get_priority_max	:  (policy : int -> int64)
	const sched_get_priority_min	:  (policy : int -> int64)
	const sched_rr_get_interval	:  (pid : pid, interval : timespec# -> int64)
	const setpriority		:  (which : int, who : int, niceval : int -> int64)
	const getpriority		:  (which : int, who : int -> int64)
	const shutdown			:  (_a0 : int, _a1 : int -> int64)
	const reboot			:  (magic1 : int, magic2 : int, cmd : uint, arg : void# -> int64)
	const restart_syscall		:  ( -> int64)
	const kexec_load		:  (entry : uint64, nr_segments : uint64, segments : kexec_segment#, flags : uint64 -> int64)
	const kexec_file_load		:  (kernel_fd : int, initrd_fd : int, cmdline_len : uint64, cmdline_ptr : byte#, flags : uint64 -> int64)
	const waitid			:  (which : int, pid : pid, infop : siginfo#, options : int, ru : rusage# -> int64)
	const set_tid_address		:  (tidptr : int# -> int64)
	const init_module		:  (umod : void#, len : uint64, uargs : byte# -> int64)
	const delete_module		:  (name_user : byte#, flags : uint -> int64)
	const rt_sigsuspend		:  (unewset : sigset#, sigsetsize : size -> int64)
	const rt_sigaction		:  (_a0 : int, _a1 : sigaction#, _a2 : sigaction#, _a3 : size -> int64)
	const rt_sigprocmask		:  (how : int, set : sigset#, oset : sigset#, sigsetsize : size -> int64)
	const rt_sigpending		:  (set : sigset#, sigsetsize : size -> int64)
	const rt_sigtimedwait		:  (uthese : sigset#, uinfo : siginfo#, uts : timespec#, sigsetsize : size -> int64)
	const rt_tgsigqueueinfo		:  (tgid : pid, pid : pid, sig : int, uinfo : siginfo# -> int64)
	const tgkill			:  (tgid : pid, pid : pid, sig : int -> int64)
	const tkill			:  (pid : pid, sig : int -> int64)
	const rt_sigqueueinfo		:  (pid : pid, sig : int, uinfo : siginfo# -> int64)
	const pause			:  ( -> int64)
	const sync			:  ( -> int64)
	const fsync			:  (fd : uint -> int64)
	const fdatasync			:  (fd : uint -> int64)
	const mount			:  (dev_name : byte#, dir_name : byte#, kind : byte#, flags : uint64, data : void# -> int64)
	const umount2			:  (name : byte#, flags : int -> int64)
	const truncate			:  (path : byte#, length : int64 -> int64)
	const ftruncate			:  (fd : uint, length : uint64 -> int64)
	const statfs			:  (path : byte#, buf : statfs# -> int64)
	const fstatfs			:  (fd : uint, buf : statfs# -> int64)
	const ustat			:  (dev : uint, ubuf : ustat# -> int64)
	const setxattr			:  (path : byte#, name : byte#, value : void#, size : size, flags : int -> int64)
	const lsetxattr			:  (path : byte#, name : byte#, value : void#, size : size, flags : int -> int64)
	const fsetxattr			:  (fd : int, name : byte#, value : void#, size : size, flags : int -> int64)
	const getxattr			:  (path : byte#, name : byte#, value : void#, size : size -> int64)
	const lgetxattr			:  (path : byte#, name : byte#, value : void#, size : size -> int64)
	const fgetxattr			:  (fd : int, name : byte#, value : void#, size : size -> int64)
	const listxattr			:  (path : byte#, list : byte#, size : size -> int64)
	const llistxattr		:  (path : byte#, list : byte#, size : size -> int64)
	const flistxattr		:  (fd : int, list : byte#, size : size -> int64)
	const removexattr		:  (path : byte#, name : byte# -> int64)
	const lremovexattr		:  (path : byte#, name : byte# -> int64)
	const fremovexattr		:  (fd : int, name : byte# -> int64)
	const brk			:  (brk : uint64 -> int64)
	const mprotect			:  (start : uint64, len : size, prot : uint64 -> int64)
	const mremap			:  (addr : uint64, old_len : uint64, new_len : uint64, flags : uint64, new_addr : uint64 -> int64)
	const remap_file_pages		:  (start : uint64, size : uint64, prot : uint64, pgoff : uint64, flags : uint64 -> int64)
	const msync			:  (start : uint64, len : size, flags : int -> int64)
	const fadvise			:  (fd : int, offset : loff, len : size, advice : int -> int64)
	const mlock			:  (start : uint64, len : size -> int64)
	const munlock			:  (start : uint64, len : size -> int64)
	const mlockall			:  (flags : int -> int64)
	const munlockall		:  ( -> int64)
	const madvise			:  (start : uint64, len : size, behavior : int -> int64)
	const mincore			:  (start : uint64, len : size, vec : byte# -> int64)
	const pivot_root		:  (new_root : byte#, put_old : byte# -> int64)
	const chroot			:  (filename : byte# -> int64)
	const mknod			:  (filename : byte#, mode : filemode, dev : uint -> int64)
	const link			:  (oldname : byte#, newname : byte# -> int64)
	const symlink			:  (old : byte#, new : byte# -> int64)
	const chmod			:  (filename : byte#, mode : filemode -> int64)
	const fchmod			:  (fd : uint, mode : filemode -> int64)
	const fcntl			:  (fd : uint, cmd : uint, arg : uint64 -> int64)
	const pipe2			:  (fildes : int#, flags : int -> int64)
	const dup3			:  (oldfd : uint, newfd : uint, flags : int -> int64)
	const ioperm			:  (from : uint64, num : uint64, on : int -> int64)
	const flock			:  (fd : uint, cmd : uint -> int64)
	const io_setup			:  (nr_reqs : uint, ctx : aiocontext# -> int64)
	const io_destroy		:  (ctx : aiocontext -> int64)
	const io_getevents		:  (ctx_id : aiocontext, min_nr : int64, nr : int64, events : io_event#, timeout : timespec# -> int64)
	const io_submit			:  (_a0 : aiocontext, _a1 : int64, _a2 : iocb## -> int64)
	const io_cancel			:  (ctx_id : aiocontext, iocb : iocb#, result : io_event# -> int64)
	const sendfile			:  (out_fd : int, in_fd : int, offset : loff#, count : size -> int64)
	const access			:  (filename : byte#, mode : int -> int64)
	const vhangup			:  ( -> int64)
	const chown			:  (filename : byte#, user : uid, group : gid -> int64)
	const lchown			:  (filename : byte#, user : uid, group : gid -> int64)
	const fchown			:  (fd : uint, user : uid, group : gid -> int64)
	const utime			:  (filename : byte#, times : utimbuf# -> int64)
	const utimes			:  (filename : byte#, utimes : timeval# -> int64)
	const readahead			:  (fd : int, offset : loff, count : size -> int64)
	const readv			:  (fd : uint64, vec : iovec#, vlen : uint64 -> int64)
	const writev			:  (fd : uint64, vec : iovec#, vlen : uint64 -> int64)
	const preadv			:  (fd : uint64, vec : iovec#, vlen : uint64, pos_l : uint64, pos_h : uint64 -> int64)
	const preadv2			:  (fd : uint64, vec : iovec#, vlen : uint64, pos_l : uint64, pos_h : uint64, flags : int -> int64)
	const pwritev			:  (fd : uint64, vec : iovec#, vlen : uint64, pos_l : uint64, pos_h : uint64 -> int64)
	const pwritev2			:  (fd : uint64, vec : iovec#, vlen : uint64, pos_l : uint64, pos_h : uint64, flags : int -> int64)
	const fchdir			:  (fd : uint -> int64)
	const rmdir			:  (pathname : byte# -> int64)
	const lookup_dcookie		:  (cookie64 : uint64, buf : byte#, len : size -> int64)
	const quotactl			:  (cmd : uint, special : byte#, id : int32, addr : void# -> int64)
	const accept4			:  (_a0 : int, _a1 : sockaddr#, _a2 : int#, _a3 : int -> int64)
	const getsockname		:  (_a0 : int, _a1 : sockaddr#, _a2 : int# -> int64)
	const getpeername		:  (_a0 : int, _a1 : sockaddr#, _a2 : int# -> int64)
	const sendto			:  (_a0 : int, _a1 : void#, _a2 : size, _a3 : uint, _a4 : sockaddr#, _a5 : int -> int64)
	const sendmmsg			:  (fd : int, msg : mmsghdr#, vlen : uint, flags : uint -> int64)
	const recvfrom			:  (_a0 : int, _a1 : void#, _a2 : size, _a3 : uint, _a4 : sockaddr#, _a5 : int# -> int64)
	const recvmmsg			:  (fd : int, msg : mmsghdr#, vlen : uint, flags : uint, timeout : timespec# -> int64)
	const socketpair		:  (_a0 : int, _a1 : int, _a2 : int, _a3 : int# -> int64)
	const select			:  (n : int, inp : fdset#, outp : fdset#, exp : fdset#, tvp : timeval# -> int64)
	const epoll_create		:  (size : int -> int64)
	const epoll_create1		:  (flags : int -> int64)
	const epoll_ctl			:  (epfd : int, op : int, fd : int, event : epollevt# -> int64)
	const epoll_wait		:  (epfd : int, events : epollevt#, maxevents : int, timeout : int -> int64)
	const epoll_pwait		:  (epfd : int, events : epollevt#, maxevents : int, timeout : int, sigmask : sigset#, sigsetsize : size -> int64)
	const sethostname		:  (name : byte#, len : int -> int64)
	const setdomainname		:  (name : byte#, len : int -> int64)
	const getrlimit			:  (resource : uint, rlim : rlimit# -> int64)
	const setrlimit			:  (resource : uint, rlim : rlimit# -> int64)
	const prlimit			:  (pid : pid, resource : uint, new_rlim : rlimit64#, old_rlim : rlimit64# -> int64)
	const getrusage			:  (who : int, ru : rusage# -> int64)
	const umask			:  (mask : int -> int64)
	const msgget			:  (key : key, msgflg : int -> int64)
	const msgsnd			:  (msqid : int, msgp : msgbuf#, msgsz : size, msgflg : int -> int64)
	const msgrcv			:  (msqid : int, msgp : msgbuf#, msgsz : size, msgtyp : int64, msgflg : int -> int64)
	const msgctl			:  (msqid : int, cmd : int, buf : msqid_ds# -> int64)
	const semget			:  (key : key, nsems : int, semflg : int -> int64)
	const semop			:  (semid : int, sops : sembuf#, nsops : uint -> int64)
	const semtimedop		:  (semid : int, sops : sembuf#, nsops : uint, timeout : timespec# -> int64)
	const shmat			:  (shmid : int, shmaddr : byte#, shmflg : int -> int64)
	const shmget			:  (key : key, size : size, flag : int -> int64)
	const shmdt			:  (shmaddr : byte# -> int64)
	const shmctl			:  (shmid : int, cmd : int, buf : shmid_ds# -> int64)
	const mq_open			:  (name : byte#, oflag : int, mode : filemode, attr : mq_attr# -> int64)
	const mq_unlink			:  (name : byte# -> int64)
	const mq_timedsend		:  (mqdes : int, msg_ptr : byte#, msg_len : size, msg_prio : uint, abs_timeout : timespec# -> int64)
	const mq_timedreceive		:  (mqdes : int, msg_ptr : byte#, msg_len : size, msg_prio : uint#, abs_timeout : timespec# -> int64)
	const mq_notify			:  (mqdes : int, notification : sigevent# -> int64)
	const mq_getsetattr		:  (mqdes : int, mqstat : mq_attr#, omqstat : mq_attr# -> int64)
	const prctl			:  (option : int, arg2 : uint64, arg3 : uint64, arg4 : uint64, arg5 : uint64 -> int64)
	const swapon			:  (specialfile : byte#, swap_flags : int -> int64)
	const swapoff			:  (specialfile : byte# -> int64)
	const _sysctl			:  (args : sysctl_args# -> int64)
	const sysinfo			:  (info : sysinfo# -> int64)
	const sysfs			:  (option : int, arg1 : uint64, arg2 : uint64 -> int64)
	const syslog			:  (kind : int, buf : byte#, len : int -> int64)
	const ptrace			:  (request : int64, pid : int64, addr : uint64, data : uint64 -> int64)
	const add_key			:  (_type : byte#, _description : byte#, _payload : void#, plen : size, destringid : int32 -> int64)
	const request_key		:  (_type : byte#, _description : byte#, _callout_info : byte#, destringid : int32 -> int64)
	const keyctl			:  (cmd : int, arg2 : uint64, arg3 : uint64, arg4 : uint64, arg5 : uint64 -> int64)
	const ioprio_set		:  (which : int, who : int, ioprio : int -> int64)
	const ioprio_get		:  (which : int, who : int -> int64)
	const set_mempolicy		:  (mode : int, nmask : uint64#, maxnode : uint64 -> int64)
	const migrate_pages		:  (pid : pid, maxnode : uint64, from : uint64#, to : uint64# -> int64)
	const move_pages		:  (pid : pid, nr_pages : uint64, pages : void##, nodes : int#, status : int#, flags : int -> int64)
	const mbind			:  (start : uint64, len : uint64, mode : uint64, nmask : uint64#, maxnode : uint64, flags : uint -> int64)
	const get_mempolicy		:  (policy : int#, nmask : uint64#, maxnode : uint64, addr : uint64, flags : uint64 -> int64)
	const inotify_init		:  ( -> int64)
	const inotify_init1		:  (flags : int -> int64)
	const inotify_add_watch		:  (fd : int, path : byte#, mask : uint64 -> int64)
	const inotify_rm_watch		:  (fd : int, wd : s32 -> int64)
	const mknodat			:  (dfd : int, filename : byte#, mode : filemode, dev : uint -> int64)
	const mkdirat			:  (dfd : int, pathname : byte#, mode : filemode -> int64)
	const unlinkat			:  (dfd : int, pathname : byte#, flag : int -> int64)
	const symlinkat			:  (oldname : byte#, newdfd : int, newname : byte# -> int64)
	const linkat			:  (olddfd : int, oldname : byte#, newdfd : int, newname : byte#, flags : int -> int64)
	const renameat			:  (olddfd : int, oldname : byte#, newdfd : int, newname : byte# -> int64)
	const renameat2			:  (olddfd : int, oldname : byte#, newdfd : int, newname : byte#, flags : uint -> int64)
	const futimesat			:  (dfd : int, filename : byte#, utimes : timeval# -> int64)
	const faccessat			:  (dfd : int, filename : byte#, mode : int -> int64)
	const fchmodat			:  (dfd : int, filename : byte#, mode : filemode -> int64)
	const fchownat			:  (dfd : int, filename : byte#, user : uid, group : gid, flag : int -> int64)
	const openat			:  (dfd : int, filename : byte#, flags : int, mode : filemode -> int64)
	const newfstatat		:  (dfd : int, filename : byte#, statbuf : statbuf#, flag : int -> int64)
	const readlinkat		:  (dfd : int, path : byte#, buf : byte#, bufsiz : int -> int64)
	const utimensat			:  (dfd : int, filename : byte#, utimes : timespec#, flags : int -> int64)
	const unshare			:  (unshare_flags : uint64 -> int64)
	const splice			:  (fd_in : int, off_in : loff#, fd_out : int, off_out : loff#, len : size, flags : uint -> int64)
	const vmsplice			:  (fd : int, iov : iovec#, nr_segs : uint64, flags : uint -> int64)
	const tee			:  (fdin : int, fdout : int, len : size, flags : uint -> int64)
	const sync_file_range		:  (fd : int, offset : loff, nbytes : loff, flags : uint -> int64)
	const get_robust_list		:  (pid : int, head_ptr : robust_list_head##, len_ptr : size# -> int64)
	const set_robust_list		:  (head : robust_list_head#, len : size -> int64)
	const getcpu			:  (cpu : uint#, node : uint#, cache : getcpu_cache# -> int64)
	const signalfd			:  (ufd : int, user_mask : sigset#, sizemask : size -> int64)
	const signalfd4			:  (ufd : int, user_mask : sigset#, sizemask : size, flags : int -> int64)
	const timerfd_create		:  (clockid : int, flags : int -> int64)
	const timerfd_settime		:  (ufd : int, flags : int, utmr : itimerspec#, otmr : itimerspec# -> int64)
	const timerfd_gettime		:  (ufd : int, otmr : itimerspec# -> int64)
	const eventfd			:  (count : uint -> int64)
	const eventfd2			:  (count : uint, flags : int -> int64)
	const memfd_create		:  (uname_ptr : byte#, flags : uint -> int64)
	const userfaultfd		:  (flags : int -> int64)
	const pselect6			:  (_a0 : int, _a1 : fdset#, _a2 : fdset#, _a3 : fdset#, _a4 : timespec#, _a5 : void# -> int64)
	const ppoll			:  (_a0 : pollfd#, int : uint, _a2 : timespec#, _a3 : sigset#, _a4 : size -> int64)
	const fanotify_init		:  (flags : uint, event_f_flags : uint -> int64)
	const fanotify_mark		:  (fanotify_fd : int, flags : uint, mask : uint64, fd : int, pathname : byte# -> int64)
	const syncfs			:  (fd : int -> int64)
	const vfork			:  ( -> int64)
	const perf_event_open		:  (attr_uptr : perf_event_attr#, pid : pid, cpu : int, group_fd : int, flags : uint64 -> int64)
	const name_to_handle_at		:  (dfd : int, name : byte#, handle : file_handle#, mnt_id : int#, flag : int -> int64)
	const open_by_handle_at		:  (mountdirfd : int, handle : file_handle#, flags : int -> int64)
	const setns			:  (fd : int, nstype : int -> int64)
	const process_vm_readv		:  (pid : pid, lvec : iovec#, liovcnt : uint64, rvec : iovec#, riovcnt : uint64, flags : uint64 -> int64)
	const process_vm_writev		:  (pid : pid, lvec : iovec#, liovcnt : uint64, rvec : iovec#, riovcnt : uint64, flags : uint64 -> int64)
	const kcmp			:  (pid1 : pid, pid2 : pid, kind : int, idx1 : uint64, idx2 : uint64 -> int64)
	const finit_module		:  (fd : int, uargs : byte#, flags : int -> int64)
	const seccomp			:  (op : uint, flags : uint, uargs : byte# -> int64)
	const getrandom			:  (buf : byte#, count : size, flags : uint -> int64)
	const bpf			:  (cmd : int, attr : bpfgattr#, size : uint -> int64)
	const execveat			:  (dfd : int, filename : byte#, argv : byte##, envp : byte##, flags : int -> int64)
	const membarrier		:  (cmd : int, flags : int -> int64)
	const copy_file_range		:  (fd_in : int, off_in : loff#, fd_out : int, off_out : loff#, len : size, flags : uint -> int64)
	const mlock2			:  (start : uint64, len : size, flags : int -> int64)
	const pkey_mprotect		:  (start : uint64, len : size, prot : uint64, pkey : int -> int64)
	const pkey_alloc		:  (flags : uint64, init_val : uint64 -> int64)
	const pkey_free			:  (pkey : int -> int64)
;;

	/* start manual overrides { */
	/* getting to the os */
	
	/* process management */
	/* FIXME: where the fuck is 'struct pt_reg' defined?? */
	/* wrappers to extract wait status */
	
	/* file manipulation */
	
	/* signals */
	
	/* fd stuff */
	
	/* threading */
	
	/* polling */
	
	/* networking */
	
	/* memory mapping */
	
	/* time */
	
	/* user/group management */
	
	/* system information */
	
	/*
	wraps a syscall argument, converting it to 64 bits for the syscall function.
	This is the same as casting, but more concise than writing a cast to int64.
	*/
	generic a = {x : @t; -> (x : uint64)}
	
	/* asm stubs from util.s */
	
	/* process management */
	const exit	= {status;		syscall(Sysexit, a(status))}
	const exit_group	= {status;	syscall(Sysexit_group, a(status))}
	const getpid	= {;			-> (syscall(Sysgetpid) : pid)}
	const kill	= {pid, sig;		-> syscall(Syskill, a(pid), a(sig))}
	const fork	= {;			-> (syscall(Sysfork) : pid)}
	const clone	= {flags, stk, ptid, ctid, ptreg;	-> (syscall(Sysclone, a(flags), a(stk), a(ptid), a(ctid), a(ptreg)) : pid)}
	const wait4	= {pid, loc, opt, usage;	-> syscall(Syswait4, a(pid), a(loc), a(opt), a(usage))}
	const waitpid	= {pid, loc, opt;
		var rusage
		-> wait4(pid, loc, opt, &rusage)
	}
	
	const execv	= {cmd, args
		var p, cargs, i
	
		/* of course we fucking have to duplicate this code everywhere,
		* since we want to stack allocate... */
		p = alloca((args.len + 1)*sizeof(byte#))
		cargs = (p : byte##)[:args.len + 1]
		for i = 0; i < args.len; i++
			cargs[i] = cstring(args[i])
		;;
		cargs[args.len] = (0 : byte#)
		-> syscall(Sysexecve, cstring(cmd), a(p), a(__cenvp))
	}
	
	const execve	= {cmd, args, env
		var cargs, cenv, i
		var ap, ep
	
		/* copy the args */
		ap = alloca((args.len + 1)*sizeof(byte#))
		cargs = (ap : byte##)[:args.len + 1]
		for i = 0; i < args.len; i++
			cargs[i] = cstring(args[i])
		;;
		cargs[args.len] = (0 : byte#)
	
		/*
		 copy the env.
		 of course we fucking have to duplicate this code everywhere,
		 since we want to stack allocate...
		*/
		ep = alloca((env.len + 1)*sizeof(byte#))
		cenv = (ep : byte##)[:env.len]
		for i = 0; i < env.len; i++
			cenv[i] = cstring(env[i])
		;;
		cenv[env.len] = (0 : byte#)
	
		-> syscall(Sysexecve, cstring(cmd), a(ap), a(ep))
	}
	
	/* file manipulation */
	const open	= {path, opts;		-> (syscall(Sysopen, cstring(path), a(opts), a(0o777)) : fd)}
	const openmode	= {path, opts, mode;	-> (syscall(Sysopen, cstring(path), a(opts), a(mode)) : fd)}
	const close	= {fd;			-> syscall(Sysclose, a(fd))}
	const creat	= {path, mode;		-> (syscall(Syscreat, cstring(path), a(mode)) : fd)}
	const rename	= {from, to;		-> syscall(Sysrename, cstring(from), cstring(to))}
	const unlink	= {path;		-> (syscall(Sysunlink, cstring(path)) : int)}
	const readlink	= {path, buf; -> syscall(Sysreadlink, cstring(path), (buf : byte#), a(buf.len))}
	const read	= {fd, buf;		-> (syscall(Sysread, a(fd), (buf : byte#), a(buf.len)) : size)}
	const pread	= {fd, buf, off;	-> (syscall(Syspread, a(fd), (buf : byte#), a(buf.len), a(off)) : size)}
	const write	= {fd, buf;		-> (syscall(Syswrite, a(fd), (buf : byte#), a(buf.len)) : size)}
	const pwrite	= {fd, buf, off;	-> (syscall(Syspwrite, a(fd), (buf : byte#), a(buf.len), a(off)) : size)}
	const lseek	= {fd, off, whence;	-> syscall(Syslseek, a(fd), a(off), a(whence))}
	const stat	= {path, sb;		-> syscall(Sysstat, cstring(path), a(sb))}
	const lstat	= {path, sb;		-> syscall(Syslstat, cstring(path), a(sb))}
	const fstat	= {fd, sb;		-> syscall(Sysfstat, a(fd), a(sb))}
	const mkdir	= {path, mode;		-> (syscall(Sysmkdir, cstring(path), a(mode)) : int64)}
	generic ioctl	= {fd, req, arg;	-> (syscall(Sysioctl, a(fd), a(req), a(arg)) : int64)}
	const getdents64	= {fd, buf;	-> syscall(Sysgetdents64, a(fd), (buf : byte#), a(buf.len))}
	const chdir	= {dir;	-> syscall(Syschdir, cstring(dir))}
	const getcwd	= {buf;	-> syscall(Sysgetcwd, a(buf), a(buf.len))}
	const sendmsg	= {fd, msg, flags;	-> syscall(Syssendmsg, a(fd), msg, a(flags))}
	const recvmsg	= {fd, msg, flags;	-> syscall(Sysrecvmsg, a(fd), msg, a(flags))}
	const fallocate	= {fd, mode, off, len;	-> syscall(Sysfallocate, a(fd), a(mode),  a(off), a(len))}
	const memfdcreate      = {name, flags; -> (syscall(Sysmemfd_create, cstring(name), a(flags)) : fd)}
	
	/* file stuff */
	const pipe	= {fds;	-> syscall(Syspipe, a(fds))}
	const dup 	= {fd;	-> (syscall(Sysdup, a(fd)) : fd)}
	const dup2 	= {src, dst;	-> (syscall(Sysdup2, a(src), a(dst)) : fd)}
	
	const sigaction	= {sig, act, oact;
		if act.restore == (0 : byte#)
			act.flags |= Sarestorer
			act.restore = (sys.sigreturn : byte#)
		;;
		-> (syscall(Sysrt_sigaction, a(sig), a(act), a(oact), a(sizeof(sigflags))) : int)
	}
	const sigprocmask	= {sig, act, oact;	-> (syscall(Sysrt_sigprocmask, a(sig), a(act), a(oact), a(sizeof(sigflags))) : int)}
	
	/* threading */
	const futex	= {uaddr, op, val, timeout, uaddr2, val3
		-> (syscall(Sysfutex, a(uaddr), a(op), a(val), a(timeout), a(uaddr2), a(val3)) : int)
	}
	const semctl	= {semid, semnum, cmd, arg
		-> (syscall(Syssemctl, a(semnum), a(cmd), a(arg)) : int)
	}
	
	/* poll */
	const poll	= {pfd, timeout;	-> (syscall(Syspoll, (pfd : pollfd#), a(pfd.len), a(timeout)) : int)}
	const epollctl	= {epfd, op, fd, evt;
		-> (syscall(Sysepoll_ctl, a(epfd), a(op), a(fd), a(evt)) : int)}
	const epollwait	= {epfd, evts, timeout;
		-> (syscall(Sysepoll_wait, a(epfd), (evts : epollevt#), a(evts.len), a(timeout)) : int)}
	const epollcreate	= {flg;	-> (syscall(Sysepoll_create1, a(flg)) : fd)}
	
	/* networking */
	const socket	= {dom, stype, proto;	-> (syscall(Syssocket, a(dom), a(stype), a(proto)) : fd)}
	const connect	= {sock, addr, len;	-> (syscall(Sysconnect, a(sock), a(addr), a(len)) : int)}
	const bind	= {sock, addr, len;	-> (syscall(Sysbind, a(sock), a(addr), a(len)) : int)}
	const listen	= {sock, backlog;	-> (syscall(Syslisten, a(sock), a(backlog)) : int)}
	const accept	= {sock, addr, lenp;	-> (syscall(Sysaccept, a(sock), a(addr), a(lenp)) : fd)}
	const setsockopt	= {sock, lev, opt, val, len;	-> (syscall(Syssetsockopt, a(sock), a(lev), a(opt), a(val), a(len)) : int)}
	const getsockopt	= {sock, lev, opt, val, len;	-> (syscall(Syssetsockopt, a(sock), a(lev), a(opt), a(val), a(len)) : int)}
	
	/* memory mapping */
	const munmap	= {addr, len;		-> syscall(Sysmunmap, a(addr), a(len))}
	const mmap	= {addr, len, prot, flags, fd, off;
		-> (syscall(Sysmmap, a(addr), a(len), a(prot), a(flags), a(fd), a(off)) : byte#)
	}
	
	/* time */
	const clock_getres = {clk, ts;	-> (syscall(Sysclock_getres, clockid(clk), a(ts)) : int32)}
	const clock_gettime = {clk, ts;	-> (syscall(Sysclock_gettime, clockid(clk), a(ts)) : int32)}
	const clock_settime = {clk, ts;	-> (syscall(Sysclock_settime, clockid(clk), a(ts)) : int32)}
	const nanosleep	= {req, rem;	-> (syscall(Sysnanosleep, a(req), a(rem)) : int32)}
	
	/* user/group management */
	const getuid = {; -> (syscall(Sysgetuid) : uint32)}
	const getgid = {; -> (syscall(Sysgetgid) : uint32)}
	const setuid = {uid; -> (syscall(Syssetuid, a(uid)) : int32)}
	const setgid = {gid; -> (syscall(Syssetgid, a(gid)) : int32)}
	
	/* system information */
	const uname	= {buf;	-> (syscall(Sysuname, buf) : int)}
	
	const clockid = {clk
		match clk
		| `Clockrealtime:	-> 0
		| `Clockmonotonic:	-> 1
		| `Clockproccpu:	-> 2
		| `Clockthreadcpu:	-> 3
		| `Clockmonotonicraw:	-> 4
		| `Clockrealtimecoarse:	-> 5
		| `Clockmonotoniccoarse:-> 6
		| `Clockboottime:	-> 7
		| `Clockrealtimealarm:	-> 8
		| `Clockboottimealarm:	-> 9
		;;
		-> -1
	}
	
	
	const waitstatus = {st
		if st & 0x7f == 0 /* if exited */
			-> `Waitexit ((st & 0xff00) >> 8)
		elif ((st & 0xffff)-1) < 0xff /* if signaled */
			-> `Waitsig ((st) & 0x7f)
		elif (((st & 0xffff)*0x10001)>>8) > 0x7f00
			-> `Waitstop ((st & 0xff00) >> 8)
		;;
		-> `Waitfail st	/* wait failed to give a result */
	}
	/* } end manual overrides */
const time	= {tloc
	 -> (syscall(Systime, a(tloc)) : int64)
}
const gettimeofday	= {tv, tz
	 -> (syscall(Sysgettimeofday, a(tv), a(tz)) : int64)
}
const settimeofday	= {tv, tz
	 -> (syscall(Syssettimeofday, a(tv), a(tz)) : int64)
}
const adjtimex	= {txc_p
	 -> (syscall(Sysadjtimex, a(txc_p)) : int64)
}
const times	= {tbuf
	 -> (syscall(Systimes, a(tbuf)) : int64)
}
const gettid	= {
	 -> (syscall(Sysgettid) : int64)
}
const alarm	= {seconds
	 -> (syscall(Sysalarm, a(seconds)) : int64)
}
const getppid	= {
	 -> (syscall(Sysgetppid) : int64)
}
const geteuid	= {
	 -> (syscall(Sysgeteuid) : int64)
}
const getegid	= {
	 -> (syscall(Sysgetegid) : int64)
}
const getresuid	= {ruid, euid, suid
	 -> (syscall(Sysgetresuid, a(ruid), a(euid), a(suid)) : int64)
}
const getresgid	= {rgid, egid, sgid
	 -> (syscall(Sysgetresgid, a(rgid), a(egid), a(sgid)) : int64)
}
const getpgid	= {pid
	 -> (syscall(Sysgetpgid, a(pid)) : int64)
}
const getpgrp	= {
	 -> (syscall(Sysgetpgrp) : int64)
}
const getsid	= {pid
	 -> (syscall(Sysgetsid, a(pid)) : int64)
}
const getgroups	= {gidsetsize, grouplist
	 -> (syscall(Sysgetgroups, a(gidsetsize), a(grouplist)) : int64)
}
const setregid	= {rgid, egid
	 -> (syscall(Syssetregid, a(rgid), a(egid)) : int64)
}
const setreuid	= {ruid, euid
	 -> (syscall(Syssetreuid, a(ruid), a(euid)) : int64)
}
const setresuid	= {ruid, euid, suid
	 -> (syscall(Syssetresuid, a(ruid), a(euid), a(suid)) : int64)
}
const setresgid	= {rgid, egid, sgid
	 -> (syscall(Syssetresgid, a(rgid), a(egid), a(sgid)) : int64)
}
const setfsuid	= {uid
	 -> (syscall(Syssetfsuid, a(uid)) : int64)
}
const setfsgid	= {gid
	 -> (syscall(Syssetfsgid, a(gid)) : int64)
}
const setpgid	= {pid, pgid
	 -> (syscall(Syssetpgid, a(pid), a(pgid)) : int64)
}
const setsid	= {
	 -> (syscall(Syssetsid) : int64)
}
const setgroups	= {gidsetsize, grouplist
	 -> (syscall(Syssetgroups, a(gidsetsize), a(grouplist)) : int64)
}
const acct	= {name
	 -> (syscall(Sysacct, a(name)) : int64)
}
const capget	= {header, dataptr
	 -> (syscall(Syscapget, a(header), a(dataptr)) : int64)
}
const capset	= {header, data
	 -> (syscall(Syscapset, a(header), a(data)) : int64)
}
const personality	= {personality
	 -> (syscall(Syspersonality, a(personality)) : int64)
}
const sigaltstack	= {uss, uoss
	 -> (syscall(Syssigaltstack, a(uss), a(uoss)) : int64)
}
const getitimer	= {which, value
	 -> (syscall(Sysgetitimer, a(which), a(value)) : int64)
}
const setitimer	= {which, value, ovalue
	 -> (syscall(Syssetitimer, a(which), a(value), a(ovalue)) : int64)
}
const timer_create	= {which_clock, timer_event_spec, created_timer_id
	 -> (syscall(Systimer_create, a(which_clock), a(timer_event_spec), a(created_timer_id)) : int64)
}
const timer_gettime	= {timer_id, setting
	 -> (syscall(Systimer_gettime, a(timer_id), a(setting)) : int64)
}
const timer_getoverrun	= {timer_id
	 -> (syscall(Systimer_getoverrun, a(timer_id)) : int64)
}
const timer_settime	= {timer_id, flags, new_setting, old_setting
	 -> (syscall(Systimer_settime, a(timer_id), a(flags), a(new_setting), a(old_setting)) : int64)
}
const timer_delete	= {timer_id
	 -> (syscall(Systimer_delete, a(timer_id)) : int64)
}
const clock_adjtime	= {which_clock, tx
	 -> (syscall(Sysclock_adjtime, a(which_clock), a(tx)) : int64)
}
const clock_nanosleep	= {which_clock, flags, rqtp, rmtp
	 -> (syscall(Sysclock_nanosleep, a(which_clock), a(flags), a(rqtp), a(rmtp)) : int64)
}
const sched_setscheduler	= {pid, policy, param
	 -> (syscall(Syssched_setscheduler, a(pid), a(policy), a(param)) : int64)
}
const sched_setparam	= {pid, param
	 -> (syscall(Syssched_setparam, a(pid), a(param)) : int64)
}
const sched_setattr	= {pid, attr, flags
	 -> (syscall(Syssched_setattr, a(pid), a(attr), a(flags)) : int64)
}
const sched_getscheduler	= {pid
	 -> (syscall(Syssched_getscheduler, a(pid)) : int64)
}
const sched_getparam	= {pid, param
	 -> (syscall(Syssched_getparam, a(pid), a(param)) : int64)
}
const sched_getattr	= {pid, attr, size, flags
	 -> (syscall(Syssched_getattr, a(pid), a(attr), a(size), a(flags)) : int64)
}
const sched_setaffinity	= {pid, len, user_mask_ptr
	 -> (syscall(Syssched_setaffinity, a(pid), a(len), a(user_mask_ptr)) : int64)
}
const sched_getaffinity	= {pid, len, user_mask_ptr
	 -> (syscall(Syssched_getaffinity, a(pid), a(len), a(user_mask_ptr)) : int64)
}
const sched_yield	= {
	 -> (syscall(Syssched_yield) : int64)
}
const sched_get_priority_max	= {policy
	 -> (syscall(Syssched_get_priority_max, a(policy)) : int64)
}
const sched_get_priority_min	= {policy
	 -> (syscall(Syssched_get_priority_min, a(policy)) : int64)
}
const sched_rr_get_interval	= {pid, interval
	 -> (syscall(Syssched_rr_get_interval, a(pid), a(interval)) : int64)
}
const setpriority	= {which, who, niceval
	 -> (syscall(Syssetpriority, a(which), a(who), a(niceval)) : int64)
}
const getpriority	= {which, who
	 -> (syscall(Sysgetpriority, a(which), a(who)) : int64)
}
const shutdown	= {_a0, _a1
	 -> (syscall(Sysshutdown, a(_a0), a(_a1)) : int64)
}
const reboot	= {magic1, magic2, cmd, arg
	 -> (syscall(Sysreboot, a(magic1), a(magic2), a(cmd), a(arg)) : int64)
}
const restart_syscall	= {
	 -> (syscall(Sysrestart_syscall) : int64)
}
const kexec_load	= {entry, nr_segments, segments, flags
	 -> (syscall(Syskexec_load, a(entry), a(nr_segments), a(segments), a(flags)) : int64)
}
const kexec_file_load	= {kernel_fd, initrd_fd, cmdline_len, cmdline_ptr, flags
	 -> (syscall(Syskexec_file_load, a(kernel_fd), a(initrd_fd), a(cmdline_len), a(cmdline_ptr), a(flags)) : int64)
}
const waitid	= {which, pid, infop, options, ru
	 -> (syscall(Syswaitid, a(which), a(pid), a(infop), a(options), a(ru)) : int64)
}
const set_tid_address	= {tidptr
	 -> (syscall(Sysset_tid_address, a(tidptr)) : int64)
}
const init_module	= {umod, len, uargs
	 -> (syscall(Sysinit_module, a(umod), a(len), a(uargs)) : int64)
}
const delete_module	= {name_user, flags
	 -> (syscall(Sysdelete_module, a(name_user), a(flags)) : int64)
}
const rt_sigsuspend	= {unewset, sigsetsize
	 -> (syscall(Sysrt_sigsuspend, a(unewset), a(sigsetsize)) : int64)
}
const rt_sigaction	= {_a0, _a1, _a2, _a3
	 -> (syscall(Sysrt_sigaction, a(_a0), a(_a1), a(_a2), a(_a3)) : int64)
}
const rt_sigprocmask	= {how, set, oset, sigsetsize
	 -> (syscall(Sysrt_sigprocmask, a(how), a(set), a(oset), a(sigsetsize)) : int64)
}
const rt_sigpending	= {set, sigsetsize
	 -> (syscall(Sysrt_sigpending, a(set), a(sigsetsize)) : int64)
}
const rt_sigtimedwait	= {uthese, uinfo, uts, sigsetsize
	 -> (syscall(Sysrt_sigtimedwait, a(uthese), a(uinfo), a(uts), a(sigsetsize)) : int64)
}
const rt_tgsigqueueinfo	= {tgid, pid, sig, uinfo
	 -> (syscall(Sysrt_tgsigqueueinfo, a(tgid), a(pid), a(sig), a(uinfo)) : int64)
}
const tgkill	= {tgid, pid, sig
	 -> (syscall(Systgkill, a(tgid), a(pid), a(sig)) : int64)
}
const tkill	= {pid, sig
	 -> (syscall(Systkill, a(pid), a(sig)) : int64)
}
const rt_sigqueueinfo	= {pid, sig, uinfo
	 -> (syscall(Sysrt_sigqueueinfo, a(pid), a(sig), a(uinfo)) : int64)
}
const pause	= {
	 -> (syscall(Syspause) : int64)
}
const sync	= {
	 -> (syscall(Syssync) : int64)
}
const fsync	= {fd
	 -> (syscall(Sysfsync, a(fd)) : int64)
}
const fdatasync	= {fd
	 -> (syscall(Sysfdatasync, a(fd)) : int64)
}
const mount	= {dev_name, dir_name, kind, flags, data
	 -> (syscall(Sysmount, a(dev_name), a(dir_name), a(kind), a(flags), a(data)) : int64)
}
const umount2	= {name, flags
	 -> (syscall(Sysumount2, a(name), a(flags)) : int64)
}
const truncate	= {path, length
	 -> (syscall(Systruncate, a(path), a(length)) : int64)
}
const ftruncate	= {fd, length
	 -> (syscall(Sysftruncate, a(fd), a(length)) : int64)
}
const statfs	= {path, buf
	 -> (syscall(Sysstatfs, a(path), a(buf)) : int64)
}
const fstatfs	= {fd, buf
	 -> (syscall(Sysfstatfs, a(fd), a(buf)) : int64)
}
const ustat	= {dev, ubuf
	 -> (syscall(Sysustat, a(dev), a(ubuf)) : int64)
}
const setxattr	= {path, name, value, size, flags
	 -> (syscall(Syssetxattr, a(path), a(name), a(value), a(size), a(flags)) : int64)
}
const lsetxattr	= {path, name, value, size, flags
	 -> (syscall(Syslsetxattr, a(path), a(name), a(value), a(size), a(flags)) : int64)
}
const fsetxattr	= {fd, name, value, size, flags
	 -> (syscall(Sysfsetxattr, a(fd), a(name), a(value), a(size), a(flags)) : int64)
}
const getxattr	= {path, name, value, size
	 -> (syscall(Sysgetxattr, a(path), a(name), a(value), a(size)) : int64)
}
const lgetxattr	= {path, name, value, size
	 -> (syscall(Syslgetxattr, a(path), a(name), a(value), a(size)) : int64)
}
const fgetxattr	= {fd, name, value, size
	 -> (syscall(Sysfgetxattr, a(fd), a(name), a(value), a(size)) : int64)
}
const listxattr	= {path, list, size
	 -> (syscall(Syslistxattr, a(path), a(list), a(size)) : int64)
}
const llistxattr	= {path, list, size
	 -> (syscall(Sysllistxattr, a(path), a(list), a(size)) : int64)
}
const flistxattr	= {fd, list, size
	 -> (syscall(Sysflistxattr, a(fd), a(list), a(size)) : int64)
}
const removexattr	= {path, name
	 -> (syscall(Sysremovexattr, a(path), a(name)) : int64)
}
const lremovexattr	= {path, name
	 -> (syscall(Syslremovexattr, a(path), a(name)) : int64)
}
const fremovexattr	= {fd, name
	 -> (syscall(Sysfremovexattr, a(fd), a(name)) : int64)
}
const brk	= {brk
	 -> (syscall(Sysbrk, a(brk)) : int64)
}
const mprotect	= {start, len, prot
	 -> (syscall(Sysmprotect, a(start), a(len), a(prot)) : int64)
}
const mremap	= {addr, old_len, new_len, flags, new_addr
	 -> (syscall(Sysmremap, a(addr), a(old_len), a(new_len), a(flags), a(new_addr)) : int64)
}
const remap_file_pages	= {start, size, prot, pgoff, flags
	 -> (syscall(Sysremap_file_pages, a(start), a(size), a(prot), a(pgoff), a(flags)) : int64)
}
const msync	= {start, len, flags
	 -> (syscall(Sysmsync, a(start), a(len), a(flags)) : int64)
}
const fadvise	= {fd, offset, len, advice
	 -> (syscall(Sysfadvise, a(fd), a(offset), a(len), a(advice)) : int64)
}
const mlock	= {start, len
	 -> (syscall(Sysmlock, a(start), a(len)) : int64)
}
const munlock	= {start, len
	 -> (syscall(Sysmunlock, a(start), a(len)) : int64)
}
const mlockall	= {flags
	 -> (syscall(Sysmlockall, a(flags)) : int64)
}
const munlockall	= {
	 -> (syscall(Sysmunlockall) : int64)
}
const madvise	= {start, len, behavior
	 -> (syscall(Sysmadvise, a(start), a(len), a(behavior)) : int64)
}
const mincore	= {start, len, vec
	 -> (syscall(Sysmincore, a(start), a(len), a(vec)) : int64)
}
const pivot_root	= {new_root, put_old
	 -> (syscall(Syspivot_root, a(new_root), a(put_old)) : int64)
}
const chroot	= {filename
	 -> (syscall(Syschroot, a(filename)) : int64)
}
const mknod	= {filename, mode, dev
	 -> (syscall(Sysmknod, a(filename), a(mode), a(dev)) : int64)
}
const link	= {oldname, newname
	 -> (syscall(Syslink, a(oldname), a(newname)) : int64)
}
const symlink	= {old, new
	 -> (syscall(Syssymlink, a(old), a(new)) : int64)
}
const chmod	= {filename, mode
	 -> (syscall(Syschmod, a(filename), a(mode)) : int64)
}
const fchmod	= {fd, mode
	 -> (syscall(Sysfchmod, a(fd), a(mode)) : int64)
}
const fcntl	= {fd, cmd, arg
	 -> (syscall(Sysfcntl, a(fd), a(cmd), a(arg)) : int64)
}
const pipe2	= {fildes, flags
	 -> (syscall(Syspipe2, a(fildes), a(flags)) : int64)
}
const dup3	= {oldfd, newfd, flags
	 -> (syscall(Sysdup3, a(oldfd), a(newfd), a(flags)) : int64)
}
const ioperm	= {from, num, on
	 -> (syscall(Sysioperm, a(from), a(num), a(on)) : int64)
}
const flock	= {fd, cmd
	 -> (syscall(Sysflock, a(fd), a(cmd)) : int64)
}
const io_setup	= {nr_reqs, ctx
	 -> (syscall(Sysio_setup, a(nr_reqs), a(ctx)) : int64)
}
const io_destroy	= {ctx
	 -> (syscall(Sysio_destroy, a(ctx)) : int64)
}
const io_getevents	= {ctx_id, min_nr, nr, events, timeout
	 -> (syscall(Sysio_getevents, a(ctx_id), a(min_nr), a(nr), a(events), a(timeout)) : int64)
}
const io_submit	= {_a0, _a1, _a2
	 -> (syscall(Sysio_submit, a(_a0), a(_a1), a(_a2)) : int64)
}
const io_cancel	= {ctx_id, iocb, result
	 -> (syscall(Sysio_cancel, a(ctx_id), a(iocb), a(result)) : int64)
}
const sendfile	= {out_fd, in_fd, offset, count
	 -> (syscall(Syssendfile, a(out_fd), a(in_fd), a(offset), a(count)) : int64)
}
const access	= {filename, mode
	 -> (syscall(Sysaccess, a(filename), a(mode)) : int64)
}
const vhangup	= {
	 -> (syscall(Sysvhangup) : int64)
}
const chown	= {filename, user, group
	 -> (syscall(Syschown, a(filename), a(user), a(group)) : int64)
}
const lchown	= {filename, user, group
	 -> (syscall(Syslchown, a(filename), a(user), a(group)) : int64)
}
const fchown	= {fd, user, group
	 -> (syscall(Sysfchown, a(fd), a(user), a(group)) : int64)
}
const utime	= {filename, times
	 -> (syscall(Sysutime, a(filename), a(times)) : int64)
}
const utimes	= {filename, utimes
	 -> (syscall(Sysutimes, a(filename), a(utimes)) : int64)
}
const readahead	= {fd, offset, count
	 -> (syscall(Sysreadahead, a(fd), a(offset), a(count)) : int64)
}
const readv	= {fd, vec, vlen
	 -> (syscall(Sysreadv, a(fd), a(vec), a(vlen)) : int64)
}
const writev	= {fd, vec, vlen
	 -> (syscall(Syswritev, a(fd), a(vec), a(vlen)) : int64)
}
const preadv	= {fd, vec, vlen, pos_l, pos_h
	 -> (syscall(Syspreadv, a(fd), a(vec), a(vlen), a(pos_l), a(pos_h)) : int64)
}
const preadv2	= {fd, vec, vlen, pos_l, pos_h, flags
	 -> (syscall(Syspreadv2, a(fd), a(vec), a(vlen), a(pos_l), a(pos_h), a(flags)) : int64)
}
const pwritev	= {fd, vec, vlen, pos_l, pos_h
	 -> (syscall(Syspwritev, a(fd), a(vec), a(vlen), a(pos_l), a(pos_h)) : int64)
}
const pwritev2	= {fd, vec, vlen, pos_l, pos_h, flags
	 -> (syscall(Syspwritev2, a(fd), a(vec), a(vlen), a(pos_l), a(pos_h), a(flags)) : int64)
}
const fchdir	= {fd
	 -> (syscall(Sysfchdir, a(fd)) : int64)
}
const rmdir	= {pathname
	 -> (syscall(Sysrmdir, a(pathname)) : int64)
}
const lookup_dcookie	= {cookie64, buf, len
	 -> (syscall(Syslookup_dcookie, a(cookie64), a(buf), a(len)) : int64)
}
const quotactl	= {cmd, special, id, addr
	 -> (syscall(Sysquotactl, a(cmd), a(special), a(id), a(addr)) : int64)
}
const accept4	= {_a0, _a1, _a2, _a3
	 -> (syscall(Sysaccept4, a(_a0), a(_a1), a(_a2), a(_a3)) : int64)
}
const getsockname	= {_a0, _a1, _a2
	 -> (syscall(Sysgetsockname, a(_a0), a(_a1), a(_a2)) : int64)
}
const getpeername	= {_a0, _a1, _a2
	 -> (syscall(Sysgetpeername, a(_a0), a(_a1), a(_a2)) : int64)
}
const sendto	= {_a0, _a1, _a2, _a3, _a4, _a5
	 -> (syscall(Syssendto, a(_a0), a(_a1), a(_a2), a(_a3), a(_a4), a(_a5)) : int64)
}
const sendmmsg	= {fd, msg, vlen, flags
	 -> (syscall(Syssendmmsg, a(fd), a(msg), a(vlen), a(flags)) : int64)
}
const recvfrom	= {_a0, _a1, _a2, _a3, _a4, _a5
	 -> (syscall(Sysrecvfrom, a(_a0), a(_a1), a(_a2), a(_a3), a(_a4), a(_a5)) : int64)
}
const recvmmsg	= {fd, msg, vlen, flags, timeout
	 -> (syscall(Sysrecvmmsg, a(fd), a(msg), a(vlen), a(flags), a(timeout)) : int64)
}
const socketpair	= {_a0, _a1, _a2, _a3
	 -> (syscall(Syssocketpair, a(_a0), a(_a1), a(_a2), a(_a3)) : int64)
}
const select	= {n, inp, outp, exp, tvp
	 -> (syscall(Sysselect, a(n), a(inp), a(outp), a(exp), a(tvp)) : int64)
}
const epoll_create	= {size
	 -> (syscall(Sysepoll_create, a(size)) : int64)
}
const epoll_create1	= {flags
	 -> (syscall(Sysepoll_create1, a(flags)) : int64)
}
const epoll_ctl	= {epfd, op, fd, event
	 -> (syscall(Sysepoll_ctl, a(epfd), a(op), a(fd), a(event)) : int64)
}
const epoll_wait	= {epfd, events, maxevents, timeout
	 -> (syscall(Sysepoll_wait, a(epfd), a(events), a(maxevents), a(timeout)) : int64)
}
const epoll_pwait	= {epfd, events, maxevents, timeout, sigmask, sigsetsize
	 -> (syscall(Sysepoll_pwait, a(epfd), a(events), a(maxevents), a(timeout), a(sigmask), a(sigsetsize)) : int64)
}
const sethostname	= {name, len
	 -> (syscall(Syssethostname, a(name), a(len)) : int64)
}
const setdomainname	= {name, len
	 -> (syscall(Syssetdomainname, a(name), a(len)) : int64)
}
const getrlimit	= {resource, rlim
	 -> (syscall(Sysgetrlimit, a(resource), a(rlim)) : int64)
}
const setrlimit	= {resource, rlim
	 -> (syscall(Syssetrlimit, a(resource), a(rlim)) : int64)
}
const prlimit	= {pid, resource, new_rlim, old_rlim
	 -> (syscall(Sysprlimit, a(pid), a(resource), a(new_rlim), a(old_rlim)) : int64)
}
const getrusage	= {who, ru
	 -> (syscall(Sysgetrusage, a(who), a(ru)) : int64)
}
const umask	= {mask
	 -> (syscall(Sysumask, a(mask)) : int64)
}
const msgget	= {key, msgflg
	 -> (syscall(Sysmsgget, a(key), a(msgflg)) : int64)
}
const msgsnd	= {msqid, msgp, msgsz, msgflg
	 -> (syscall(Sysmsgsnd, a(msqid), a(msgp), a(msgsz), a(msgflg)) : int64)
}
const msgrcv	= {msqid, msgp, msgsz, msgtyp, msgflg
	 -> (syscall(Sysmsgrcv, a(msqid), a(msgp), a(msgsz), a(msgtyp), a(msgflg)) : int64)
}
const msgctl	= {msqid, cmd, buf
	 -> (syscall(Sysmsgctl, a(msqid), a(cmd), a(buf)) : int64)
}
const semget	= {key, nsems, semflg
	 -> (syscall(Syssemget, a(key), a(nsems), a(semflg)) : int64)
}
const semop	= {semid, sops, nsops
	 -> (syscall(Syssemop, a(semid), a(sops), a(nsops)) : int64)
}
const semtimedop	= {semid, sops, nsops, timeout
	 -> (syscall(Syssemtimedop, a(semid), a(sops), a(nsops), a(timeout)) : int64)
}
const shmat	= {shmid, shmaddr, shmflg
	 -> (syscall(Sysshmat, a(shmid), a(shmaddr), a(shmflg)) : int64)
}
const shmget	= {key, size, flag
	 -> (syscall(Sysshmget, a(key), a(size), a(flag)) : int64)
}
const shmdt	= {shmaddr
	 -> (syscall(Sysshmdt, a(shmaddr)) : int64)
}
const shmctl	= {shmid, cmd, buf
	 -> (syscall(Sysshmctl, a(shmid), a(cmd), a(buf)) : int64)
}
const mq_open	= {name, oflag, mode, attr
	 -> (syscall(Sysmq_open, a(name), a(oflag), a(mode), a(attr)) : int64)
}
const mq_unlink	= {name
	 -> (syscall(Sysmq_unlink, a(name)) : int64)
}
const mq_timedsend	= {mqdes, msg_ptr, msg_len, msg_prio, abs_timeout
	 -> (syscall(Sysmq_timedsend, a(mqdes), a(msg_ptr), a(msg_len), a(msg_prio), a(abs_timeout)) : int64)
}
const mq_timedreceive	= {mqdes, msg_ptr, msg_len, msg_prio, abs_timeout
	 -> (syscall(Sysmq_timedreceive, a(mqdes), a(msg_ptr), a(msg_len), a(msg_prio), a(abs_timeout)) : int64)
}
const mq_notify	= {mqdes, notification
	 -> (syscall(Sysmq_notify, a(mqdes), a(notification)) : int64)
}
const mq_getsetattr	= {mqdes, mqstat, omqstat
	 -> (syscall(Sysmq_getsetattr, a(mqdes), a(mqstat), a(omqstat)) : int64)
}
const prctl	= {option, arg2, arg3, arg4, arg5
	 -> (syscall(Sysprctl, a(option), a(arg2), a(arg3), a(arg4), a(arg5)) : int64)
}
const swapon	= {specialfile, swap_flags
	 -> (syscall(Sysswapon, a(specialfile), a(swap_flags)) : int64)
}
const swapoff	= {specialfile
	 -> (syscall(Sysswapoff, a(specialfile)) : int64)
}
const _sysctl	= {args
	 -> (syscall(Sys_sysctl, a(args)) : int64)
}
const sysinfo	= {info
	 -> (syscall(Syssysinfo, a(info)) : int64)
}
const sysfs	= {option, arg1, arg2
	 -> (syscall(Syssysfs, a(option), a(arg1), a(arg2)) : int64)
}
const syslog	= {kind, buf, len
	 -> (syscall(Syssyslog, a(kind), a(buf), a(len)) : int64)
}
const ptrace	= {request, pid, addr, data
	 -> (syscall(Sysptrace, a(request), a(pid), a(addr), a(data)) : int64)
}
const add_key	= {_type, _description, _payload, plen, destringid
	 -> (syscall(Sysadd_key, a(_type), a(_description), a(_payload), a(plen), a(destringid)) : int64)
}
const request_key	= {_type, _description, _callout_info, destringid
	 -> (syscall(Sysrequest_key, a(_type), a(_description), a(_callout_info), a(destringid)) : int64)
}
const keyctl	= {cmd, arg2, arg3, arg4, arg5
	 -> (syscall(Syskeyctl, a(cmd), a(arg2), a(arg3), a(arg4), a(arg5)) : int64)
}
const ioprio_set	= {which, who, ioprio
	 -> (syscall(Sysioprio_set, a(which), a(who), a(ioprio)) : int64)
}
const ioprio_get	= {which, who
	 -> (syscall(Sysioprio_get, a(which), a(who)) : int64)
}
const set_mempolicy	= {mode, nmask, maxnode
	 -> (syscall(Sysset_mempolicy, a(mode), a(nmask), a(maxnode)) : int64)
}
const migrate_pages	= {pid, maxnode, from, to
	 -> (syscall(Sysmigrate_pages, a(pid), a(maxnode), a(from), a(to)) : int64)
}
const move_pages	= {pid, nr_pages, pages, nodes, status, flags
	 -> (syscall(Sysmove_pages, a(pid), a(nr_pages), a(pages), a(nodes), a(status), a(flags)) : int64)
}
const mbind	= {start, len, mode, nmask, maxnode, flags
	 -> (syscall(Sysmbind, a(start), a(len), a(mode), a(nmask), a(maxnode), a(flags)) : int64)
}
const get_mempolicy	= {policy, nmask, maxnode, addr, flags
	 -> (syscall(Sysget_mempolicy, a(policy), a(nmask), a(maxnode), a(addr), a(flags)) : int64)
}
const inotify_init	= {
	 -> (syscall(Sysinotify_init) : int64)
}
const inotify_init1	= {flags
	 -> (syscall(Sysinotify_init1, a(flags)) : int64)
}
const inotify_add_watch	= {fd, path, mask
	 -> (syscall(Sysinotify_add_watch, a(fd), a(path), a(mask)) : int64)
}
const inotify_rm_watch	= {fd, wd
	 -> (syscall(Sysinotify_rm_watch, a(fd), a(wd)) : int64)
}
const mknodat	= {dfd, filename, mode, dev
	 -> (syscall(Sysmknodat, a(dfd), a(filename), a(mode), a(dev)) : int64)
}
const mkdirat	= {dfd, pathname, mode
	 -> (syscall(Sysmkdirat, a(dfd), a(pathname), a(mode)) : int64)
}
const unlinkat	= {dfd, pathname, flag
	 -> (syscall(Sysunlinkat, a(dfd), a(pathname), a(flag)) : int64)
}
const symlinkat	= {oldname, newdfd, newname
	 -> (syscall(Syssymlinkat, a(oldname), a(newdfd), a(newname)) : int64)
}
const linkat	= {olddfd, oldname, newdfd, newname, flags
	 -> (syscall(Syslinkat, a(olddfd), a(oldname), a(newdfd), a(newname), a(flags)) : int64)
}
const renameat	= {olddfd, oldname, newdfd, newname
	 -> (syscall(Sysrenameat, a(olddfd), a(oldname), a(newdfd), a(newname)) : int64)
}
const renameat2	= {olddfd, oldname, newdfd, newname, flags
	 -> (syscall(Sysrenameat2, a(olddfd), a(oldname), a(newdfd), a(newname), a(flags)) : int64)
}
const futimesat	= {dfd, filename, utimes
	 -> (syscall(Sysfutimesat, a(dfd), a(filename), a(utimes)) : int64)
}
const faccessat	= {dfd, filename, mode
	 -> (syscall(Sysfaccessat, a(dfd), a(filename), a(mode)) : int64)
}
const fchmodat	= {dfd, filename, mode
	 -> (syscall(Sysfchmodat, a(dfd), a(filename), a(mode)) : int64)
}
const fchownat	= {dfd, filename, user, group, flag
	 -> (syscall(Sysfchownat, a(dfd), a(filename), a(user), a(group), a(flag)) : int64)
}
const openat	= {dfd, filename, flags, mode
	 -> (syscall(Sysopenat, a(dfd), a(filename), a(flags), a(mode)) : int64)
}
const newfstatat	= {dfd, filename, statbuf, flag
	 -> (syscall(Sysnewfstatat, a(dfd), a(filename), a(statbuf), a(flag)) : int64)
}
const readlinkat	= {dfd, path, buf, bufsiz
	 -> (syscall(Sysreadlinkat, a(dfd), a(path), a(buf), a(bufsiz)) : int64)
}
const utimensat	= {dfd, filename, utimes, flags
	 -> (syscall(Sysutimensat, a(dfd), a(filename), a(utimes), a(flags)) : int64)
}
const unshare	= {unshare_flags
	 -> (syscall(Sysunshare, a(unshare_flags)) : int64)
}
const splice	= {fd_in, off_in, fd_out, off_out, len, flags
	 -> (syscall(Syssplice, a(fd_in), a(off_in), a(fd_out), a(off_out), a(len), a(flags)) : int64)
}
const vmsplice	= {fd, iov, nr_segs, flags
	 -> (syscall(Sysvmsplice, a(fd), a(iov), a(nr_segs), a(flags)) : int64)
}
const tee	= {fdin, fdout, len, flags
	 -> (syscall(Systee, a(fdin), a(fdout), a(len), a(flags)) : int64)
}
const sync_file_range	= {fd, offset, nbytes, flags
	 -> (syscall(Syssync_file_range, a(fd), a(offset), a(nbytes), a(flags)) : int64)
}
const get_robust_list	= {pid, head_ptr, len_ptr
	 -> (syscall(Sysget_robust_list, a(pid), a(head_ptr), a(len_ptr)) : int64)
}
const set_robust_list	= {head, len
	 -> (syscall(Sysset_robust_list, a(head), a(len)) : int64)
}
const getcpu	= {cpu, node, cache
	 -> (syscall(Sysgetcpu, a(cpu), a(node), a(cache)) : int64)
}
const signalfd	= {ufd, user_mask, sizemask
	 -> (syscall(Syssignalfd, a(ufd), a(user_mask), a(sizemask)) : int64)
}
const signalfd4	= {ufd, user_mask, sizemask, flags
	 -> (syscall(Syssignalfd4, a(ufd), a(user_mask), a(sizemask), a(flags)) : int64)
}
const timerfd_create	= {clockid, flags
	 -> (syscall(Systimerfd_create, a(clockid), a(flags)) : int64)
}
const timerfd_settime	= {ufd, flags, utmr, otmr
	 -> (syscall(Systimerfd_settime, a(ufd), a(flags), a(utmr), a(otmr)) : int64)
}
const timerfd_gettime	= {ufd, otmr
	 -> (syscall(Systimerfd_gettime, a(ufd), a(otmr)) : int64)
}
const eventfd	= {count
	 -> (syscall(Syseventfd, a(count)) : int64)
}
const eventfd2	= {count, flags
	 -> (syscall(Syseventfd2, a(count), a(flags)) : int64)
}
const memfd_create	= {uname_ptr, flags
	 -> (syscall(Sysmemfd_create, a(uname_ptr), a(flags)) : int64)
}
const userfaultfd	= {flags
	 -> (syscall(Sysuserfaultfd, a(flags)) : int64)
}
const pselect6	= {_a0, _a1, _a2, _a3, _a4, _a5
	 -> (syscall(Syspselect6, a(_a0), a(_a1), a(_a2), a(_a3), a(_a4), a(_a5)) : int64)
}
const ppoll	= {_a0, int, _a2, _a3, _a4
	 -> (syscall(Sysppoll, a(_a0), a(int), a(_a2), a(_a3), a(_a4)) : int64)
}
const fanotify_init	= {flags, event_f_flags
	 -> (syscall(Sysfanotify_init, a(flags), a(event_f_flags)) : int64)
}
const fanotify_mark	= {fanotify_fd, flags, mask, fd, pathname
	 -> (syscall(Sysfanotify_mark, a(fanotify_fd), a(flags), a(mask), a(fd), a(pathname)) : int64)
}
const syncfs	= {fd
	 -> (syscall(Syssyncfs, a(fd)) : int64)
}
const vfork	= {
	 -> (syscall(Sysvfork) : int64)
}
const perf_event_open	= {attr_uptr, pid, cpu, group_fd, flags
	 -> (syscall(Sysperf_event_open, a(attr_uptr), a(pid), a(cpu), a(group_fd), a(flags)) : int64)
}
const name_to_handle_at	= {dfd, name, handle, mnt_id, flag
	 -> (syscall(Sysname_to_handle_at, a(dfd), a(name), a(handle), a(mnt_id), a(flag)) : int64)
}
const open_by_handle_at	= {mountdirfd, handle, flags
	 -> (syscall(Sysopen_by_handle_at, a(mountdirfd), a(handle), a(flags)) : int64)
}
const setns	= {fd, nstype
	 -> (syscall(Syssetns, a(fd), a(nstype)) : int64)
}
const process_vm_readv	= {pid, lvec, liovcnt, rvec, riovcnt, flags
	 -> (syscall(Sysprocess_vm_readv, a(pid), a(lvec), a(liovcnt), a(rvec), a(riovcnt), a(flags)) : int64)
}
const process_vm_writev	= {pid, lvec, liovcnt, rvec, riovcnt, flags
	 -> (syscall(Sysprocess_vm_writev, a(pid), a(lvec), a(liovcnt), a(rvec), a(riovcnt), a(flags)) : int64)
}
const kcmp	= {pid1, pid2, kind, idx1, idx2
	 -> (syscall(Syskcmp, a(pid1), a(pid2), a(kind), a(idx1), a(idx2)) : int64)
}
const finit_module	= {fd, uargs, flags
	 -> (syscall(Sysfinit_module, a(fd), a(uargs), a(flags)) : int64)
}
const seccomp	= {op, flags, uargs
	 -> (syscall(Sysseccomp, a(op), a(flags), a(uargs)) : int64)
}
const getrandom	= {buf, count, flags
	 -> (syscall(Sysgetrandom, a(buf), a(count), a(flags)) : int64)
}
const bpf	= {cmd, attr, size
	 -> (syscall(Sysbpf, a(cmd), a(attr), a(size)) : int64)
}
const execveat	= {dfd, filename, argv, envp, flags
	 -> (syscall(Sysexecveat, a(dfd), a(filename), a(argv), a(envp), a(flags)) : int64)
}
const membarrier	= {cmd, flags
	 -> (syscall(Sysmembarrier, a(cmd), a(flags)) : int64)
}
const copy_file_range	= {fd_in, off_in, fd_out, off_out, len, flags
	 -> (syscall(Syscopy_file_range, a(fd_in), a(off_in), a(fd_out), a(off_out), a(len), a(flags)) : int64)
}
const mlock2	= {start, len, flags
	 -> (syscall(Sysmlock2, a(start), a(len), a(flags)) : int64)
}
const pkey_mprotect	= {start, len, prot, pkey
	 -> (syscall(Syspkey_mprotect, a(start), a(len), a(prot), a(pkey)) : int64)
}
const pkey_alloc	= {flags, init_val
	 -> (syscall(Syspkey_alloc, a(flags), a(init_val)) : int64)
}
const pkey_free	= {pkey
	 -> (syscall(Syspkey_free, a(pkey)) : int64)
}