shithub: mc

Download patch

ref: 93021acafb5a87b728ab1e528465a665f830ec77
parent: 137b08b71982b6c82921b9ece97240da4890bf23
author: Ori Bernstein <ori@deb.here>
date: Sun Aug 13 18:15:11 EDT 2017

Add full Linux support, generated from Linux syscall tables.

--- a/lib/sys/sys+linux-x64.myr
+++ b/lib/sys/sys+linux-x64.myr
@@ -10,18 +10,18 @@
 	type intptr	= uint64	/* can hold any pointer losslessly */
 	type time	= int64		/* milliseconds since epoch */
 	type scno	= int64		/* syscall */
-
+	
 	/* 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 */
@@ -30,21 +30,22 @@
 	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
@@ -57,7 +58,7 @@
 		`Clockrealtimealarm
 		`Clockboottimealarm
 	;;
-
+	
 	type waitstatus = union
 		`Waitexit int32
 		`Waitsig  int32
@@ -64,11 +65,11 @@
 		`Waitstop int32
 		`Waitfail int32
 	;;
-
+	
 	type sigset = struct
 		bits	: uint32[2]
 	;;
-
+	
 	type sigaction = struct
 		handler	: byte#	/* code pointer */
 		flags	: sigflags
@@ -75,21 +76,21 @@
 		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
@@ -98,27 +99,73 @@
 		notify	: int
 		_pad	: int[Sigevpadsz]
 	;;
-
+	
 	type timespec = struct
 		sec	: uint64
 		nsec	: uint64
 	;;
-
+	
 	type timeval = struct
 		sec	: uint64
 		usec	: uint64
 	;;
-
+	
+	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
@@ -136,7 +183,29 @@
 		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
@@ -144,7 +213,7 @@
 		etype	: byte
 		name	: byte[...]	/* special case; zero length => unchecked indexing */
 	;;
-
+	
 	type utsname = struct
 		system	: byte[65]
 		node	: byte[65]
@@ -153,12 +222,12 @@
 		machine	: byte[65]
 		domain	: byte[65]
 	;;
-
+	
 	type sockaddr = struct
 		fam	: sockfam
 		data	: byte[14]
 	;;
-
+	
 	type sockaddr_in = struct
 		fam	: sockfam
 		port	: uint16
@@ -165,7 +234,7 @@
 		addr	: byte[4]
 		zero	: byte[8]
 	;;
-
+	
 	type sockaddr_in6 = struct
 		fam	: sockfam
 		port	: uint16
@@ -172,43 +241,88 @@
 		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
@@ -218,12 +332,37 @@
 		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
@@ -230,18 +369,25 @@
 		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
@@ -266,10 +412,10 @@
 	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
@@ -285,7 +431,7 @@
 	const Onofollow	: fdopt = 0x20000
 	const Onoatime	: fdopt = 0x40000
 	const Ocloexec	: fdopt = 0x80000
-
+	
 	/* stat modes */
 	const Sifmt	: filemode = 0xf000
 	const Sififo	: filemode = 0x1000
@@ -295,7 +441,7 @@
 	const Sifreg	: filemode = 0x8000
 	const Siflnk	: filemode = 0xa000
 	const Sifsock	: filemode = 0xc000
-
+	
 	/* mmap protection */
 	const Mprotnone	: mprot = 0x0
 	const Mprotrd	: mprot = 0x1
@@ -302,7 +448,7 @@
 	const Mprotwr	: mprot = 0x2
 	const Mprotexec	: mprot = 0x4
 	const Mprotrw	: mprot = 0x3 /* convenience */
-
+	
 	/* mmap options */
 	const Mshared	: mopt = 0x1
 	const Mpriv	: mopt = 0x2
@@ -310,13 +456,13 @@
 	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 */
@@ -325,7 +471,7 @@
 	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
@@ -350,10 +496,10 @@
 	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
@@ -360,7 +506,7 @@
 	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
@@ -370,18 +516,18 @@
 	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
@@ -397,7 +543,7 @@
 	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
@@ -412,10 +558,10 @@
 	const Futexwakebitset	: futexop = 10
 	const Futexwaitrequeuepi	: futexop = 11
 	const Futexcmprequeuepi	: futexop = 12
-
+	
 	const Futexpriv	: futexop = 128
 	const Futexclockrt	: futexop = 256
-
+	
 	/* poll events : posix */
 	const Pollin	: pollevt = 0x001	/* There is data to read.  */
 	const Pollpri	: pollevt = 0x002	/* There is urgent data to read.  */
@@ -423,25 +569,25 @@
 	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
@@ -453,7 +599,7 @@
 	const Saresethand	: sigflags = 0x80000000
 	const Sanomask		: sigflags = Sanodefer
 	const Saoneshot		: sigflags = Saresethand
-
+	
 	/* signal numbers */
 	const Sighup	: signo = 1
 	const Sigint	: signo = 2
@@ -486,7 +632,7 @@
 	const Sigwinch	: signo = 28
 	const Sigio	: signo = 29
 	const Sigpoll	: signo = Sigio
-
+	
 	/* fallocate mode */
 	const Fallockeepsize		: fallocmode = 0x01
 	const Fallocpunchhole		: fallocmode = 0x02
@@ -494,168 +640,199 @@
 	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 ulong = uint64
-	type sigstack = sigaltstack
-	type greg = int64
-	type gregset = greg[23]
-	type fpregset = _libc_fpstate#
-	type uintptr = uint64
-	type loff = int64
-	type fd_mask = int64
-	type key = int
+	
+	type kernel_clock = int64
 	type uid = uint
 	type gid = uint
-	type syscall_ulong = uint64
-	type shmatt = syscall_ulong
-	type msgqnum = syscall_ulong
-	type msglen = syscall_ulong
-	type rlim = uint64
-	type kernel_long = int64
-	type kernel_ulong = uint64
-	type u16 = uint16
-	type u32 = uint
-	type dev = uint64
-	type daddr = int
-	type ino = uint64
-	type fsword = int64
-	type fsblkcnt = uint64
-	type fsfilcnt = uint64
+	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 _libc_fpxreg = struct
-		significand	: uint16[4]
-		exponent	: uint16
-		padding	: uint16[3]
-
+	
+	type itimerval = struct
+		interval	: timeval
+		value	: timeval
+	
 	;;
-
-	type _libc_xmmreg = struct
-		element	: uint32[4]
-
+	
+	type itimerspec = struct
+		interval	: timespec
+		value	: timespec
+	
 	;;
-
-	type _libc_fpstate = struct
-		cwd	: uint16
-		swd	: uint16
-		ftw	: uint16
-		fop	: uint16
-		rip	: uint64
-		rdp	: uint64
-		mxcsr	: uint32
-		mxcr_mask	: uint32
-		_st	: _libc_fpxreg[8]
-		_xmm	: _libc_xmmreg[16]
-		padding	: uint32[24]
-
+	
+	type io_event = struct
+		data	: uint64
+		obj	: uint64
+		res	: s64
+		res2	: s64
+	
 	;;
-
-	type mcontext = struct
-		gregs	: gregset
-		fpregs	: fpregset
-		__reserved1	: uint64[8]
-
+	
+	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 ucontext = struct
-		uc_flags	: uint64
-		uc_link	: ucontext#
-		uc_stack	: sigstack
-		uc_mcontext	: mcontext
-		uc_sigmask	: sigset
-		__fpregs_mem	: _libc_fpstate
-
+	
+	type utimbuf = struct
+		actime	: kernel_time
+		modtime	: kernel_time
+	
 	;;
-
+	
 	type fdset = struct
 		bits	: fd_mask[16]
-
+	
 	;;
-
-	type ipc_perm = struct
-		__key	: key
-		uid	: uid
-		gid	: gid
-		cuid	: uid
-		cgid	: gid
-		mode	: uint16
-		__pad1	: uint16
-		__seq	: uint16
-		__pad2	: uint16
-		__glibc_reserved1	: syscall_ulong
-		__glibc_reserved2	: syscall_ulong
-
+	
+	type rlimit = struct
+		cur	: kernel_ulong
+		max	: kernel_ulong
+	
 	;;
-
-	type shmid_ds = struct
-		shm_perm	: ipc_perm
-		shm_segsz	: size
-		shm_atime	: time
-		shm_dtime	: time
-		shm_ctime	: time
-		shm_cpid	: pid
-		shm_lpid	: pid
-		shm_nattch	: shmatt
-		__glibc_reserved4	: syscall_ulong
-		__glibc_reserved5	: syscall_ulong
-
+	
+	type rlimit64 = struct
+		cur	: uint64
+		max	: uint64
+	
 	;;
-
-	type itimerval = struct
-		interval	: timeval
-		value	: timeval
-
+	
+	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 msqid_ds = struct
-		msg_perm	: ipc_perm
-		msg_stime	: time
-		msg_rtime	: time
-		msg_ctime	: time
-		__msg_cbytes	: syscall_ulong
-		msg_qnum	: msgqnum
-		msg_qbytes	: msglen
-		msg_lspid	: pid
-		msg_lrpid	: pid
-		__glibc_reserved4	: syscall_ulong
-		__glibc_reserved5	: syscall_ulong
-
+	
+	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 timezone = struct
-		minuteswest	: int
-		dsttime	: int
-
+	
+	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 rlimit = struct
-		cur	: rlim
-		max	: rlim
-
+	
+	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]
@@ -665,272 +842,127 @@
 		bufferram	: kernel_ulong
 		totalswap	: kernel_ulong
 		freeswap	: kernel_ulong
-		procs	: u16
-		pad	: u16
+		procs	: uint16
+		pad	: uint16
 		totalhigh	: kernel_ulong
 		freehigh	: kernel_ulong
-		mem_unit	: u32
+		mem_unit	: uint32
 		_f	: byte[0]
-
+	
 	;;
-
-	type tms = struct
-		utime	: clock
-		stime	: clock
-		cutime	: clock
-		cstime	: clock
-
-	;;
-
-	type utimbuf = struct
-		actime	: time
-		modtime	: time
-
-	;;
-
-	type ustat = struct
-		tfree	: daddr
-		tinode	: ino
-		fname	: byte[6]
-		fpack	: byte[6]
-
-	;;
-
-	type fsid = struct
-		__val	: int[2]
-
-	;;
-
-	type statfs = struct
-		kind	: fsword
-		bsize	: fsword
-		blocks	: fsblkcnt
-		bfree	: fsblkcnt
-		bavail	: fsblkcnt
-		files	: fsfilcnt
-		ffree	: fsfilcnt
-		fsid	: fsid
-		namelen	: fsword
-		frsize	: fsword
-		flags	: fsword
-		spare	: fsword[4]
-
-	;;
-
-	type sysctl_args = struct
-		name	: int#
-		nlen	: int
-		oldval	: void#
-		oldlenp	: size#
-		newval	: void#
-		newlen	: size
-		__unused	: uint64[4]
-
-	;;
-
-	type itimerspec = struct
-		interval	: timespec
-		value	: timespec
-
-	;;
-
+	
 	type robust_list = struct
 		next	: robust_list#
-
+	
 	;;
-
+	
 	type robust_list_head = struct
 		list	: robust_list
 		futex_offset	: int64
 		list_op_pending	: robust_list#
-
+	
 	;;
+	
 
-
-	const Sysread			: scno = 0
-	const Syswrite			: scno = 1
-	const Sysopen			: scno = 2
-	const Sysclose			: scno = 3
-	const Sysstat			: scno = 4
-	const Sysfstat			: scno = 5
-	const Syslstat			: scno = 6
-	const Syspoll			: scno = 7
-	const Syslseek			: scno = 8
-	const Sysmmap			: scno = 9
-	const Sysmprotect		: scno = 10
-	const Sysmunmap			: scno = 11
-	const Sysbrk			: scno = 12
-	const Sysrt_sigaction		: scno = 13
-	const Sysrt_sigprocmask		: scno = 14
-	const Sysrt_sigreturn		: scno = 15
-	const Sysioctl			: scno = 16
-	const Syspread			: scno = 17
-	const Syspwrite			: scno = 18
-	const Sysreadv			: scno = 19
-	const Syswritev			: scno = 20
-	const Sysaccess			: scno = 21
-	const Syspipe			: scno = 22
-	const Sysselect			: scno = 23
-	const Syssched_yield		: scno = 24
-	const Sysmremap			: scno = 25
-	const Sysmsync			: scno = 26
-	const Sysmincore		: scno = 27
-	const Sysmadvise		: scno = 28
-	const Sysshmget			: scno = 29
-	const Sysshmat			: scno = 30
-	const Sysshmctl			: scno = 31
-	const Sysdup			: scno = 32
-	const Sysdup2			: scno = 33
-	const Syspause			: scno = 34
+	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 Sysgetitimer		: scno = 36
 	const Sysalarm			: scno = 37
-	const Syssetitimer		: scno = 38
 	const Sysgetpid			: scno = 39
-	const Syssendfile		: scno = 40
-	const Syssocket			: scno = 41
-	const Sysconnect		: scno = 42
-	const Sysaccept			: scno = 43
-	const Syssendto			: scno = 44
-	const Sysrecvfrom		: scno = 45
-	const Syssendmsg		: scno = 46
-	const Sysrecvmsg		: scno = 47
-	const Sysshutdown		: scno = 48
-	const Sysbind			: scno = 49
-	const Syslisten			: scno = 50
-	const Sysgetsockname		: scno = 51
-	const Sysgetpeername		: scno = 52
-	const Syssocketpair		: scno = 53
-	const Syssetsockopt		: scno = 54
-	const Sysgetsockopt		: scno = 55
-	const Sysclone			: scno = 56
-	const Sysfork			: scno = 57
-	const Sysvfork			: scno = 58
-	const Sysexecve			: scno = 59
-	const Sysexit			: scno = 60
-	const Syswait4			: scno = 61
-	const Syskill			: scno = 62
-	const Sysuname			: scno = 63
-	const Syssemget			: scno = 64
-	const Syssemop			: scno = 65
-	const Syssemctl			: scno = 66
-	const Sysshmdt			: scno = 67
-	const Sysmsgget			: scno = 68
-	const Sysmsgsnd			: scno = 69
-	const Sysmsgrcv			: scno = 70
-	const Sysmsgctl			: scno = 71
-	const Sysfcntl			: scno = 72
-	const Sysflock			: scno = 73
-	const Sysfsync			: scno = 74
-	const Sysfdatasync		: scno = 75
-	const Systruncate		: scno = 76
-	const Sysftruncate		: scno = 77
-	const Sysgetdents		: scno = 78
-	const Sysgetcwd			: scno = 79
-	const Syschdir			: scno = 80
-	const Sysfchdir			: scno = 81
-	const Sysrename			: scno = 82
-	const Sysmkdir			: scno = 83
-	const Sysrmdir			: scno = 84
-	const Syscreat			: scno = 85
-	const Syslink			: scno = 86
-	const Sysunlink			: scno = 87
-	const Syssymlink		: scno = 88
-	const Sysreadlink		: scno = 89
-	const Syschmod			: scno = 90
-	const Sysfchmod			: scno = 91
-	const Syschown			: scno = 92
-	const Sysfchown			: scno = 93
-	const Syslchown			: scno = 94
-	const Sysumask			: scno = 95
-	const Sysgettimeofday		: scno = 96
-	const Sysgetrlimit		: scno = 97
-	const Sysgetrusage		: scno = 98
-	const Syssysinfo		: scno = 99
-	const Systimes			: scno = 100
-	const Sysptrace			: scno = 101
+	const Sysgetppid		: scno = 110
 	const Sysgetuid			: scno = 102
-	const Syssyslog			: scno = 103
-	const Sysgetgid			: scno = 104
-	const Syssetuid			: scno = 105
-	const Syssetgid			: scno = 106
 	const Sysgeteuid		: scno = 107
+	const Sysgetgid			: scno = 104
 	const Sysgetegid		: scno = 108
-	const Syssetpgid		: scno = 109
-	const Sysgetppid		: scno = 110
+	const Sysgetresuid		: scno = 118
+	const Sysgetresgid		: scno = 120
+	const Sysgetpgid		: scno = 121
 	const Sysgetpgrp		: scno = 111
-	const Syssetsid			: scno = 112
-	const Syssetreuid		: scno = 113
-	const Syssetregid		: scno = 114
+	const Sysgetsid			: scno = 124
 	const Sysgetgroups		: scno = 115
-	const Syssetgroups		: scno = 116
+	const Syssetregid		: scno = 114
+	const Syssetgid			: scno = 106
+	const Syssetreuid		: scno = 113
+	const Syssetuid			: scno = 105
 	const Syssetresuid		: scno = 117
-	const Sysgetresuid		: scno = 118
 	const Syssetresgid		: scno = 119
-	const Sysgetresgid		: scno = 120
-	const Sysgetpgid		: scno = 121
 	const Syssetfsuid		: scno = 122
 	const Syssetfsgid		: scno = 123
-	const Sysgetsid			: scno = 124
+	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 Sysrt_sigpending		: scno = 127
-	const Sysrt_sigtimedwait	: scno = 128
-	const Sysrt_sigqueueinfo	: scno = 129
-	const Sysrt_sigsuspend		: scno = 130
-	const Syssigaltstack		: scno = 131
-	const Sysutime			: scno = 132
-	const Sysmknod			: scno = 133
 	const Syspersonality		: scno = 135
-	const Sysustat			: scno = 136
-	const Sysstatfs			: scno = 137
-	const Sysfstatfs		: scno = 138
-	const Syssysfs			: scno = 139
-	const Sysgetpriority		: scno = 140
-	const Syssetpriority		: scno = 141
-	const Syssched_setparam		: scno = 142
-	const Syssched_getparam		: scno = 143
+	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 Sysmlock			: scno = 149
-	const Sysmunlock		: scno = 150
-	const Sysmlockall		: scno = 151
-	const Sysmunlockall		: scno = 152
-	const Sysvhangup		: scno = 153
-	const Syspivot_root		: scno = 155
-	const Syssysctl			: scno = 156
-	const Sysprctl			: scno = 157
-	const Sysarch_prctl		: scno = 158
-	const Sysadjtimex		: scno = 159
-	const Syssetrlimit		: scno = 160
-	const Syschroot			: scno = 161
-	const Syssync			: scno = 162
-	const Sysacct			: scno = 163
-	const Syssettimeofday		: scno = 164
-	const Sysmount			: scno = 165
-	const Sysumount			: scno = 166
-	const Sysswapon			: scno = 167
-	const Sysswapoff		: scno = 168
+	const Syssetpriority		: scno = 141
+	const Sysgetpriority		: scno = 140
+	const Sysshutdown		: scno = 48
 	const Sysreboot			: scno = 169
-	const Syssethostname		: scno = 170
-	const Syssetdomainname		: scno = 171
-	const Sysiopl			: scno = 172
-	const Syscreate_module		: scno = 174
+	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 Sysget_kernel_syms	: scno = 177
-	const Sysquery_module		: scno = 178
-	const Sysquotactl		: scno = 179
-	const Sysnfsservctl		: scno = 180
-	const Sysgetpmsg		: scno = 181
-	const Sysputpmsg		: scno = 182
-	const Sysafs_syscall		: scno = 183
-	const Systuxcall		: scno = 184
-	const Syssecurity		: scno = 185
-	const Sysgettid			: scno = 186
+	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
@@ -943,38 +975,118 @@
 	const Sysremovexattr		: scno = 197
 	const Syslremovexattr		: scno = 198
 	const Sysfremovexattr		: scno = 199
-	const Systkill			: scno = 200
-	const Systime			: scno = 201
-	const Sysfutex			: scno = 202
-	const Syssched_setaffinity	: scno = 203
-	const Syssched_getaffinity	: scno = 204
-	const Sysset_thread_area	: scno = 205
-	const Syslookup_dcookie		: scno = 212
-	const Sysepoll_create		: scno = 213
-	const Sysepoll_ctl_old		: scno = 214
-	const Sysepoll_wait_old		: scno = 215
+	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 = 0
+	const Syspwrite			: scno = 0
+	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 Sysset_tid_address	: scno = 218
-	const Syssemtimedop		: scno = 220
-	const Sysfadvise64		: scno = 221
-	const Systimer_create		: scno = 222
-	const Systimer_settime		: scno = 223
-	const Systimer_gettime		: scno = 224
-	const Systimer_getoverrun	: scno = 225
-	const Systimer_delete		: scno = 226
-	const Sysclock_settime		: scno = 227
-	const Sysclock_gettime		: scno = 228
-	const Sysclock_getres		: scno = 229
-	const Sysclock_nanosleep	: scno = 230
-	const Sysexit_group		: scno = 231
-	const Sysepoll_wait		: scno = 232
+	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 Systgkill			: scno = 234
-	const Sysutimes			: scno = 235
-	const Sysmbind			: scno = 237
-	const Sysset_mempolicy		: scno = 238
-	const Sysget_mempolicy		: scno = 239
+	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
@@ -981,73 +1093,89 @@
 	const Sysmq_timedreceive	: scno = 243
 	const Sysmq_notify		: scno = 244
 	const Sysmq_getsetattr		: scno = 245
-	const Syskexec_load		: scno = 246
-	const Syswaitid			: scno = 247
+	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 Sysmigrate_pages		: scno = 256
-	const Sysopenat			: scno = 257
-	const Sysmkdirat		: scno = 258
 	const Sysmknodat		: scno = 259
-	const Sysfchownat		: scno = 260
-	const Sysfutimesat		: scno = 261
-	const Sysfstatat		: scno = 262
+	const Sysmkdirat		: scno = 258
 	const Sysunlinkat		: scno = 263
-	const Sysrenameat		: scno = 264
-	const Syslinkat			: scno = 265
 	const Syssymlinkat		: scno = 266
-	const Sysreadlinkat		: scno = 267
-	const Sysfchmodat		: scno = 268
+	const Syslinkat			: scno = 265
+	const Sysrenameat		: scno = 264
+	const Sysrenameat2		: scno = 316
+	const Sysfutimesat		: scno = 261
 	const Sysfaccessat		: scno = 269
-	const Syspselect6		: scno = 270
-	const Sysppoll			: scno = 271
+	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 Sysset_robust_list	: scno = 273
-	const Sysget_robust_list	: scno = 274
 	const Syssplice			: scno = 275
+	const Sysvmsplice		: scno = 278
 	const Systee			: scno = 276
 	const Syssync_file_range	: scno = 277
-	const Sysvmsplice		: scno = 278
-	const Sysmove_pages		: scno = 279
-	const Sysutimensat		: scno = 280
-	const Sysepoll_pwait		: scno = 281
+	const Sysget_robust_list	: scno = 274
+	const Sysset_robust_list	: scno = 273
+	const Sysgetcpu			: scno = 309
 	const Syssignalfd		: scno = 282
-	const Systimerfd		: scno = 283
-	const Syseventfd		: scno = 284
-	const Sysfallocate		: scno = 285
+	const Syssignalfd4		: scno = 289
+	const Systimerfd_create		: scno = 283
 	const Systimerfd_settime	: scno = 286
 	const Systimerfd_gettime	: scno = 287
-	const Sysaccept4		: scno = 288
-	const Syssignalfd4		: scno = 289
+	const Syseventfd		: scno = 284
 	const Syseventfd2		: scno = 290
-	const Sysepoll_create1		: scno = 291
-	const Sysdup3			: scno = 292
-	const Syspipe2			: scno = 293
-	const Sysinotify_init1		: scno = 294
-	const Syspreadv			: scno = 295
-	const Syspwritev		: scno = 296
-	const Sysrt_tsigqueueinfo	: scno = 297
-	const Sysperf_event_open	: scno = 298
-	const Sysrecvmmsg		: scno = 299
+	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 Sysprlimit64		: scno = 302
+	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 Sysclock_adjtime		: scno = 305
-	const Syssyncfs			: scno = 306
-	const Syssendmmsg		: scno = 307
 	const Syssetns			: scno = 308
-	const Sysprocess_vm_readv	: scno = 309
-	const Sysprocess_vm_writev	: scno = 310
-	const Syskcmp			: scno = 311
-	const Sysfinit_module		: scno = 312
+	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
 
 	/* start manual overrides { */
 	extern const syscall	: (sc:scno, args:... -> int64)
@@ -1094,6 +1222,7 @@
 	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)
@@ -1128,290 +1257,301 @@
 	extern const alloca	: (sz : size	-> byte#)
 	/* } end manual overrides */
 
-	const mprotect			:  (addr : void#, len : int, prot : int -> int)
-	const brk			:  (dsend : ulong -> int)
-	const rt_sigaction		:  (sig : int, act : sigaction#, oact : sigaction#, sigsetsize : size -> int)
-	const rt_sigprocmask		:  (how : int, mask : sigset#, omask : sigset#, sigsetsize : size -> int)
-	const rt_sigreturn		:  (ucp : ucontext# -> int)
-	const readv			:  (fd : int, iovp : iovec#, iovcnt : uint -> int)
-	const writev			:  (fd : int, iovp : iovec#, iovcnt : uint -> int)
-	const access			:  (path : byte#, amode : int -> int)
-	const select			:  (nfds : int, readfds : fdset#, writefds : fdset#, exceptfds : fdset#, timeout : timeval# -> int)
-	const sched_yield		:  ( -> int)
-	const mremap			:  (addr : ulong, old_len : ulong, new_len : ulong, flags : ulong, new_addr : ulong -> int)
-	const msync			:  (addr : ulong, len : size, fl : int -> int)
-	const mincore			:  (start : ulong, len : size, vec : byte# -> int)
-	const madvise			:  (addr : void#, len : size, behav : int -> int)
-	const shmget			:  (key : key, size : size, shmflg : int -> int)
-	const shmat			:  (shmid : int, shmaddr : byte#, shmflg : int -> int)
-	const shmctl			:  (shmid : int, cmd : int, buf : shmid_ds# -> int)
-	const pause			:  ( -> int)
-	const getitimer			:  (which : int, itv : itimerval# -> int)
-	const alarm			:  (secs : uint -> int)
-	const setitimer			:  (which : int, itv : itimerval#, oitv : itimerval# -> int)
-	const sendfile			:  (out : int, _in : int, offset : int64#, count : size -> int)
-	const sendto			:  (s : int, msg : uintptr, len : int, flags : int, to : uintptr, tolen : int -> int)
-	const recvfrom			:  (s : int, buf : uintptr, len : size, flags : int, from : uintptr, fromlen : uintptr -> int)
-	const shutdown			:  (s : int, how : int -> int)
-	const getsockname		:  (s : int, addr : uintptr, namelen : uintptr -> int)
-	const getpeername		:  (s : int, addr : uintptr, namelen : uintptr -> int)
-	const socketpair		:  (domain : int, kind : int, protocol : int, rsv : uintptr -> int)
-	const vfork			:  ( -> int)
-	const semget			:  (key : key, nsems : int, semflg : int -> int)
-	const semop			:  (semid : int, tsops : sembuf#, nsops : uint -> int)
-	const shmdt			:  (shmaddr : byte# -> int)
-	const msgget			:  (key : key, msgflg : int -> int)
-	const msgsnd			:  (msqid : int, msgp : msgbuf#, msgsz : size, msgflg : int -> int)
-	const msgrcv			:  (msqid : int, msgp : msgbuf#, msgsz : size, msgtyp : int64, msgflg : int -> int)
-	const msgctl			:  (msqid : int, cmd : int, buf : msqid_ds# -> int)
-	const fcntl			:  (fd : uint, cmd : uint, arg : ulong -> int)
-	const flock			:  (fd : int, how : int -> int)
-	const fsync			:  (fd : int -> int)
-	const fdatasync			:  (fd : uint -> int)
-	const truncate			:  (path : byte#, length : ulong -> int)
-	const ftruncate			:  (fd : int, length : int64 -> int)
-	const getdents			:  (fd : uint, dent : void#, count : uint -> int)
-	const fchdir			:  (fd : int -> int)
-	const rmdir			:  (path : byte# -> int)
-	const link			:  (path : byte#, to : byte# -> int)
-	const symlink			:  (path : byte#, to : byte# -> int)
-	const chmod			:  (path : byte#, mode : filemode -> int)
-	const fchmod			:  (fd : int, mode : int -> int)
-	const chown			:  (path : byte#, uid : uid, gid : gid -> int)
-	const fchown			:  (fd : int, uid : int, gid : int -> int)
-	const lchown			:  (path : byte#, uid : uid, gid : gid -> int)
-	const umask			:  (newmask : int -> int)
-	const gettimeofday		:  (tp : timeval#, tzp : timezone# -> int)
-	const getrlimit			:  (resource : uint, rlim : rlimit# -> int)
-	const getrusage			:  (who : int, rusage : rusage# -> int)
-	const sysinfo			:  (info : sysinfo# -> int)
-	const times			:  (buf : tms# -> int)
-	const ptrace			:  (req : int64, pid : int64, addr : int64, data : int64 -> int)
-	const syslog			:  (kind : int, buf : byte#, len : int -> int)
-	const geteuid			:  ( -> int)
-	const getegid			:  ( -> int)
-	const setpgid			:  (pid : int, pgid : int -> int)
-	const getppid			:  ( -> int)
-	const getpgrp			:  ( -> int)
-	const setsid			:  ( -> int)
-	const setreuid			:  (ruid : uid, euid : uid -> int)
-	const setregid			:  (rgid : gid, egid : gid -> int)
-	const getgroups			:  (gidsetsize : int, grouplist : gid# -> int)
-	const setgroups			:  (gidsetsize : int, grouplist : gid# -> int)
-	const setresuid			:  (ruid : uid, euid : uid, suid : uid -> int)
-	const getresuid			:  (ruid : uid#, euid : uid#, suid : uid# -> int)
-	const setresgid			:  (rgid : gid, egid : gid, sgid : gid -> int)
-	const getresgid			:  (rgid : gid#, egid : gid#, sgid : gid# -> int)
-	const getpgid			:  (pid : int -> int)
-	const setfsuid			:  (uid : uid -> int)
-	const setfsgid			:  (gid : gid -> int)
-	const getsid			:  (pid : pid -> int)
-	const capget			:  (hdrp : capuserheader#, datap : capuserdata# -> int)
-	const capset			:  (hdrp : capuserheader#, datap : capuserdata# -> int)
-	const rt_sigpending		:  (set : sigset#, sigsetsize : size -> int)
-	const rt_sigtimedwait		:  (mask : sigset#, ptr : siginfo#, timeout : timeval#, sigsetsize : size -> int)
-	const rt_sigqueueinfo		:  (pid : pid, sig : int, info : siginfo# -> int)
-	const rt_sigsuspend		:  (newset : sigset#, sigsetsize : size -> int)
-	const sigaltstack		:  (uss : sigstack#, uoss : sigstack# -> int)
-	const utime			:  (fname : byte#, times : utimbuf# -> int)
-	const mknod			:  (path : byte#, mode : int, dev : dev -> int)
-	const personality		:  (per : uint -> int)
-	const ustat			:  (dev : dev, ubuf : ustat# -> int)
-	const statfs			:  (path : byte#, buf : statfs# -> int)
-	const fstatfs			:  (fd : uint, buf : statfs# -> int)
-	const sysfs			:  (option : int, arg1 : ulong, arg2 : ulong -> int)
-	const getpriority		:  (which : int, who : int -> int)
-	const setpriority		:  (which : int, who : int, prio : int -> int)
-	const sched_setparam		:  (pid : pid, param : sched_param# -> int)
-	const sched_getparam		:  (pid : pid, param : sched_param# -> int)
-	const sched_setscheduler	:  (pid : pid, policy : int, param : sched_param# -> int)
-	const sched_getscheduler	:  (pid : pid -> int)
-	const sched_get_priority_max	:  (policy : int -> int)
-	const sched_get_priority_min	:  (policy : int -> int)
-	const sched_rr_get_interval	:  (pid : pid, interval : timespec# -> int)
-	const mlock			:  (addr : void#, len : size -> int)
-	const munlock			:  (addr : void#, len : size -> int)
-	const mlockall			:  (how : int -> int)
-	const munlockall		:  ( -> int)
-	const vhangup			:  ( -> int)
-	const pivot_root		:  ( -> int)
-	const sysctl			:  (args : sysctl_args# -> int)
-	const prctl			:  (option : int, arg2 : uintptr, arg3 : uintptr, arg4 : uintptr, arg5 : uintptr -> int)
-	const arch_prctl		:  (code : int, addr : ulong -> int)
-	const adjtimex			:  ( -> int)
-	const setrlimit			:  (resource : uint, rlim : rlimit# -> int)
-	const chroot			:  (path : byte# -> int)
-	const sync			:  ( -> int)
-	const acct			:  (path : byte# -> int)
-	const settimeofday		:  (tv : timeval#, tzp : timezone# -> int)
-	const mount			:  (specialfile : byte#, dir : byte#, filesystemtype : byte#, rwflag : ulong, data : void# -> int)
-	const umount			:  (path : byte#, flags : int -> int)
-	const swapon			:  (name : byte# -> int)
-	const swapoff			:  ( -> int)
-	const reboot			:  (magic1 : int, magic2 : int, cmd : uint, arg : void# -> int)
-	const sethostname		:  (hostname : byte#, len : uint -> int)
-	const setdomainname		:  (name : byte#, len : int -> int)
-	const iopl			:  (level : uint -> int)
-	const create_module		:  ( -> int)
-	const init_module		:  ( -> int)
-	const delete_module		:  ( -> int)
-	const get_kernel_syms		:  ( -> int)
-	const query_module		:  ( -> int)
-	const quotactl			:  ( -> int)
-	const nfsservctl		:  ( -> int)
-	const getpmsg			:  ( -> int)
-	const putpmsg			:  ( -> int)
-	const afs_syscall		:  ( -> int)
-	const tuxcall			:  ( -> int)
-	const security			:  ( -> int)
-	const gettid			:  ( -> int)
-	const setxattr			:  ( -> int)
-	const lsetxattr			:  ( -> int)
-	const fsetxattr			:  ( -> int)
-	const getxattr			:  ( -> int)
-	const lgetxattr			:  ( -> int)
-	const fgetxattr			:  ( -> int)
-	const listxattr			:  ( -> int)
-	const llistxattr		:  ( -> int)
-	const flistxattr		:  ( -> int)
-	const removexattr		:  ( -> int)
-	const lremovexattr		:  ( -> int)
-	const fremovexattr		:  ( -> int)
-	const tkill			:  (tid : int, sig : int -> int)
-	const time			:  (tm : time# -> int)
-	const sched_setaffinity		:  (pid : pid, len : uint, user_mask_ptr : ulong# -> int)
-	const sched_getaffinity		:  (pid : pid, len : uint, user_mask_ptr : ulong# -> int)
-	const set_thread_area		:  ( -> int)
-	const lookup_dcookie		:  ( -> int)
-	const epoll_create		:  (size : int -> int)
-	const epoll_ctl_old		:  ( -> int)
-	const epoll_wait_old		:  ( -> int)
-	const remap_file_pages		:  ( -> int)
-	const set_tid_address		:  (tidptr : int# -> int)
-	const semtimedop		:  ( -> int)
-	const fadvise64			:  (fd : int, offset : loff, len : size, advice : int -> int)
-	const timer_create		:  (clock_id : clockid, evp : sigevent#, timerid : timer# -> int)
-	const timer_settime		:  (timerid : timer, flags : int, new : itimerspec#, old : itimerspec# -> int)
-	const timer_gettime		:  (timerid : timer, setting : itimerspec# -> int)
-	const timer_getoverrun		:  (timerid : timer -> int)
-	const timer_delete		:  (timerid : timer -> int)
-	const clock_nanosleep		:  (which : clockid, flags : int, rqtp : timespec#, rmtp : timespec# -> int)
-	const epoll_wait		:  (epfd : int, events : epollevt#, maxevents : int, timeout : int -> int)
-	const epoll_ctl			:  (epfd : int, op : int, fd : int, event : epollevt# -> int)
-	const tgkill			:  (tgid : int, pid : int, sig : int -> int)
-	const utimes			:  (fname : byte#, tptr : timeval# -> int)
-	const mbind			:  ( -> int)
-	const set_mempolicy		:  ( -> int)
-	const get_mempolicy		:  ( -> int)
-	const mq_open			:  ( -> int)
-	const mq_unlink			:  ( -> int)
-	const mq_timedsend		:  ( -> int)
-	const mq_timedreceive		:  ( -> int)
-	const mq_notify			:  ( -> int)
-	const mq_getsetattr		:  ( -> int)
-	const kexec_load		:  ( -> int)
-	const waitid			:  (idtype : int, id : pid, info : siginfo#, options : int, rusage : rusage# -> int)
-	const add_key			:  ( -> int)
-	const request_key		:  ( -> int)
-	const keyctl			:  ( -> int)
-	const ioprio_set		:  ( -> int)
-	const ioprio_get		:  ( -> int)
-	const inotify_init		:  ( -> int)
-	const inotify_add_watch		:  ( -> int)
-	const inotify_rm_watch		:  ( -> int)
-	const migrate_pages		:  ( -> int)
-	const openat			:  (dfd : int, filename : byte#, flags : int, mode : int -> int)
-	const mkdirat			:  (dfd : int, pathname : byte#, mode : int -> int)
-	const mknodat			:  (dfd : int, filename : byte#, mode : int, dev : uint -> int)
-	const fchownat			:  (dfd : int, filename : byte#, uid : uid, gid : gid, flag : int -> int)
-	const futimesat			:  (dfd : int, filename : byte#, utimes : timeval# -> int)
-	const fstatat			:  (dfd : int, pathname : byte#, statbuf : statbuf#, flag : int -> int)
-	const unlinkat			:  (dfd : int, pathname : byte#, flag : int -> int)
-	const renameat			:  (olddfd : int, oldname : byte#, newdfd : int, newname : byte# -> int)
-	const linkat			:  (olddfd : int, oldname : byte#, newdfd : int, newname : byte#, flag : int -> int)
-	const symlinkat			:  (oldname : byte#, newdfd : int, newname : byte# -> int)
-	const readlinkat		:  (dfd : int, path : byte#, buf : byte#, bufsiz : int -> int)
-	const fchmodat			:  (dfd : int, filename : byte#, mode : filemode -> int)
-	const faccessat			:  (dfd : int, filename : byte#, amode : int -> int)
-	const pselect6			:  (nfds : int, readfds : fdset#, writefds : fdset#, exceptfds : fdset#, tsp : timespec#, sig : uintptr# -> int)
-	const ppoll			:  (fds : pollfd#, nfds : uint32, tsp : timespec#, sset : sigset#, ssize : size -> int)
-	const unshare			:  ( -> int)
-	const set_robust_list		:  (head : robust_list_head#, len : size -> int)
-	const get_robust_list		:  (pid : int, head : robust_list_head##, len : size# -> int)
-	const splice			:  ( -> int)
-	const tee			:  ( -> int)
-	const sync_file_range		:  ( -> int)
-	const vmsplice			:  ( -> int)
-	const move_pages		:  ( -> int)
-	const utimensat			:  (dfd : int, pathname : byte#, times : timespec#, flags : int -> int)
-	const epoll_pwait		:  (epfd : int, events : epollevt#, maxevents : int, timeout : int, mask : sigset# -> int)
-	const signalfd			:  ( -> int)
-	const timerfd			:  ( -> int)
-	const eventfd			:  (initval : uint -> int)
-	const timerfd_settime		:  ( -> int)
-	const timerfd_gettime		:  ( -> int)
-	const accept4			:  (s : int, addr : uintptr, namelen : uintptr, flags : int -> int)
-	const signalfd4			:  ( -> int)
-	const eventfd2			:  (initval : uint, flags : int -> int)
-	const epoll_create1		:  (flags : int -> int)
-	const dup3			:  (oldfd : int, newfd : int, flags : int -> int)
-	const pipe2			:  (pipefds : int#, flags : int -> int)
-	const inotify_init1		:  ( -> int)
-	const preadv			:  ( -> int)
-	const pwritev			:  ( -> int)
-	const rt_tsigqueueinfo		:  ( -> int)
-	const perf_event_open		:  ( -> int)
-	const recvmmsg			:  (s : int, msg : mmsghdr#, vlen : uint, flags : uint, timeout : timespec# -> int)
-	const fanotify_init		:  ( -> int)
-	const fanotify_mark		:  ( -> int)
-	const prlimit64			:  (pid : pid, resource : uint, new : rlimit#, old : rlimit# -> int)
-	const name_to_handle_at		:  ( -> int)
-	const open_by_handle_at		:  ( -> int)
-	const clock_adjtime		:  ( -> int)
-	const syncfs			:  (fd : int -> int)
-	const sendmmsg			:  (s : int, msg : mmsghdr#, vlen : uint, flags : uint -> int)
-	const setns			:  ( -> int)
-	const process_vm_readv		:  ( -> int)
-	const process_vm_writev		:  ( -> int)
-	const kcmp			:  ( -> int)
-	const finit_module		:  ( -> int)
+	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))}
@@ -1424,10 +1564,10 @@
 		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#))
@@ -1438,11 +1578,11 @@
 		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]
@@ -1450,7 +1590,7 @@
 			cargs[i] = cstring(args[i])
 		;;
 		cargs[args.len] = (0 : byte#)
-
+	
 		/*
 		 copy the env.
 		 of course we fucking have to duplicate this code everywhere,
@@ -1462,10 +1602,10 @@
 			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)}
@@ -1490,12 +1630,13 @@
 	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
@@ -1504,7 +1645,7 @@
 		-> (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))
@@ -1512,7 +1653,7 @@
 	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;
@@ -1520,7 +1661,7 @@
 	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)}
@@ -1529,28 +1670,28 @@
 	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
@@ -1566,8 +1707,8 @@
 		;;
 		-> -1
 	}
-
-
+	
+	
 	const waitstatus = {st
 		if st & 0x7f == 0 /* if exited */
 			-> `Waitexit ((st & 0xff00) >> 8)
@@ -1579,744 +1720,777 @@
 		-> `Waitfail st	/* wait failed to give a result */
 	}
 	/* } end manual overrides */
-const mprotect	= {addr, len, prot
-	 -> (syscall(Sysmprotect, a(len), a(prot)) : int)
+const time	= {tloc
+	 -> (syscall(Systime) : int64)
 }
-const brk	= {dsend
-	 -> (syscall(Sysbrk) : int)
+const gettimeofday	= {tv, tz
+	 -> (syscall(Sysgettimeofday, a(tz)) : int64)
 }
-const rt_sigaction	= {sig, act, oact, sigsetsize
-	 -> (syscall(Sysrt_sigaction, a(act), a(oact), a(sigsetsize)) : int)
+const settimeofday	= {tv, tz
+	 -> (syscall(Syssettimeofday, a(tz)) : int64)
 }
-const rt_sigprocmask	= {how, mask, omask, sigsetsize
-	 -> (syscall(Sysrt_sigprocmask, a(mask), a(omask), a(sigsetsize)) : int)
+const adjtimex	= {txc_p
+	 -> (syscall(Sysadjtimex) : int64)
 }
-const rt_sigreturn	= {ucp
-	 -> (syscall(Sysrt_sigreturn) : int)
+const times	= {tbuf
+	 -> (syscall(Systimes) : int64)
 }
-const readv	= {fd, iovp, iovcnt
-	 -> (syscall(Sysreadv, a(iovp), a(iovcnt)) : int)
+const gettid	= {
+	 -> (syscall(Sysgettid) : int64)
 }
-const writev	= {fd, iovp, iovcnt
-	 -> (syscall(Syswritev, a(iovp), a(iovcnt)) : int)
+const alarm	= {seconds
+	 -> (syscall(Sysalarm) : int64)
 }
-const access	= {path, amode
-	 -> (syscall(Sysaccess, a(amode)) : int)
+const getppid	= {
+	 -> (syscall(Sysgetppid) : int64)
 }
-const select	= {nfds, readfds, writefds, exceptfds, timeout
-	 -> (syscall(Sysselect, a(readfds), a(writefds), a(exceptfds), a(timeout)) : int)
+const geteuid	= {
+	 -> (syscall(Sysgeteuid) : int64)
 }
-const sched_yield	= {
-	 -> (syscall(Syssched_yield) : int)
+const getegid	= {
+	 -> (syscall(Sysgetegid) : int64)
 }
-const mremap	= {addr, old_len, new_len, flags, new_addr
-	 -> (syscall(Sysmremap, a(old_len), a(new_len), a(flags), a(new_addr)) : int)
+const getresuid	= {ruid, euid, suid
+	 -> (syscall(Sysgetresuid, a(euid), a(suid)) : int64)
 }
-const msync	= {addr, len, fl
-	 -> (syscall(Sysmsync, a(len), a(fl)) : int)
+const getresgid	= {rgid, egid, sgid
+	 -> (syscall(Sysgetresgid, a(egid), a(sgid)) : int64)
 }
-const mincore	= {start, len, vec
-	 -> (syscall(Sysmincore, a(len), a(vec)) : int)
+const getpgid	= {pid
+	 -> (syscall(Sysgetpgid) : int64)
 }
-const madvise	= {addr, len, behav
-	 -> (syscall(Sysmadvise, a(len), a(behav)) : int)
+const getpgrp	= {
+	 -> (syscall(Sysgetpgrp) : int64)
 }
-const shmget	= {key, size, shmflg
-	 -> (syscall(Sysshmget, a(size), a(shmflg)) : int)
+const getsid	= {pid
+	 -> (syscall(Sysgetsid) : int64)
 }
-const shmat	= {shmid, shmaddr, shmflg
-	 -> (syscall(Sysshmat, a(shmaddr), a(shmflg)) : int)
+const getgroups	= {gidsetsize, grouplist
+	 -> (syscall(Sysgetgroups, a(grouplist)) : int64)
 }
-const shmctl	= {shmid, cmd, buf
-	 -> (syscall(Sysshmctl, a(cmd), a(buf)) : int)
+const setregid	= {rgid, egid
+	 -> (syscall(Syssetregid, a(egid)) : int64)
 }
-const pause	= {
-	 -> (syscall(Syspause) : int)
+const setreuid	= {ruid, euid
+	 -> (syscall(Syssetreuid, a(euid)) : int64)
 }
-const getitimer	= {which, itv
-	 -> (syscall(Sysgetitimer, a(itv)) : int)
+const setresuid	= {ruid, euid, suid
+	 -> (syscall(Syssetresuid, a(euid), a(suid)) : int64)
 }
-const alarm	= {secs
-	 -> (syscall(Sysalarm) : int)
+const setresgid	= {rgid, egid, sgid
+	 -> (syscall(Syssetresgid, a(egid), a(sgid)) : int64)
 }
-const setitimer	= {which, itv, oitv
-	 -> (syscall(Syssetitimer, a(itv), a(oitv)) : int)
+const setfsuid	= {uid
+	 -> (syscall(Syssetfsuid) : int64)
 }
-const sendfile	= {out, _in, offset, count
-	 -> (syscall(Syssendfile, a(_in), a(offset), a(count)) : int)
+const setfsgid	= {gid
+	 -> (syscall(Syssetfsgid) : int64)
 }
-const sendto	= {s, msg, len, flags, to, tolen
-	 -> (syscall(Syssendto, a(msg), a(len), a(flags), a(to), a(tolen)) : int)
+const setpgid	= {pid, pgid
+	 -> (syscall(Syssetpgid, a(pgid)) : int64)
 }
-const recvfrom	= {s, buf, len, flags, from, fromlen
-	 -> (syscall(Sysrecvfrom, a(buf), a(len), a(flags), a(from), a(fromlen)) : int)
+const setsid	= {
+	 -> (syscall(Syssetsid) : int64)
 }
-const shutdown	= {s, how
-	 -> (syscall(Sysshutdown, a(how)) : int)
+const setgroups	= {gidsetsize, grouplist
+	 -> (syscall(Syssetgroups, a(grouplist)) : int64)
 }
-const getsockname	= {s, addr, namelen
-	 -> (syscall(Sysgetsockname, a(addr), a(namelen)) : int)
+const acct	= {name
+	 -> (syscall(Sysacct) : int64)
 }
-const getpeername	= {s, addr, namelen
-	 -> (syscall(Sysgetpeername, a(addr), a(namelen)) : int)
+const capget	= {header, dataptr
+	 -> (syscall(Syscapget, a(dataptr)) : int64)
 }
-const socketpair	= {domain, kind, protocol, rsv
-	 -> (syscall(Syssocketpair, a(kind), a(protocol), a(rsv)) : int)
+const capset	= {header, data
+	 -> (syscall(Syscapset, a(data)) : int64)
 }
-const vfork	= {
-	 -> (syscall(Sysvfork) : int)
+const personality	= {personality
+	 -> (syscall(Syspersonality) : int64)
 }
-const semget	= {key, nsems, semflg
-	 -> (syscall(Syssemget, a(nsems), a(semflg)) : int)
+const sigaltstack	= {uss, uoss
+	 -> (syscall(Syssigaltstack, a(uoss)) : int64)
 }
-const semop	= {semid, tsops, nsops
-	 -> (syscall(Syssemop, a(tsops), a(nsops)) : int)
+const getitimer	= {which, value
+	 -> (syscall(Sysgetitimer, a(value)) : int64)
 }
-const shmdt	= {shmaddr
-	 -> (syscall(Sysshmdt) : int)
+const setitimer	= {which, value, ovalue
+	 -> (syscall(Syssetitimer, a(value), a(ovalue)) : int64)
 }
-const msgget	= {key, msgflg
-	 -> (syscall(Sysmsgget, a(msgflg)) : int)
+const timer_create	= {which_clock, timer_event_spec, created_timer_id
+	 -> (syscall(Systimer_create, a(timer_event_spec), a(created_timer_id)) : int64)
 }
-const msgsnd	= {msqid, msgp, msgsz, msgflg
-	 -> (syscall(Sysmsgsnd, a(msgp), a(msgsz), a(msgflg)) : int)
+const timer_gettime	= {timer_id, setting
+	 -> (syscall(Systimer_gettime, a(setting)) : int64)
 }
-const msgrcv	= {msqid, msgp, msgsz, msgtyp, msgflg
-	 -> (syscall(Sysmsgrcv, a(msgp), a(msgsz), a(msgtyp), a(msgflg)) : int)
+const timer_getoverrun	= {timer_id
+	 -> (syscall(Systimer_getoverrun) : int64)
 }
-const msgctl	= {msqid, cmd, buf
-	 -> (syscall(Sysmsgctl, a(cmd), a(buf)) : int)
+const timer_settime	= {timer_id, flags, new_setting, old_setting
+	 -> (syscall(Systimer_settime, a(flags), a(new_setting), a(old_setting)) : int64)
 }
-const fcntl	= {fd, cmd, arg
-	 -> (syscall(Sysfcntl, a(cmd), a(arg)) : int)
+const timer_delete	= {timer_id
+	 -> (syscall(Systimer_delete) : int64)
 }
-const flock	= {fd, how
-	 -> (syscall(Sysflock, a(how)) : int)
+const clock_adjtime	= {which_clock, tx
+	 -> (syscall(Sysclock_adjtime, a(tx)) : int64)
 }
-const fsync	= {fd
-	 -> (syscall(Sysfsync) : int)
+const clock_nanosleep	= {which_clock, flags, rqtp, rmtp
+	 -> (syscall(Sysclock_nanosleep, a(flags), a(rqtp), a(rmtp)) : int64)
 }
-const fdatasync	= {fd
-	 -> (syscall(Sysfdatasync) : int)
+const sched_setscheduler	= {pid, policy, param
+	 -> (syscall(Syssched_setscheduler, a(policy), a(param)) : int64)
 }
-const truncate	= {path, length
-	 -> (syscall(Systruncate, a(length)) : int)
+const sched_setparam	= {pid, param
+	 -> (syscall(Syssched_setparam, a(param)) : int64)
 }
-const ftruncate	= {fd, length
-	 -> (syscall(Sysftruncate, a(length)) : int)
+const sched_setattr	= {pid, attr, flags
+	 -> (syscall(Syssched_setattr, a(attr), a(flags)) : int64)
 }
-const getdents	= {fd, dent, count
-	 -> (syscall(Sysgetdents, a(dent), a(count)) : int)
+const sched_getscheduler	= {pid
+	 -> (syscall(Syssched_getscheduler) : int64)
 }
-const fchdir	= {fd
-	 -> (syscall(Sysfchdir) : int)
+const sched_getparam	= {pid, param
+	 -> (syscall(Syssched_getparam, a(param)) : int64)
 }
-const rmdir	= {path
-	 -> (syscall(Sysrmdir) : int)
+const sched_getattr	= {pid, attr, size, flags
+	 -> (syscall(Syssched_getattr, a(attr), a(size), a(flags)) : int64)
 }
-const link	= {path, to
-	 -> (syscall(Syslink, a(to)) : int)
+const sched_setaffinity	= {pid, len, user_mask_ptr
+	 -> (syscall(Syssched_setaffinity, a(len), a(user_mask_ptr)) : int64)
 }
-const symlink	= {path, to
-	 -> (syscall(Syssymlink, a(to)) : int)
+const sched_getaffinity	= {pid, len, user_mask_ptr
+	 -> (syscall(Syssched_getaffinity, a(len), a(user_mask_ptr)) : int64)
 }
-const chmod	= {path, mode
-	 -> (syscall(Syschmod, a(mode)) : int)
+const sched_yield	= {
+	 -> (syscall(Syssched_yield) : int64)
 }
-const fchmod	= {fd, mode
-	 -> (syscall(Sysfchmod, a(mode)) : int)
+const sched_get_priority_max	= {policy
+	 -> (syscall(Syssched_get_priority_max) : int64)
 }
-const chown	= {path, uid, gid
-	 -> (syscall(Syschown, a(uid), a(gid)) : int)
+const sched_get_priority_min	= {policy
+	 -> (syscall(Syssched_get_priority_min) : int64)
 }
-const fchown	= {fd, uid, gid
-	 -> (syscall(Sysfchown, a(uid), a(gid)) : int)
+const sched_rr_get_interval	= {pid, interval
+	 -> (syscall(Syssched_rr_get_interval, a(interval)) : int64)
 }
-const lchown	= {path, uid, gid
-	 -> (syscall(Syslchown, a(uid), a(gid)) : int)
+const setpriority	= {which, who, niceval
+	 -> (syscall(Syssetpriority, a(who), a(niceval)) : int64)
 }
-const umask	= {newmask
-	 -> (syscall(Sysumask) : int)
+const getpriority	= {which, who
+	 -> (syscall(Sysgetpriority, a(who)) : int64)
 }
-const gettimeofday	= {tp, tzp
-	 -> (syscall(Sysgettimeofday, a(tzp)) : int)
+const shutdown	= {_a0, _a1
+	 -> (syscall(Sysshutdown, a(_a1)) : int64)
 }
-const getrlimit	= {resource, rlim
-	 -> (syscall(Sysgetrlimit, a(rlim)) : int)
+const reboot	= {magic1, magic2, cmd, arg
+	 -> (syscall(Sysreboot, a(magic2), a(cmd), a(arg)) : int64)
 }
-const getrusage	= {who, rusage
-	 -> (syscall(Sysgetrusage, a(rusage)) : int)
+const restart_syscall	= {
+	 -> (syscall(Sysrestart_syscall) : int64)
 }
-const sysinfo	= {info
-	 -> (syscall(Syssysinfo) : int)
+const kexec_load	= {entry, nr_segments, segments, flags
+	 -> (syscall(Syskexec_load, a(nr_segments), a(segments), a(flags)) : int64)
 }
-const times	= {buf
-	 -> (syscall(Systimes) : int)
+const kexec_file_load	= {kernel_fd, initrd_fd, cmdline_len, cmdline_ptr, flags
+	 -> (syscall(Syskexec_file_load, a(initrd_fd), a(cmdline_len), a(cmdline_ptr), a(flags)) : int64)
 }
-const ptrace	= {req, pid, addr, data
-	 -> (syscall(Sysptrace, a(pid), a(addr), a(data)) : int)
+const waitid	= {which, pid, infop, options, ru
+	 -> (syscall(Syswaitid, a(pid), a(infop), a(options), a(ru)) : int64)
 }
-const syslog	= {kind, buf, len
-	 -> (syscall(Syssyslog, a(buf), a(len)) : int)
+const set_tid_address	= {tidptr
+	 -> (syscall(Sysset_tid_address) : int64)
 }
-const geteuid	= {
-	 -> (syscall(Sysgeteuid) : int)
+const init_module	= {umod, len, uargs
+	 -> (syscall(Sysinit_module, a(len), a(uargs)) : int64)
 }
-const getegid	= {
-	 -> (syscall(Sysgetegid) : int)
+const delete_module	= {name_user, flags
+	 -> (syscall(Sysdelete_module, a(flags)) : int64)
 }
-const setpgid	= {pid, pgid
-	 -> (syscall(Syssetpgid, a(pgid)) : int)
+const rt_sigsuspend	= {unewset, sigsetsize
+	 -> (syscall(Sysrt_sigsuspend, a(sigsetsize)) : int64)
 }
-const getppid	= {
-	 -> (syscall(Sysgetppid) : int)
+const rt_sigaction	= {_a0, _a1, _a2, _a3
+	 -> (syscall(Sysrt_sigaction, a(_a1), a(_a2), a(_a3)) : int64)
 }
-const getpgrp	= {
-	 -> (syscall(Sysgetpgrp) : int)
+const rt_sigprocmask	= {how, set, oset, sigsetsize
+	 -> (syscall(Sysrt_sigprocmask, a(set), a(oset), a(sigsetsize)) : int64)
 }
-const setsid	= {
-	 -> (syscall(Syssetsid) : int)
+const rt_sigpending	= {set, sigsetsize
+	 -> (syscall(Sysrt_sigpending, a(sigsetsize)) : int64)
 }
-const setreuid	= {ruid, euid
-	 -> (syscall(Syssetreuid, a(euid)) : int)
+const rt_sigtimedwait	= {uthese, uinfo, uts, sigsetsize
+	 -> (syscall(Sysrt_sigtimedwait, a(uinfo), a(uts), a(sigsetsize)) : int64)
 }
-const setregid	= {rgid, egid
-	 -> (syscall(Syssetregid, a(egid)) : int)
+const rt_tgsigqueueinfo	= {tgid, pid, sig, uinfo
+	 -> (syscall(Sysrt_tgsigqueueinfo, a(pid), a(sig), a(uinfo)) : int64)
 }
-const getgroups	= {gidsetsize, grouplist
-	 -> (syscall(Sysgetgroups, a(grouplist)) : int)
+const tgkill	= {tgid, pid, sig
+	 -> (syscall(Systgkill, a(pid), a(sig)) : int64)
 }
-const setgroups	= {gidsetsize, grouplist
-	 -> (syscall(Syssetgroups, a(grouplist)) : int)
+const tkill	= {pid, sig
+	 -> (syscall(Systkill, a(sig)) : int64)
 }
-const setresuid	= {ruid, euid, suid
-	 -> (syscall(Syssetresuid, a(euid), a(suid)) : int)
+const rt_sigqueueinfo	= {pid, sig, uinfo
+	 -> (syscall(Sysrt_sigqueueinfo, a(sig), a(uinfo)) : int64)
 }
-const getresuid	= {ruid, euid, suid
-	 -> (syscall(Sysgetresuid, a(euid), a(suid)) : int)
+const pause	= {
+	 -> (syscall(Syspause) : int64)
 }
-const setresgid	= {rgid, egid, sgid
-	 -> (syscall(Syssetresgid, a(egid), a(sgid)) : int)
+const sync	= {
+	 -> (syscall(Syssync) : int64)
 }
-const getresgid	= {rgid, egid, sgid
-	 -> (syscall(Sysgetresgid, a(egid), a(sgid)) : int)
+const fsync	= {fd
+	 -> (syscall(Sysfsync) : int64)
 }
-const getpgid	= {pid
-	 -> (syscall(Sysgetpgid) : int)
+const fdatasync	= {fd
+	 -> (syscall(Sysfdatasync) : int64)
 }
-const setfsuid	= {uid
-	 -> (syscall(Syssetfsuid) : int)
+const mount	= {dev_name, dir_name, kind, flags, data
+	 -> (syscall(Sysmount, a(dir_name), a(kind), a(flags), a(data)) : int64)
 }
-const setfsgid	= {gid
-	 -> (syscall(Syssetfsgid) : int)
+const umount2	= {name, flags
+	 -> (syscall(Sysumount2, a(flags)) : int64)
 }
-const getsid	= {pid
-	 -> (syscall(Sysgetsid) : int)
+const truncate	= {path, length
+	 -> (syscall(Systruncate, a(length)) : int64)
 }
-const capget	= {hdrp, datap
-	 -> (syscall(Syscapget, a(datap)) : int)
+const ftruncate	= {fd, length
+	 -> (syscall(Sysftruncate, a(length)) : int64)
 }
-const capset	= {hdrp, datap
-	 -> (syscall(Syscapset, a(datap)) : int)
+const statfs	= {path, buf
+	 -> (syscall(Sysstatfs, a(buf)) : int64)
 }
-const rt_sigpending	= {set, sigsetsize
-	 -> (syscall(Sysrt_sigpending, a(sigsetsize)) : int)
+const fstatfs	= {fd, buf
+	 -> (syscall(Sysfstatfs, a(buf)) : int64)
 }
-const rt_sigtimedwait	= {mask, ptr, timeout, sigsetsize
-	 -> (syscall(Sysrt_sigtimedwait, a(ptr), a(timeout), a(sigsetsize)) : int)
+const ustat	= {dev, ubuf
+	 -> (syscall(Sysustat, a(ubuf)) : int64)
 }
-const rt_sigqueueinfo	= {pid, sig, info
-	 -> (syscall(Sysrt_sigqueueinfo, a(sig), a(info)) : int)
+const setxattr	= {path, name, value, size, flags
+	 -> (syscall(Syssetxattr, a(name), a(value), a(size), a(flags)) : int64)
 }
-const rt_sigsuspend	= {newset, sigsetsize
-	 -> (syscall(Sysrt_sigsuspend, a(sigsetsize)) : int)
+const lsetxattr	= {path, name, value, size, flags
+	 -> (syscall(Syslsetxattr, a(name), a(value), a(size), a(flags)) : int64)
 }
-const sigaltstack	= {uss, uoss
-	 -> (syscall(Syssigaltstack, a(uoss)) : int)
+const fsetxattr	= {fd, name, value, size, flags
+	 -> (syscall(Sysfsetxattr, a(name), a(value), a(size), a(flags)) : int64)
 }
-const utime	= {fname, times
-	 -> (syscall(Sysutime, a(times)) : int)
+const getxattr	= {path, name, value, size
+	 -> (syscall(Sysgetxattr, a(name), a(value), a(size)) : int64)
 }
-const mknod	= {path, mode, dev
-	 -> (syscall(Sysmknod, a(mode), a(dev)) : int)
+const lgetxattr	= {path, name, value, size
+	 -> (syscall(Syslgetxattr, a(name), a(value), a(size)) : int64)
 }
-const personality	= {per
-	 -> (syscall(Syspersonality) : int)
+const fgetxattr	= {fd, name, value, size
+	 -> (syscall(Sysfgetxattr, a(name), a(value), a(size)) : int64)
 }
-const ustat	= {dev, ubuf
-	 -> (syscall(Sysustat, a(ubuf)) : int)
+const listxattr	= {path, list, size
+	 -> (syscall(Syslistxattr, a(list), a(size)) : int64)
 }
-const statfs	= {path, buf
-	 -> (syscall(Sysstatfs, a(buf)) : int)
+const llistxattr	= {path, list, size
+	 -> (syscall(Sysllistxattr, a(list), a(size)) : int64)
 }
-const fstatfs	= {fd, buf
-	 -> (syscall(Sysfstatfs, a(buf)) : int)
+const flistxattr	= {fd, list, size
+	 -> (syscall(Sysflistxattr, a(list), a(size)) : int64)
 }
-const sysfs	= {option, arg1, arg2
-	 -> (syscall(Syssysfs, a(arg1), a(arg2)) : int)
+const removexattr	= {path, name
+	 -> (syscall(Sysremovexattr, a(name)) : int64)
 }
-const getpriority	= {which, who
-	 -> (syscall(Sysgetpriority, a(who)) : int)
+const lremovexattr	= {path, name
+	 -> (syscall(Syslremovexattr, a(name)) : int64)
 }
-const setpriority	= {which, who, prio
-	 -> (syscall(Syssetpriority, a(who), a(prio)) : int)
+const fremovexattr	= {fd, name
+	 -> (syscall(Sysfremovexattr, a(name)) : int64)
 }
-const sched_setparam	= {pid, param
-	 -> (syscall(Syssched_setparam, a(param)) : int)
+const brk	= {brk
+	 -> (syscall(Sysbrk) : int64)
 }
-const sched_getparam	= {pid, param
-	 -> (syscall(Syssched_getparam, a(param)) : int)
+const mprotect	= {start, len, prot
+	 -> (syscall(Sysmprotect, a(len), a(prot)) : int64)
 }
-const sched_setscheduler	= {pid, policy, param
-	 -> (syscall(Syssched_setscheduler, a(policy), a(param)) : int)
+const mremap	= {addr, old_len, new_len, flags, new_addr
+	 -> (syscall(Sysmremap, a(old_len), a(new_len), a(flags), a(new_addr)) : int64)
 }
-const sched_getscheduler	= {pid
-	 -> (syscall(Syssched_getscheduler) : int)
+const remap_file_pages	= {start, size, prot, pgoff, flags
+	 -> (syscall(Sysremap_file_pages, a(size), a(prot), a(pgoff), a(flags)) : int64)
 }
-const sched_get_priority_max	= {policy
-	 -> (syscall(Syssched_get_priority_max) : int)
+const msync	= {start, len, flags
+	 -> (syscall(Sysmsync, a(len), a(flags)) : int64)
 }
-const sched_get_priority_min	= {policy
-	 -> (syscall(Syssched_get_priority_min) : int)
+const fadvise	= {fd, offset, len, advice
+	 -> (syscall(Sysfadvise, a(offset), a(len), a(advice)) : int64)
 }
-const sched_rr_get_interval	= {pid, interval
-	 -> (syscall(Syssched_rr_get_interval, a(interval)) : int)
+const mlock	= {start, len
+	 -> (syscall(Sysmlock, a(len)) : int64)
 }
-const mlock	= {addr, len
-	 -> (syscall(Sysmlock, a(len)) : int)
+const munlock	= {start, len
+	 -> (syscall(Sysmunlock, a(len)) : int64)
 }
-const munlock	= {addr, len
-	 -> (syscall(Sysmunlock, a(len)) : int)
+const mlockall	= {flags
+	 -> (syscall(Sysmlockall) : int64)
 }
-const mlockall	= {how
-	 -> (syscall(Sysmlockall) : int)
-}
 const munlockall	= {
-	 -> (syscall(Sysmunlockall) : int)
+	 -> (syscall(Sysmunlockall) : int64)
 }
-const vhangup	= {
-	 -> (syscall(Sysvhangup) : int)
+const madvise	= {start, len, behavior
+	 -> (syscall(Sysmadvise, a(len), a(behavior)) : int64)
 }
-const pivot_root	= {
-	 -> (syscall(Syspivot_root) : int)
+const mincore	= {start, len, vec
+	 -> (syscall(Sysmincore, a(len), a(vec)) : int64)
 }
-const sysctl	= {args
-	 -> (syscall(Syssysctl) : int)
+const pivot_root	= {new_root, put_old
+	 -> (syscall(Syspivot_root, a(put_old)) : int64)
 }
-const prctl	= {option, arg2, arg3, arg4, arg5
-	 -> (syscall(Sysprctl, a(arg2), a(arg3), a(arg4), a(arg5)) : int)
+const chroot	= {filename
+	 -> (syscall(Syschroot) : int64)
 }
-const arch_prctl	= {code, addr
-	 -> (syscall(Sysarch_prctl, a(addr)) : int)
+const mknod	= {filename, mode, dev
+	 -> (syscall(Sysmknod, a(mode), a(dev)) : int64)
 }
-const adjtimex	= {
-	 -> (syscall(Sysadjtimex) : int)
+const link	= {oldname, newname
+	 -> (syscall(Syslink, a(newname)) : int64)
 }
-const setrlimit	= {resource, rlim
-	 -> (syscall(Syssetrlimit, a(rlim)) : int)
+const symlink	= {old, new
+	 -> (syscall(Syssymlink, a(new)) : int64)
 }
-const chroot	= {path
-	 -> (syscall(Syschroot) : int)
+const chmod	= {filename, mode
+	 -> (syscall(Syschmod, a(mode)) : int64)
 }
-const sync	= {
-	 -> (syscall(Syssync) : int)
+const fchmod	= {fd, mode
+	 -> (syscall(Sysfchmod, a(mode)) : int64)
 }
-const acct	= {path
-	 -> (syscall(Sysacct) : int)
+const fcntl	= {fd, cmd, arg
+	 -> (syscall(Sysfcntl, a(cmd), a(arg)) : int64)
 }
-const settimeofday	= {tv, tzp
-	 -> (syscall(Syssettimeofday, a(tzp)) : int)
+const pipe2	= {fildes, flags
+	 -> (syscall(Syspipe2, a(flags)) : int64)
 }
-const mount	= {specialfile, dir, filesystemtype, rwflag, data
-	 -> (syscall(Sysmount, a(dir), a(filesystemtype), a(rwflag), a(data)) : int)
+const dup3	= {oldfd, newfd, flags
+	 -> (syscall(Sysdup3, a(newfd), a(flags)) : int64)
 }
-const umount	= {path, flags
-	 -> (syscall(Sysumount, a(flags)) : int)
+const ioperm	= {from, num, on
+	 -> (syscall(Sysioperm, a(num), a(on)) : int64)
 }
-const swapon	= {name
-	 -> (syscall(Sysswapon) : int)
+const flock	= {fd, cmd
+	 -> (syscall(Sysflock, a(cmd)) : int64)
 }
-const swapoff	= {
-	 -> (syscall(Sysswapoff) : int)
+const io_setup	= {nr_reqs, ctx
+	 -> (syscall(Sysio_setup, a(ctx)) : int64)
 }
-const reboot	= {magic1, magic2, cmd, arg
-	 -> (syscall(Sysreboot, a(magic2), a(cmd), a(arg)) : int)
+const io_destroy	= {ctx
+	 -> (syscall(Sysio_destroy) : int64)
 }
-const sethostname	= {hostname, len
-	 -> (syscall(Syssethostname, a(len)) : int)
+const io_getevents	= {ctx_id, min_nr, nr, events, timeout
+	 -> (syscall(Sysio_getevents, a(min_nr), a(nr), a(events), a(timeout)) : int64)
 }
-const setdomainname	= {name, len
-	 -> (syscall(Syssetdomainname, a(len)) : int)
+const io_submit	= {_a0, _a1, _a2
+	 -> (syscall(Sysio_submit, a(_a1), a(_a2)) : int64)
 }
-const iopl	= {level
-	 -> (syscall(Sysiopl) : int)
+const io_cancel	= {ctx_id, iocb, result
+	 -> (syscall(Sysio_cancel, a(iocb), a(result)) : int64)
 }
-const create_module	= {
-	 -> (syscall(Syscreate_module) : int)
+const sendfile	= {out_fd, in_fd, offset, count
+	 -> (syscall(Syssendfile, a(in_fd), a(offset), a(count)) : int64)
 }
-const init_module	= {
-	 -> (syscall(Sysinit_module) : int)
+const access	= {filename, mode
+	 -> (syscall(Sysaccess, a(mode)) : int64)
 }
-const delete_module	= {
-	 -> (syscall(Sysdelete_module) : int)
+const vhangup	= {
+	 -> (syscall(Sysvhangup) : int64)
 }
-const get_kernel_syms	= {
-	 -> (syscall(Sysget_kernel_syms) : int)
+const chown	= {filename, user, group
+	 -> (syscall(Syschown, a(user), a(group)) : int64)
 }
-const query_module	= {
-	 -> (syscall(Sysquery_module) : int)
+const lchown	= {filename, user, group
+	 -> (syscall(Syslchown, a(user), a(group)) : int64)
 }
-const quotactl	= {
-	 -> (syscall(Sysquotactl) : int)
+const fchown	= {fd, user, group
+	 -> (syscall(Sysfchown, a(user), a(group)) : int64)
 }
-const nfsservctl	= {
-	 -> (syscall(Sysnfsservctl) : int)
+const utime	= {filename, times
+	 -> (syscall(Sysutime, a(times)) : int64)
 }
-const getpmsg	= {
-	 -> (syscall(Sysgetpmsg) : int)
+const utimes	= {filename, utimes
+	 -> (syscall(Sysutimes, a(utimes)) : int64)
 }
-const putpmsg	= {
-	 -> (syscall(Sysputpmsg) : int)
+const readahead	= {fd, offset, count
+	 -> (syscall(Sysreadahead, a(offset), a(count)) : int64)
 }
-const afs_syscall	= {
-	 -> (syscall(Sysafs_syscall) : int)
+const readv	= {fd, vec, vlen
+	 -> (syscall(Sysreadv, a(vec), a(vlen)) : int64)
 }
-const tuxcall	= {
-	 -> (syscall(Systuxcall) : int)
+const writev	= {fd, vec, vlen
+	 -> (syscall(Syswritev, a(vec), a(vlen)) : int64)
 }
-const security	= {
-	 -> (syscall(Syssecurity) : int)
+const preadv	= {fd, vec, vlen, pos_l, pos_h
+	 -> (syscall(Syspreadv, a(vec), a(vlen), a(pos_l), a(pos_h)) : int64)
 }
-const gettid	= {
-	 -> (syscall(Sysgettid) : int)
+const preadv2	= {fd, vec, vlen, pos_l, pos_h, flags
+	 -> (syscall(Syspreadv2, a(vec), a(vlen), a(pos_l), a(pos_h), a(flags)) : int64)
 }
-const setxattr	= {
-	 -> (syscall(Syssetxattr) : int)
+const pwritev	= {fd, vec, vlen, pos_l, pos_h
+	 -> (syscall(Syspwritev, a(vec), a(vlen), a(pos_l), a(pos_h)) : int64)
 }
-const lsetxattr	= {
-	 -> (syscall(Syslsetxattr) : int)
+const pwritev2	= {fd, vec, vlen, pos_l, pos_h, flags
+	 -> (syscall(Syspwritev2, a(vec), a(vlen), a(pos_l), a(pos_h), a(flags)) : int64)
 }
-const fsetxattr	= {
-	 -> (syscall(Sysfsetxattr) : int)
+const fchdir	= {fd
+	 -> (syscall(Sysfchdir) : int64)
 }
-const getxattr	= {
-	 -> (syscall(Sysgetxattr) : int)
+const rmdir	= {pathname
+	 -> (syscall(Sysrmdir) : int64)
 }
-const lgetxattr	= {
-	 -> (syscall(Syslgetxattr) : int)
+const lookup_dcookie	= {cookie64, buf, len
+	 -> (syscall(Syslookup_dcookie, a(buf), a(len)) : int64)
 }
-const fgetxattr	= {
-	 -> (syscall(Sysfgetxattr) : int)
+const quotactl	= {cmd, special, id, addr
+	 -> (syscall(Sysquotactl, a(special), a(id), a(addr)) : int64)
 }
-const listxattr	= {
-	 -> (syscall(Syslistxattr) : int)
+const accept4	= {_a0, _a1, _a2, _a3
+	 -> (syscall(Sysaccept4, a(_a1), a(_a2), a(_a3)) : int64)
 }
-const llistxattr	= {
-	 -> (syscall(Sysllistxattr) : int)
+const getsockname	= {_a0, _a1, _a2
+	 -> (syscall(Sysgetsockname, a(_a1), a(_a2)) : int64)
 }
-const flistxattr	= {
-	 -> (syscall(Sysflistxattr) : int)
+const getpeername	= {_a0, _a1, _a2
+	 -> (syscall(Sysgetpeername, a(_a1), a(_a2)) : int64)
 }
-const removexattr	= {
-	 -> (syscall(Sysremovexattr) : int)
+const sendto	= {_a0, _a1, _a2, _a3, _a4, _a5
+	 -> (syscall(Syssendto, a(_a1), a(_a2), a(_a3), a(_a4), a(_a5)) : int64)
 }
-const lremovexattr	= {
-	 -> (syscall(Syslremovexattr) : int)
+const sendmmsg	= {fd, msg, vlen, flags
+	 -> (syscall(Syssendmmsg, a(msg), a(vlen), a(flags)) : int64)
 }
-const fremovexattr	= {
-	 -> (syscall(Sysfremovexattr) : int)
+const recvfrom	= {_a0, _a1, _a2, _a3, _a4, _a5
+	 -> (syscall(Sysrecvfrom, a(_a1), a(_a2), a(_a3), a(_a4), a(_a5)) : int64)
 }
-const tkill	= {tid, sig
-	 -> (syscall(Systkill, a(sig)) : int)
+const recvmmsg	= {fd, msg, vlen, flags, timeout
+	 -> (syscall(Sysrecvmmsg, a(msg), a(vlen), a(flags), a(timeout)) : int64)
 }
-const time	= {tm
-	 -> (syscall(Systime) : int)
+const socketpair	= {_a0, _a1, _a2, _a3
+	 -> (syscall(Syssocketpair, a(_a1), a(_a2), a(_a3)) : int64)
 }
-const sched_setaffinity	= {pid, len, user_mask_ptr
-	 -> (syscall(Syssched_setaffinity, a(len), a(user_mask_ptr)) : int)
+const select	= {n, inp, outp, exp, tvp
+	 -> (syscall(Sysselect, a(inp), a(outp), a(exp), a(tvp)) : int64)
 }
-const sched_getaffinity	= {pid, len, user_mask_ptr
-	 -> (syscall(Syssched_getaffinity, a(len), a(user_mask_ptr)) : int)
+const epoll_create	= {size
+	 -> (syscall(Sysepoll_create) : int64)
 }
-const set_thread_area	= {
-	 -> (syscall(Sysset_thread_area) : int)
+const epoll_create1	= {flags
+	 -> (syscall(Sysepoll_create1) : int64)
 }
-const lookup_dcookie	= {
-	 -> (syscall(Syslookup_dcookie) : int)
+const epoll_ctl	= {epfd, op, fd, event
+	 -> (syscall(Sysepoll_ctl, a(op), a(fd), a(event)) : int64)
 }
-const epoll_create	= {size
-	 -> (syscall(Sysepoll_create) : int)
+const epoll_wait	= {epfd, events, maxevents, timeout
+	 -> (syscall(Sysepoll_wait, a(events), a(maxevents), a(timeout)) : int64)
 }
-const epoll_ctl_old	= {
-	 -> (syscall(Sysepoll_ctl_old) : int)
+const epoll_pwait	= {epfd, events, maxevents, timeout, sigmask, sigsetsize
+	 -> (syscall(Sysepoll_pwait, a(events), a(maxevents), a(timeout), a(sigmask), a(sigsetsize)) : int64)
 }
-const epoll_wait_old	= {
-	 -> (syscall(Sysepoll_wait_old) : int)
+const sethostname	= {name, len
+	 -> (syscall(Syssethostname, a(len)) : int64)
 }
-const remap_file_pages	= {
-	 -> (syscall(Sysremap_file_pages) : int)
+const setdomainname	= {name, len
+	 -> (syscall(Syssetdomainname, a(len)) : int64)
 }
-const set_tid_address	= {tidptr
-	 -> (syscall(Sysset_tid_address) : int)
+const getrlimit	= {resource, rlim
+	 -> (syscall(Sysgetrlimit, a(rlim)) : int64)
 }
-const semtimedop	= {
-	 -> (syscall(Syssemtimedop) : int)
+const setrlimit	= {resource, rlim
+	 -> (syscall(Syssetrlimit, a(rlim)) : int64)
 }
-const fadvise64	= {fd, offset, len, advice
-	 -> (syscall(Sysfadvise64, a(offset), a(len), a(advice)) : int)
+const prlimit	= {pid, resource, new_rlim, old_rlim
+	 -> (syscall(Sysprlimit, a(resource), a(new_rlim), a(old_rlim)) : int64)
 }
-const timer_create	= {clock_id, evp, timerid
-	 -> (syscall(Systimer_create, a(evp), a(timerid)) : int)
+const getrusage	= {who, ru
+	 -> (syscall(Sysgetrusage, a(ru)) : int64)
 }
-const timer_settime	= {timerid, flags, new, old
-	 -> (syscall(Systimer_settime, a(flags), a(new), a(old)) : int)
+const umask	= {mask
+	 -> (syscall(Sysumask) : int64)
 }
-const timer_gettime	= {timerid, setting
-	 -> (syscall(Systimer_gettime, a(setting)) : int)
+const msgget	= {key, msgflg
+	 -> (syscall(Sysmsgget, a(msgflg)) : int64)
 }
-const timer_getoverrun	= {timerid
-	 -> (syscall(Systimer_getoverrun) : int)
+const msgsnd	= {msqid, msgp, msgsz, msgflg
+	 -> (syscall(Sysmsgsnd, a(msgp), a(msgsz), a(msgflg)) : int64)
 }
-const timer_delete	= {timerid
-	 -> (syscall(Systimer_delete) : int)
+const msgrcv	= {msqid, msgp, msgsz, msgtyp, msgflg
+	 -> (syscall(Sysmsgrcv, a(msgp), a(msgsz), a(msgtyp), a(msgflg)) : int64)
 }
-const clock_nanosleep	= {which, flags, rqtp, rmtp
-	 -> (syscall(Sysclock_nanosleep, a(flags), a(rqtp), a(rmtp)) : int)
+const msgctl	= {msqid, cmd, buf
+	 -> (syscall(Sysmsgctl, a(cmd), a(buf)) : int64)
 }
-const epoll_wait	= {epfd, events, maxevents, timeout
-	 -> (syscall(Sysepoll_wait, a(events), a(maxevents), a(timeout)) : int)
+const semget	= {key, nsems, semflg
+	 -> (syscall(Syssemget, a(nsems), a(semflg)) : int64)
 }
-const epoll_ctl	= {epfd, op, fd, event
-	 -> (syscall(Sysepoll_ctl, a(op), a(fd), a(event)) : int)
+const semop	= {semid, sops, nsops
+	 -> (syscall(Syssemop, a(sops), a(nsops)) : int64)
 }
-const tgkill	= {tgid, pid, sig
-	 -> (syscall(Systgkill, a(pid), a(sig)) : int)
+const semtimedop	= {semid, sops, nsops, timeout
+	 -> (syscall(Syssemtimedop, a(sops), a(nsops), a(timeout)) : int64)
 }
-const utimes	= {fname, tptr
-	 -> (syscall(Sysutimes, a(tptr)) : int)
+const shmat	= {shmid, shmaddr, shmflg
+	 -> (syscall(Sysshmat, a(shmaddr), a(shmflg)) : int64)
 }
-const mbind	= {
-	 -> (syscall(Sysmbind) : int)
+const shmget	= {key, size, flag
+	 -> (syscall(Sysshmget, a(size), a(flag)) : int64)
 }
-const set_mempolicy	= {
-	 -> (syscall(Sysset_mempolicy) : int)
+const shmdt	= {shmaddr
+	 -> (syscall(Sysshmdt) : int64)
 }
-const get_mempolicy	= {
-	 -> (syscall(Sysget_mempolicy) : int)
+const shmctl	= {shmid, cmd, buf
+	 -> (syscall(Sysshmctl, a(cmd), a(buf)) : int64)
 }
-const mq_open	= {
-	 -> (syscall(Sysmq_open) : int)
+const mq_open	= {name, oflag, mode, attr
+	 -> (syscall(Sysmq_open, a(oflag), a(mode), a(attr)) : int64)
 }
-const mq_unlink	= {
-	 -> (syscall(Sysmq_unlink) : int)
+const mq_unlink	= {name
+	 -> (syscall(Sysmq_unlink) : int64)
 }
-const mq_timedsend	= {
-	 -> (syscall(Sysmq_timedsend) : int)
+const mq_timedsend	= {mqdes, msg_ptr, msg_len, msg_prio, abs_timeout
+	 -> (syscall(Sysmq_timedsend, a(msg_ptr), a(msg_len), a(msg_prio), a(abs_timeout)) : int64)
 }
-const mq_timedreceive	= {
-	 -> (syscall(Sysmq_timedreceive) : int)
+const mq_timedreceive	= {mqdes, msg_ptr, msg_len, msg_prio, abs_timeout
+	 -> (syscall(Sysmq_timedreceive, a(msg_ptr), a(msg_len), a(msg_prio), a(abs_timeout)) : int64)
 }
-const mq_notify	= {
-	 -> (syscall(Sysmq_notify) : int)
+const mq_notify	= {mqdes, notification
+	 -> (syscall(Sysmq_notify, a(notification)) : int64)
 }
-const mq_getsetattr	= {
-	 -> (syscall(Sysmq_getsetattr) : int)
+const mq_getsetattr	= {mqdes, mqstat, omqstat
+	 -> (syscall(Sysmq_getsetattr, a(mqstat), a(omqstat)) : int64)
 }
-const kexec_load	= {
-	 -> (syscall(Syskexec_load) : int)
+const prctl	= {option, arg2, arg3, arg4, arg5
+	 -> (syscall(Sysprctl, a(arg2), a(arg3), a(arg4), a(arg5)) : int64)
 }
-const waitid	= {idtype, id, info, options, rusage
-	 -> (syscall(Syswaitid, a(id), a(info), a(options), a(rusage)) : int)
+const swapon	= {specialfile, swap_flags
+	 -> (syscall(Sysswapon, a(swap_flags)) : int64)
 }
-const add_key	= {
-	 -> (syscall(Sysadd_key) : int)
+const swapoff	= {specialfile
+	 -> (syscall(Sysswapoff) : int64)
 }
-const request_key	= {
-	 -> (syscall(Sysrequest_key) : int)
+const _sysctl	= {args
+	 -> (syscall(Sys_sysctl) : int64)
 }
-const keyctl	= {
-	 -> (syscall(Syskeyctl) : int)
+const sysinfo	= {info
+	 -> (syscall(Syssysinfo) : int64)
 }
-const ioprio_set	= {
-	 -> (syscall(Sysioprio_set) : int)
+const sysfs	= {option, arg1, arg2
+	 -> (syscall(Syssysfs, a(arg1), a(arg2)) : int64)
 }
-const ioprio_get	= {
-	 -> (syscall(Sysioprio_get) : int)
+const syslog	= {kind, buf, len
+	 -> (syscall(Syssyslog, a(buf), a(len)) : int64)
 }
-const inotify_init	= {
-	 -> (syscall(Sysinotify_init) : int)
+const ptrace	= {request, pid, addr, data
+	 -> (syscall(Sysptrace, a(pid), a(addr), a(data)) : int64)
 }
-const inotify_add_watch	= {
-	 -> (syscall(Sysinotify_add_watch) : int)
+const add_key	= {_type, _description, _payload, plen, destringid
+	 -> (syscall(Sysadd_key, a(_description), a(_payload), a(plen), a(destringid)) : int64)
 }
-const inotify_rm_watch	= {
-	 -> (syscall(Sysinotify_rm_watch) : int)
+const request_key	= {_type, _description, _callout_info, destringid
+	 -> (syscall(Sysrequest_key, a(_description), a(_callout_info), a(destringid)) : int64)
 }
-const migrate_pages	= {
-	 -> (syscall(Sysmigrate_pages) : int)
+const keyctl	= {cmd, arg2, arg3, arg4, arg5
+	 -> (syscall(Syskeyctl, a(arg2), a(arg3), a(arg4), a(arg5)) : int64)
 }
-const openat	= {dfd, filename, flags, mode
-	 -> (syscall(Sysopenat, a(filename), a(flags), a(mode)) : int)
+const ioprio_set	= {which, who, ioprio
+	 -> (syscall(Sysioprio_set, a(who), a(ioprio)) : int64)
 }
-const mkdirat	= {dfd, pathname, mode
-	 -> (syscall(Sysmkdirat, a(pathname), a(mode)) : int)
+const ioprio_get	= {which, who
+	 -> (syscall(Sysioprio_get, a(who)) : int64)
 }
-const mknodat	= {dfd, filename, mode, dev
-	 -> (syscall(Sysmknodat, a(filename), a(mode), a(dev)) : int)
+const set_mempolicy	= {mode, nmask, maxnode
+	 -> (syscall(Sysset_mempolicy, a(nmask), a(maxnode)) : int64)
 }
-const fchownat	= {dfd, filename, uid, gid, flag
-	 -> (syscall(Sysfchownat, a(filename), a(uid), a(gid), a(flag)) : int)
+const migrate_pages	= {pid, maxnode, from, to
+	 -> (syscall(Sysmigrate_pages, a(maxnode), a(from), a(to)) : int64)
 }
-const futimesat	= {dfd, filename, utimes
-	 -> (syscall(Sysfutimesat, a(filename), a(utimes)) : int)
+const move_pages	= {pid, nr_pages, pages, nodes, status, flags
+	 -> (syscall(Sysmove_pages, a(nr_pages), a(pages), a(nodes), a(status), a(flags)) : int64)
 }
-const fstatat	= {dfd, pathname, statbuf, flag
-	 -> (syscall(Sysfstatat, a(pathname), a(statbuf), a(flag)) : int)
+const mbind	= {start, len, mode, nmask, maxnode, flags
+	 -> (syscall(Sysmbind, a(len), a(mode), a(nmask), a(maxnode), a(flags)) : int64)
 }
+const get_mempolicy	= {policy, nmask, maxnode, addr, flags
+	 -> (syscall(Sysget_mempolicy, a(nmask), a(maxnode), a(addr), a(flags)) : int64)
+}
+const inotify_init	= {
+	 -> (syscall(Sysinotify_init) : int64)
+}
+const inotify_init1	= {flags
+	 -> (syscall(Sysinotify_init1) : int64)
+}
+const inotify_add_watch	= {fd, path, mask
+	 -> (syscall(Sysinotify_add_watch, a(path), a(mask)) : int64)
+}
+const inotify_rm_watch	= {fd, wd
+	 -> (syscall(Sysinotify_rm_watch, a(wd)) : int64)
+}
+const mknodat	= {dfd, filename, mode, dev
+	 -> (syscall(Sysmknodat, a(filename), a(mode), a(dev)) : int64)
+}
+const mkdirat	= {dfd, pathname, mode
+	 -> (syscall(Sysmkdirat, a(pathname), a(mode)) : int64)
+}
 const unlinkat	= {dfd, pathname, flag
-	 -> (syscall(Sysunlinkat, a(pathname), a(flag)) : int)
+	 -> (syscall(Sysunlinkat, a(pathname), a(flag)) : int64)
 }
+const symlinkat	= {oldname, newdfd, newname
+	 -> (syscall(Syssymlinkat, a(newdfd), a(newname)) : int64)
+}
+const linkat	= {olddfd, oldname, newdfd, newname, flags
+	 -> (syscall(Syslinkat, a(oldname), a(newdfd), a(newname), a(flags)) : int64)
+}
 const renameat	= {olddfd, oldname, newdfd, newname
-	 -> (syscall(Sysrenameat, a(oldname), a(newdfd), a(newname)) : int)
+	 -> (syscall(Sysrenameat, a(oldname), a(newdfd), a(newname)) : int64)
 }
-const linkat	= {olddfd, oldname, newdfd, newname, flag
-	 -> (syscall(Syslinkat, a(oldname), a(newdfd), a(newname), a(flag)) : int)
+const renameat2	= {olddfd, oldname, newdfd, newname, flags
+	 -> (syscall(Sysrenameat2, a(oldname), a(newdfd), a(newname), a(flags)) : int64)
 }
-const symlinkat	= {oldname, newdfd, newname
-	 -> (syscall(Syssymlinkat, a(newdfd), a(newname)) : int)
+const futimesat	= {dfd, filename, utimes
+	 -> (syscall(Sysfutimesat, a(filename), a(utimes)) : int64)
 }
-const readlinkat	= {dfd, path, buf, bufsiz
-	 -> (syscall(Sysreadlinkat, a(path), a(buf), a(bufsiz)) : int)
+const faccessat	= {dfd, filename, mode
+	 -> (syscall(Sysfaccessat, a(filename), a(mode)) : int64)
 }
 const fchmodat	= {dfd, filename, mode
-	 -> (syscall(Sysfchmodat, a(filename), a(mode)) : int)
+	 -> (syscall(Sysfchmodat, a(filename), a(mode)) : int64)
 }
-const faccessat	= {dfd, filename, amode
-	 -> (syscall(Sysfaccessat, a(filename), a(amode)) : int)
+const fchownat	= {dfd, filename, user, group, flag
+	 -> (syscall(Sysfchownat, a(filename), a(user), a(group), a(flag)) : int64)
 }
-const pselect6	= {nfds, readfds, writefds, exceptfds, tsp, sig
-	 -> (syscall(Syspselect6, a(readfds), a(writefds), a(exceptfds), a(tsp), a(sig)) : int)
+const openat	= {dfd, filename, flags, mode
+	 -> (syscall(Sysopenat, a(filename), a(flags), a(mode)) : int64)
 }
-const ppoll	= {fds, nfds, tsp, sset, ssize
-	 -> (syscall(Sysppoll, a(nfds), a(tsp), a(sset), a(ssize)) : int)
+const newfstatat	= {dfd, filename, statbuf, flag
+	 -> (syscall(Sysnewfstatat, a(filename), a(statbuf), a(flag)) : int64)
 }
-const unshare	= {
-	 -> (syscall(Sysunshare) : int)
+const readlinkat	= {dfd, path, buf, bufsiz
+	 -> (syscall(Sysreadlinkat, a(path), a(buf), a(bufsiz)) : int64)
 }
-const set_robust_list	= {head, len
-	 -> (syscall(Sysset_robust_list, a(len)) : int)
+const utimensat	= {dfd, filename, utimes, flags
+	 -> (syscall(Sysutimensat, a(filename), a(utimes), a(flags)) : int64)
 }
-const get_robust_list	= {pid, head, len
-	 -> (syscall(Sysget_robust_list, a(head), a(len)) : int)
+const unshare	= {unshare_flags
+	 -> (syscall(Sysunshare) : int64)
 }
-const splice	= {
-	 -> (syscall(Syssplice) : int)
+const splice	= {fd_in, off_in, fd_out, off_out, len, flags
+	 -> (syscall(Syssplice, a(off_in), a(fd_out), a(off_out), a(len), a(flags)) : int64)
 }
-const tee	= {
-	 -> (syscall(Systee) : int)
+const vmsplice	= {fd, iov, nr_segs, flags
+	 -> (syscall(Sysvmsplice, a(iov), a(nr_segs), a(flags)) : int64)
 }
-const sync_file_range	= {
-	 -> (syscall(Syssync_file_range) : int)
+const tee	= {fdin, fdout, len, flags
+	 -> (syscall(Systee, a(fdout), a(len), a(flags)) : int64)
 }
-const vmsplice	= {
-	 -> (syscall(Sysvmsplice) : int)
+const sync_file_range	= {fd, offset, nbytes, flags
+	 -> (syscall(Syssync_file_range, a(offset), a(nbytes), a(flags)) : int64)
 }
-const move_pages	= {
-	 -> (syscall(Sysmove_pages) : int)
+const get_robust_list	= {pid, head_ptr, len_ptr
+	 -> (syscall(Sysget_robust_list, a(head_ptr), a(len_ptr)) : int64)
 }
-const utimensat	= {dfd, pathname, times, flags
-	 -> (syscall(Sysutimensat, a(pathname), a(times), a(flags)) : int)
+const set_robust_list	= {head, len
+	 -> (syscall(Sysset_robust_list, a(len)) : int64)
 }
-const epoll_pwait	= {epfd, events, maxevents, timeout, mask
-	 -> (syscall(Sysepoll_pwait, a(events), a(maxevents), a(timeout), a(mask)) : int)
+const getcpu	= {cpu, node, cache
+	 -> (syscall(Sysgetcpu, a(node), a(cache)) : int64)
 }
-const signalfd	= {
-	 -> (syscall(Syssignalfd) : int)
+const signalfd	= {ufd, user_mask, sizemask
+	 -> (syscall(Syssignalfd, a(user_mask), a(sizemask)) : int64)
 }
-const timerfd	= {
-	 -> (syscall(Systimerfd) : int)
+const signalfd4	= {ufd, user_mask, sizemask, flags
+	 -> (syscall(Syssignalfd4, a(user_mask), a(sizemask), a(flags)) : int64)
 }
-const eventfd	= {initval
-	 -> (syscall(Syseventfd) : int)
+const timerfd_create	= {clockid, flags
+	 -> (syscall(Systimerfd_create, a(flags)) : int64)
 }
-const timerfd_settime	= {
-	 -> (syscall(Systimerfd_settime) : int)
+const timerfd_settime	= {ufd, flags, utmr, otmr
+	 -> (syscall(Systimerfd_settime, a(flags), a(utmr), a(otmr)) : int64)
 }
-const timerfd_gettime	= {
-	 -> (syscall(Systimerfd_gettime) : int)
+const timerfd_gettime	= {ufd, otmr
+	 -> (syscall(Systimerfd_gettime, a(otmr)) : int64)
 }
-const accept4	= {s, addr, namelen, flags
-	 -> (syscall(Sysaccept4, a(addr), a(namelen), a(flags)) : int)
+const eventfd	= {count
+	 -> (syscall(Syseventfd) : int64)
 }
-const signalfd4	= {
-	 -> (syscall(Syssignalfd4) : int)
+const eventfd2	= {count, flags
+	 -> (syscall(Syseventfd2, a(flags)) : int64)
 }
-const eventfd2	= {initval, flags
-	 -> (syscall(Syseventfd2, a(flags)) : int)
+const memfd_create	= {uname_ptr, flags
+	 -> (syscall(Sysmemfd_create, a(flags)) : int64)
 }
-const epoll_create1	= {flags
-	 -> (syscall(Sysepoll_create1) : int)
+const userfaultfd	= {flags
+	 -> (syscall(Sysuserfaultfd) : int64)
 }
-const dup3	= {oldfd, newfd, flags
-	 -> (syscall(Sysdup3, a(newfd), a(flags)) : int)
+const pselect6	= {_a0, _a1, _a2, _a3, _a4, _a5
+	 -> (syscall(Syspselect6, a(_a1), a(_a2), a(_a3), a(_a4), a(_a5)) : int64)
 }
-const pipe2	= {pipefds, flags
-	 -> (syscall(Syspipe2, a(flags)) : int)
+const ppoll	= {_a0, int, _a2, _a3, _a4
+	 -> (syscall(Sysppoll, a(int), a(_a2), a(_a3), a(_a4)) : int64)
 }
-const inotify_init1	= {
-	 -> (syscall(Sysinotify_init1) : int)
+const fanotify_init	= {flags, event_f_flags
+	 -> (syscall(Sysfanotify_init, a(event_f_flags)) : int64)
 }
-const preadv	= {
-	 -> (syscall(Syspreadv) : int)
+const fanotify_mark	= {fanotify_fd, flags, mask, fd, pathname
+	 -> (syscall(Sysfanotify_mark, a(flags), a(mask), a(fd), a(pathname)) : int64)
 }
-const pwritev	= {
-	 -> (syscall(Syspwritev) : int)
+const syncfs	= {fd
+	 -> (syscall(Syssyncfs) : int64)
 }
-const rt_tsigqueueinfo	= {
-	 -> (syscall(Sysrt_tsigqueueinfo) : int)
+const vfork	= {
+	 -> (syscall(Sysvfork) : int64)
 }
-const perf_event_open	= {
-	 -> (syscall(Sysperf_event_open) : int)
+const perf_event_open	= {attr_uptr, pid, cpu, group_fd, flags
+	 -> (syscall(Sysperf_event_open, a(pid), a(cpu), a(group_fd), a(flags)) : int64)
 }
-const recvmmsg	= {s, msg, vlen, flags, timeout
-	 -> (syscall(Sysrecvmmsg, a(msg), a(vlen), a(flags), a(timeout)) : int)
+const name_to_handle_at	= {dfd, name, handle, mnt_id, flag
+	 -> (syscall(Sysname_to_handle_at, a(name), a(handle), a(mnt_id), a(flag)) : int64)
 }
-const fanotify_init	= {
-	 -> (syscall(Sysfanotify_init) : int)
+const open_by_handle_at	= {mountdirfd, handle, flags
+	 -> (syscall(Sysopen_by_handle_at, a(handle), a(flags)) : int64)
 }
-const fanotify_mark	= {
-	 -> (syscall(Sysfanotify_mark) : int)
+const setns	= {fd, nstype
+	 -> (syscall(Syssetns, a(nstype)) : int64)
 }
-const prlimit64	= {pid, resource, new, old
-	 -> (syscall(Sysprlimit64, a(resource), a(new), a(old)) : int)
+const process_vm_readv	= {pid, lvec, liovcnt, rvec, riovcnt, flags
+	 -> (syscall(Sysprocess_vm_readv, a(lvec), a(liovcnt), a(rvec), a(riovcnt), a(flags)) : int64)
 }
-const name_to_handle_at	= {
-	 -> (syscall(Sysname_to_handle_at) : int)
+const process_vm_writev	= {pid, lvec, liovcnt, rvec, riovcnt, flags
+	 -> (syscall(Sysprocess_vm_writev, a(lvec), a(liovcnt), a(rvec), a(riovcnt), a(flags)) : int64)
 }
-const open_by_handle_at	= {
-	 -> (syscall(Sysopen_by_handle_at) : int)
+const kcmp	= {pid1, pid2, kind, idx1, idx2
+	 -> (syscall(Syskcmp, a(pid2), a(kind), a(idx1), a(idx2)) : int64)
 }
-const clock_adjtime	= {
-	 -> (syscall(Sysclock_adjtime) : int)
+const finit_module	= {fd, uargs, flags
+	 -> (syscall(Sysfinit_module, a(uargs), a(flags)) : int64)
 }
-const syncfs	= {fd
-	 -> (syscall(Syssyncfs) : int)
+const seccomp	= {op, flags, uargs
+	 -> (syscall(Sysseccomp, a(flags), a(uargs)) : int64)
 }
-const sendmmsg	= {s, msg, vlen, flags
-	 -> (syscall(Syssendmmsg, a(msg), a(vlen), a(flags)) : int)
+const getrandom	= {buf, count, flags
+	 -> (syscall(Sysgetrandom, a(count), a(flags)) : int64)
 }
-const setns	= {
-	 -> (syscall(Syssetns) : int)
+const bpf	= {cmd, attr, size
+	 -> (syscall(Sysbpf, a(attr), a(size)) : int64)
 }
-const process_vm_readv	= {
-	 -> (syscall(Sysprocess_vm_readv) : int)
+const execveat	= {dfd, filename, argv, envp, flags
+	 -> (syscall(Sysexecveat, a(filename), a(argv), a(envp), a(flags)) : int64)
 }
-const process_vm_writev	= {
-	 -> (syscall(Sysprocess_vm_writev) : int)
+const membarrier	= {cmd, flags
+	 -> (syscall(Sysmembarrier, a(flags)) : int64)
 }
-const kcmp	= {
-	 -> (syscall(Syskcmp) : int)
+const copy_file_range	= {fd_in, off_in, fd_out, off_out, len, flags
+	 -> (syscall(Syscopy_file_range, a(off_in), a(fd_out), a(off_out), a(len), a(flags)) : int64)
 }
-const finit_module	= {
-	 -> (syscall(Sysfinit_module) : int)
+const mlock2	= {start, len, flags
+	 -> (syscall(Sysmlock2, a(len), a(flags)) : int64)
+}
+const pkey_mprotect	= {start, len, prot, pkey
+	 -> (syscall(Syspkey_mprotect, a(len), a(prot), a(pkey)) : int64)
+}
+const pkey_alloc	= {flags, init_val
+	 -> (syscall(Syspkey_alloc, a(init_val)) : int64)
+}
+const pkey_free	= {pkey
+	 -> (syscall(Syspkey_free) : int64)
 }
--- a/mk/bootstrap/bootstrap+Linux-x86_64.sh
+++ b/mk/bootstrap/bootstrap+Linux-x86_64.sh
@@ -117,7 +117,6 @@
 echo 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/syssel.myr && 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/syssel.myr &&\
 echo 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/util.myr && 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/util.myr &&\
 echo 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/parse.myr && 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/parse.myr &&\
-echo 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/clean.myr && 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/clean.myr &&\
 echo 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/build.myr && 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/build.myr &&\
 echo 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/install.myr && 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/install.myr &&\
 echo 	$pwd/6/6m -I lib/std -I lib/sys lib/bio/bio.myr && 	$pwd/6/6m -I lib/std -I lib/sys lib/bio/bio.myr &&\
@@ -138,5 +137,5 @@
 echo 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/subtest.myr && 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/subtest.myr &&\
 echo 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/test.myr && 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/test.myr &&\
 echo 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/main.myr && 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/main.myr &&\
-echo 	ld -o mbld/mbld $pwd/rt/_myrrt.o mbld/types.o mbld/config.o mbld/build.o mbld/libs.o mbld/install.o mbld/test.o mbld/util.o mbld/main.o mbld/subtest.o mbld/clean.o mbld/opts.o mbld/parse.o mbld/syssel.o mbld/deps.o -Llib/thread -lthread -Llib/regex -lregex -Llib/bio -lbio -Llib/std -lstd -Llib/sys -lsys && 	ld -o mbld/mbld $pwd/rt/_myrrt.o mbld/types.o mbld/config.o mbld/build.o mbld/libs.o mbld/install.o mbld/test.o mbld/util.o mbld/main.o mbld/subtest.o mbld/clean.o mbld/opts.o mbld/parse.o mbld/syssel.o mbld/deps.o -Llib/thread -lthread -Llib/regex -lregex -Llib/bio -lbio -Llib/std -lstd -Llib/sys -lsys &&\
+echo 	ld -o mbld/mbld $pwd/rt/_myrrt.o mbld/types.o mbld/config.o mbld/build.o mbld/libs.o mbld/install.o mbld/test.o mbld/util.o mbld/main.o mbld/subtest.o  mbld/opts.o mbld/parse.o mbld/syssel.o mbld/deps.o -Llib/thread -lthread -Llib/regex -lregex -Llib/bio -lbio -Llib/std -lstd -Llib/sys -lsys && 	ld -o mbld/mbld $pwd/rt/_myrrt.o mbld/types.o mbld/config.o mbld/build.o mbld/libs.o mbld/install.o mbld/test.o mbld/util.o mbld/main.o mbld/subtest.o  mbld/opts.o mbld/parse.o mbld/syssel.o mbld/deps.o -Llib/thread -lthread -Llib/regex -lregex -Llib/bio -lbio -Llib/std -lstd -Llib/sys -lsys &&\
 true
--- a/support/syscall-gen/c2myr.py
+++ b/support/syscall-gen/c2myr.py
@@ -21,6 +21,7 @@
 
     'unsigned char':            'byte',
     'unsigned short':           'uint16',
+    'unsigned':                 'uint',
     'unsigned int':             'uint',
     'unsigned long':            'uint64',
     'unsigned long long':       'uint64',
@@ -62,6 +63,16 @@
     'int32':                    'int32',
     'int64':                    'int64',
 
+    'i8':                       'int8',
+    'i16':                      'int16',
+    'i32':                      'int32',
+    'i64':                      'int64',
+
+    'u8':                       'uint8',
+    'u16':                      'uint16',
+    'u32':                      'uint32',
+    'u64':                      'uint64',
+
     '__int64_t':                'int64',
 
     'char':                     'byte',
@@ -309,9 +320,11 @@
     prehdr = '''
 #define __builtin_va_list int
 #define __inline
+#define __inline__
 #define __restrict
 #define __attribute__(_)
 #define __asm(x)
+#define __asm__(x)
 #define __extension__
 #define __signed__
 #define __extern_inline__
@@ -333,15 +346,24 @@
     # each one ahead of time, and see if it works.
     #
     # if so, we generate a mega-header with all the types.
-
-    for hdr in os.listdir('/usr/include/sys'):
+    syshdr = []
+    if os.path.exists("/usr/include/sys"):
+        syshdr = ["sys/" + h for h in os.listdir('/usr/include/sys')]
+    if os.path.exists("/usr/include/linux"):
+        syshdr = syshdr + ["linux/" + h for h in os.listdir("/usr/include/linux")]
+    # it seems that sys headers can also be stashed here. Shit.
+    if os.path.exists("/usr/include/x86_64-linux-gnu/sys"):
+        syshdr = syshdr + ["linux/" + h for h in os.listdir("/usr/include/linux")]
+    for hdr in syshdr:
         print 'trying {}'.format(hdr)
+        if not hdr.endswith(".h"):
+            continue
         try:
-            include = prehdr + '\n#include <sys/{}>'.format(hdr)
+            include = prehdr + '\n#include <{}>'.format(hdr)
             with open('/tmp/myr-includes.h', 'w') as f:
                 f.write(include)
             pycparser.parse_file('/tmp/myr-includes.h', use_cpp=True)
-            includes.append('#include <sys/{}>'.format(hdr))
+            includes.append('#include <{}>'.format(hdr))
         except Exception:
             print '...skip'
 
--- a/support/syscall-gen/gencalls.awk
+++ b/support/syscall-gen/gencalls.awk
@@ -11,15 +11,11 @@
 	print "  edit with caution.";
 	print " */";
 	ARGC=1
-	if (systype =="freebsd" || systype == "linux") {
+	masterfmt = 1
+	if (systype =="freebsd") {
 		Typefield = 3;
 		Protofield = 4;
 		renamings["sys_exit"] = "exit"
-		if (systype == "linux") {
-			strippfx="^(linux_|linux_new)"
-			renamings["mmap2"] = "mmap";
-			renamings["sys_futex"] = "futex";
-		}
 	} else if (systype == "openbsd") {
 		Typefield = 2;
 		Protofield = 3;
@@ -27,6 +23,13 @@
 	} else if (systype == "netbsd") {
 		Typefield = 2;
 		Protofield = 4;
+	} else if (systype == "linux") {
+		Typefield = 0;
+		Protofield = 4;
+		strippfx="^(linux_|linux_new)"
+		loadtbl()
+		Protofield=2
+		masterfmt = 0
 	} else {
 		print "unknown system " ARGV[1];
 		exit 1;
@@ -66,15 +69,17 @@
 		printf("%s\n", sccall[i])
 }
 
-$Typefield == "STD" || (systype == "linux" && $Typefield == "NOPROTO") {
-	parse();
-	if (length("const Sys") + length(name) < 16)
+$Typefield == "STD" || (!masterfmt && $1 == "asmlinkage") {
+	if (!parse())
+		next;
+	numcst = "const Sys"name
+	if (length(numcst) < 16)
 		tabs="\t\t\t"
-	else if (length("const Sys") + length(name) < 24)
+	else if (length(numcst) < 24)
 		tabs="\t\t"
 	else
 		tabs = "\t"
-	num = sprintf("const Sys%s%s: scno = %d", name, tabs, number);
+	num = sprintf("%s%s: scno = %d", numcst, tabs, numbertab[name]);
 	scnums[nnums++] = num
 
 	if (nocode)
@@ -118,11 +123,13 @@
 }
 
 function myrtype(t) {
-	gsub("[[:space:]]", "", t)
+	gsub(" *$", "", t)
 	if (systype == "linux")
 		gsub("^l_", "", t)
 
 	if (t == "char")		t = "byte";
+	if (t == "unsigned char")       t = "byte";
+	if (t == "unsigned")	        t = "uint";
 	if (t == "unsigned int")	t = "uint";
 	if (t == "unsigned long")	t = "uint64";
 	if (t == "long")		t = "int64";
@@ -134,6 +141,9 @@
 	if (t == "acl_perm_t")		t = "aclperm";
 	if (t == "acl_entry_type_t")	t = "aclenttype";
 	if (t == "mode_t")		t = "filemode"
+	if (t == "umode_t")		t = "filemode"
+	if (t == "aio_context_t")	t = "aiocontext"
+	if (t == "qid_t")		t = "int32"
 	# myrddin sizes are signed
 	if (t == "ssize_t")		t = "size";
 	if (t == "__socklen_t")		t = "int32";
@@ -149,6 +159,11 @@
 	if (t == "caddr_t")		t = "void#";
 
 	# linux stuff
+	if (t == "u8")			t = "uint64";
+	if (t == "u16")			t = "uint64";
+	if (t == "u32")			t = "uint64";
+	if (t == "u64")			t = "uint64";
+	if (t == "qid_t")		t = "int32";
 	if (t == "times_argv")		t = "tms";
 	if (t == "newstat")		t = "statbuf";
 	if (t == "stat64")		t = "statbuf";
@@ -157,6 +172,12 @@
 	if (t == "user_cap_data")	t = "capuserdata";
 	if (t == "epoll_event")		t = "epollevt";
 	if (t == "statfs_buf")		t = "statfs";
+	if (t == "user_msghdr")		t = "int32"
+	if (t == "msg")			t = "void#"
+	if (t == "mqd_t")		t = "int"
+	if (t == "bpf_attr")		t = "bpfgattr"
+	if (t == "key_serial_t")	t = "int32"
+	if (t == "linux_dirent64")	t = "dirent64"
 	if (t == "linux_robust_list_head")
 		t = "robust_list_head"
 
@@ -188,37 +209,35 @@
 }
 
 function parse() {
-	number = $1;
 	type = $Typefield;
 
 	argc = 0
 	nocode = 0
-	if ($NF == "}") {
-		funcalias="";
-		argalias="";
+	if (!masterfmt) {
+		end=NF
+	} else if ($NF == "}") {
 		rettype="int";
 		end=NF;
 	} else if ($(NF-1) == "}") {
-		funcalias=$(NF-1);
-		argalias="";
 		end=NF-1;
 	} else {
-		funcalias=$(NF-2);
-		argalias=$(NF-1);
 		rettype=$NF;
 		end=NF-3;
 	}
 
 	f = Protofield; 
-	# openbsd puts flags after the kind of call
-	if (systype == "openbsd" && $f != "{")
-		f++;
-	if ($f != "{")
-		err($f, "{");
-	f++
-	if ($end != "}")
-		err($f, "closing }");
-	end--;
+	if (masterfmt) {
+		numbertab[name] = $1;
+		# openbsd puts flags after the kind of call
+		if (systype == "openbsd" && $f != "{")
+			f++;
+		if ($f != "{")
+			err($f, "{");
+		f++
+		if ($end != "}")
+			err($f, "closing }");
+		end--;
+	}
 	if ($end != ";")
 		err($end, ";");
 	end--;
@@ -235,19 +254,20 @@
 	name=$f;
 	if (strippfx)
 		gsub(strippfx, "", name);
+	if (!masterfmt && !renamings[name])
+		return 0;
 	if (renamings[name])
 		name=renamings[name];
 	if (special[name])
 		nocode = 1
 	f++;
-
 	if ($f != "(")
 		err($f, "(");
 	f++; 
 	if (f == end) {
 		if ($f != "void")
-			parserr($f, "argument definition")
-		return
+			err($f, "argument definition")
+		return 1;
 	}
 
 	while (f <= end) {
@@ -256,29 +276,50 @@
 		while (f < end && $(f+1) != ",") {
 			if ($f == "...")
 				f++;
-			if (argtype[argc] != "" && oldf != "*" && $f != "*")
-				argtype[argc] = argtype[argc]" ";
-			if ($f == "*")
+			if ($f == "const" || $f == "struct" ||
+			    $f == "__restrict" || $f == "volatile" ||
+			    $f == "union" || $f == "__user") {
+				f++;
+				continue;
+			}
+			if ($f == "*") {
+				argtype[argc] = myrtype(argtype[argc]);
 				$f="#"
-			if ($f != "const" && $f != "struct" &&
-			    $f != "__restrict" && $f != "volatile" &&
-			    $f != "union") {
-				argtype[argc] = myrtype(argtype[argc]$f);
-				if ($f != "#" && !knowntypes[myrtype($f)] && !wanttype[$f]) {
-					t = cname($f)
-					wanttype[t] = 1
-					printf("%s\n", t) > "want.txt"
-				}
 			}
+			if ($f == "#") {
+				argtype[argc] = myrtype(argtype[argc])
+			}
+			if (argtype[argc] != "" && oldf != "*" && $f != "#" && $f != ",") {
+				argtype[argc] = argtype[argc]" ";
+			}
+			argtype[argc] = argtype[argc]$f;
+			if ($f != "#" && !knowntypes[myrtype($f)] && !wanttype[$f]) {
+				t = cname($f)
+				wanttype[t] = 1
+				printf("%s\n", t) > "want.txt"
+			}
 			oldf = $f;
 			f++
 		}
-		if (argtype[argc] == "")
-			err($f, "argument definition")
-		argname[argc]=unkeyword($f);
-		f += 2;			# skip name, and any comma
+		# unnamed protos: f(int)
+		if (argtype[argc] == "" || $f == "*") {
+			argname[argc] = "_a"argc
+			if ($f == "*")
+				argtype[argc] = myrtype(argtype[argc])"#"
+			else
+				argtype[argc] = myrtype($f)
+		} else {
+			argname[argc]=unkeyword($f);
+		}
+		argtype[argc] = myrtype(argtype[argc]);
+		# skip name
+		if ($f != ",")
+			f++;
+		# skip comma:
+		f++;
 		argc++
 	}
+	return 1;
 }
 
 function loadtypes() {
@@ -325,4 +366,23 @@
 			specialbody[nspecialbody++] = ln;
 		}
 	}
+}
+
+function loadtbl() {
+	path = "syscalls+"sys"-"arch".tbl";
+	while ((getline ln < path) > 0) {
+		split(ln, sp);
+		if (sp[2] != "common" && sp[2] != "64")
+			continue;
+		gsub("/.*$", "", sp[4])
+		renamings[sp[4]] = sp[3];
+		numbertab[sp[3]] = sp[1];
+	}
+	renamings["sys_mmap_pgoff"] = "mmap";
+	renamings["sys_pread64"] = "pread";
+	renamings["sys_pwrite64"] = "pwrite";
+	renamings["sys_fadvise64"] = "fadvise";
+	renamings["sys_prlimit64"] = "prlimit";
+	# obsoletes
+	renamings["sys_getdents"] = "";
 }
--- a/support/syscall-gen/gensys.sh
+++ b/support/syscall-gen/gensys.sh
@@ -5,7 +5,7 @@
 	exit 1
 fi
 
-gen() {
+mastergen() {
 	sed -e '
 	s/\$//g
 	:join
@@ -21,8 +21,30 @@
 	' < syscalls+$1.master | awk -f gencalls.awk $1 $2 > sys+$1-$2.myr
 }
 
+hdrgen() {
+	sed -e '
+	s/\$//g
+	:join
+		/[,(\\]$/{a\
+
+		N
+		s/\\*\n//
+		b join
+		}
+	2,${
+		/^#/!s/\([{}()*,]\)/ \1 /g
+	}
+	' < syscalls+$1.h | tee sysjoined.txt | awk -f gencalls.awk $1 $2 > sys+$1-$2.myr
+}
+
 rm -f have.txt want.txt gentypes+$1-$2.frag
 
-gen $1 $2
-python ./c2myr.py $1 $2
-gen $1 $2
+if [ `uname` = Linux ]; then
+	hdrgen $1 $2
+	python ./c2myr.py $1 $2
+	hdrgen $1 $2
+else
+	mastergen $1 $2
+	python ./c2myr.py $1 $2
+	mastergen $1 $2
+fi
--- a/support/syscall-gen/specials+linux-x64.frag
+++ b/support/syscall-gen/specials+linux-x64.frag
@@ -1,6 +1,3 @@
-/* syscalls that aren't in freebsd's syscalls.master */
-const Sysmemfd_create           : scno = 319
-
 /* getting to the os */
 extern const syscall	: (sc:scno, args:... -> int64)
 extern const sigreturn	: (-> void)
--- a/support/syscall-gen/syscalls+linux.master
+++ /dev/null
@@ -1,515 +1,0 @@
- $FreeBSD: releng/11.0/sys/amd64/linux/syscalls.master 303005 2016-07-18 16:34:11Z dchagin $
-
-;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
-; System call name/number master file (or rather, slave, from LINUX).
-; Processed to create linux_sysent.c, linux_proto.h and linux_syscall.h.
-
-; Columns: number audit type nargs name alt{name,tag,rtyp}/comments
-;	number	system call number, must be in order
-;	audit	the audit event associated with the system call
-;		A value of AUE_NULL means no auditing, but it also means that
-;		there is no audit event for the call at this time. For the
-;		case where the event exists, but we don't want auditing, the
-;		event should be #defined to AUE_NULL in audit_kevents.h.
-;	type	one of STD, OBSOL, UNIMPL
-;	name	psuedo-prototype of syscall routine
-;		If one of the following alts is different, then all appear:
-;	altname	name of system call if different
-;	alttag	name of args struct tag if different from [o]`name'"_args"
-;	altrtyp	return type if not int (bogus - syscalls always return int)
-;		for UNIMPL/OBSOL, name continues with comments
-
-; types:
-;	STD	always included
-;	OBSOL	obsolete, not included in system, only specifies name
-;	UNIMPL	not implemented, placeholder only
-
-#include <sys/param.h>
-#include <sys/sysent.h>
-#include <sys/sysproto.h>
-#include <compat/linux/linux_sysproto.h>
-#include <amd64/linux/linux.h>
-#include <amd64/linux/linux_proto.h>
-
-; Isn't pretty, but there seems to be no other way to trap nosys
-#define	nosys	linux_nosys
-
-; #ifdef's, etc. may be included, and are copied to the output files.
-
-0	AUE_NULL	NOPROTO	{ int read(int fd, char *buf, \
-				    u_int nbyte); }
-1	AUE_NULL	NOPROTO	{ int write(int fd, char *buf, \
-				    u_int nbyte); }
-2	AUE_OPEN_RWTC	STD	{ int linux_open(char *path, l_int flags, \
-				    l_int mode); }
-3	AUE_CLOSE	NOPROTO	{ int close(int fd); }
-4	AUE_STAT	STD	{ int linux_newstat(char *path, \
-				    struct l_newstat *buf); }
-5	AUE_FSTAT	STD	{ int linux_newfstat(l_uint fd, \
-				    struct l_newstat *buf); }
-6	AUE_LSTAT	STD	{ int linux_newlstat(char *path, \
-				    struct l_newstat *buf); }
-7	AUE_POLL	NOPROTO	{ int poll(struct pollfd *fds, u_int nfds, \
-				    int timeout); }
-8	AUE_LSEEK	STD	{ int linux_lseek(l_uint fdes, l_off_t off, \
-				    l_int whence); }
-9	AUE_MMAP	STD	{ int linux_mmap2(l_ulong addr, l_ulong len, \
-				    l_ulong prot, l_ulong flags, l_ulong fd, \
-				    l_ulong pgoff); }
-10	AUE_MPROTECT	STD	{ int linux_mprotect(caddr_t addr, int len, \
-				    int prot); }
-11	AUE_MUNMAP	NOPROTO	{ int munmap(caddr_t addr, int len); }
-12	AUE_NULL	STD	{ int linux_brk(l_ulong dsend); }
-13	AUE_NULL	STD	{ int linux_rt_sigaction(l_int sig, \
-				    l_sigaction_t *act, l_sigaction_t *oact, \
-				    l_size_t sigsetsize); }
-14	AUE_NULL	STD	{ int linux_rt_sigprocmask(l_int how, \
-				    l_sigset_t *mask, l_sigset_t *omask, \
-				    l_size_t sigsetsize); }
-15	AUE_NULL	STD	{ int linux_rt_sigreturn( \
-				    struct l_ucontext *ucp); }
-16	AUE_IOCTL	STD	{ int linux_ioctl(l_uint fd, l_uint cmd, \
-				    uintptr_t arg); }
-17	AUE_PREAD	STD	{ int linux_pread(l_uint fd, char *buf, \
-				    l_size_t nbyte, l_loff_t offset); }
-18	AUE_PWRITE	STD	{ int linux_pwrite(l_uint fd, char *buf, \
-				    l_size_t nbyte, l_loff_t offset); }
-19	AUE_READV	NOPROTO { int readv(int fd, struct iovec *iovp, \
-				    u_int iovcnt); }
-20	AUE_WRITEV	NOPROTO	{ int writev(int fd, struct iovec *iovp, \
-				    u_int iovcnt); }
-21	AUE_ACCESS	STD	{ int linux_access(char *path, l_int amode); }
-22	AUE_PIPE	STD	{ int linux_pipe(l_ulong *pipefds); }
-23	AUE_SELECT	STD	{ int linux_select(l_int nfds, \
-				    l_fd_set *readfds, l_fd_set *writefds, \
-				    l_fd_set *exceptfds, \
-				    struct l_timeval *timeout); }
-24	AUE_NULL	NOPROTO	{ int sched_yield(void); }
-25	AUE_NULL	STD	{ int linux_mremap(l_ulong addr, \
-				    l_ulong old_len, l_ulong new_len, \
-				    l_ulong flags, l_ulong new_addr); }
-26	AUE_MSYNC	STD	{ int linux_msync(l_ulong addr, \
-				    l_size_t len, l_int fl); }
-27	AUE_MINCORE	STD	{ int linux_mincore(l_ulong start, \
-				    l_size_t len, u_char *vec); }
-28	AUE_MADVISE	NOPROTO	{ int madvise(void *addr, size_t len, \
-				    int behav); }
-29	AUE_NULL	STD	{ int linux_shmget(l_key_t key, l_size_t size, \
-				    l_int shmflg); }
-30	AUE_NULL	STD	{ int linux_shmat(l_int shmid, char *shmaddr, \
-				    l_int shmflg); }
-31	AUE_NULL	STD	{ int linux_shmctl(l_int shmid, l_int cmd, \
-				    struct l_shmid_ds *buf); }
-32	AUE_DUP		NOPROTO	{ int dup(u_int fd); }
-33	AUE_DUP2	NOPROTO	{ int dup2(u_int from, u_int to); }
-34	AUE_NULL	STD	{ int linux_pause(void); }
-35	AUE_NULL	STD	{ int linux_nanosleep( \
-				    const struct l_timespec *rqtp, \
-				    struct l_timespec *rmtp); }
-36	AUE_GETITIMER	STD	{ int linux_getitimer(l_int which, \
-				    struct l_itimerval *itv); }
-37	AUE_NULL	STD	{ int linux_alarm(l_uint secs); }
-38	AUE_SETITIMER	STD	{ int linux_setitimer(l_int which, \
-				    struct l_itimerval *itv, \
-				    struct l_itimerval *oitv); }
-39	AUE_GETPID	STD	{ int linux_getpid(void); }
-40	AUE_SENDFILE	STD	{ int linux_sendfile(int out, int in, \
-				    l_long *offset, l_size_t count); }
-41	AUE_SOCKET	STD	{ int linux_socket(l_int domain, l_int type, \
-				    l_int protocol); }
-42	AUE_CONNECT	STD	{ int linux_connect(l_int s, l_uintptr_t name, \
-				    l_int namelen); }
-43	AUE_ACCEPT	STD	{ int linux_accept(l_int s, l_uintptr_t addr, \
-				    l_uintptr_t namelen); }
-44	AUE_SENDTO	STD	{ int linux_sendto(l_int s, l_uintptr_t msg, \
-				    l_int len, l_int flags, l_uintptr_t to, \
-				    l_int tolen); }
-45	AUE_RECVFROM	STD	{ int linux_recvfrom(l_int s, l_uintptr_t buf, \
-				    l_size_t len, l_int flags, l_uintptr_t from, \
-				    l_uintptr_t fromlen); }
-46	AUE_SENDMSG	STD	{ int linux_sendmsg(l_int s, l_uintptr_t msg, \
-				    l_int flags); }
-47	AUE_RECVMSG	STD	{ int linux_recvmsg(l_int s, l_uintptr_t msg, \
-				    l_int flags); }
-48	AUE_NULL	STD	{ int linux_shutdown(l_int s, l_int how); }
-49	AUE_BIND	STD	{ int linux_bind(l_int s, l_uintptr_t name, \
-				    l_int namelen); }
-50	AUE_LISTEN	STD	{ int linux_listen(l_int s, l_int backlog); }
-51	AUE_GETSOCKNAME	STD	{ int linux_getsockname(l_int s, \
-				    l_uintptr_t addr, l_uintptr_t namelen); }
-52	AUE_GETPEERNAME	STD	{ int linux_getpeername(l_int s, \
-				    l_uintptr_t addr, l_uintptr_t namelen); }
-53	AUE_SOCKETPAIR	STD	{ int linux_socketpair(l_int domain, \
-				    l_int type, l_int protocol, l_uintptr_t rsv); }
-54	AUE_SETSOCKOPT	STD	{ int linux_setsockopt(l_int s, l_int level, \
-				    l_int optname, l_uintptr_t optval, \
-				    l_int optlen); }
-55	AUE_GETSOCKOPT	STD	{ int linux_getsockopt(l_int s, l_int level, \
-				    l_int optname, l_uintptr_t optval, \
-				    l_uintptr_t optlen); }
-56	AUE_RFORK	STD	{ int linux_clone(l_int flags, void *stack, \
-				    void *parent_tidptr, void * child_tidptr, void *tls ); }
-57	AUE_FORK	STD	{ int linux_fork(void); }
-58	AUE_VFORK	STD	{ int linux_vfork(void); }
-59	AUE_EXECVE	STD	{ int linux_execve(char *path, char **argp, \
-				    char **envp); }
-60	AUE_EXIT	STD	{ void linux_exit(int rval); }
-61	AUE_WAIT4	STD	{ int linux_wait4(l_pid_t pid, \
-				    l_int *status, l_int options, \
-				    struct rusage *rusage); }
-62	AUE_KILL	STD	{ int linux_kill(l_int pid, l_int signum); }
-63	AUE_NULL	STD	{ int linux_newuname( \
-				    struct l_new_utsname *buf); }
-64	AUE_NULL	STD	{ int linux_semget(l_key_t key, \
-				    l_int nsems, l_int semflg); }
-65	AUE_NULL	STD	{ int linux_semop(l_int semid, \
-				    struct l_sembuf *tsops, l_uint nsops); }
-66	AUE_NULL	STD	{ int linux_semctl(l_int semid, \
-				    l_int semnum, l_int cmd, union l_semun arg); }
-67	AUE_NULL	STD	{ int linux_shmdt(char *shmaddr); }
-68	AUE_NULL	STD	{ int linux_msgget(l_key_t key, l_int msgflg); }
-69	AUE_NULL	STD	{ int linux_msgsnd(l_int msqid, \
-				    struct l_msgbuf *msgp, l_size_t msgsz, \
-				    l_int msgflg); }
-70	AUE_NULL	STD	{ int linux_msgrcv(l_int msqid, \
-				    struct l_msgbuf *msgp, l_size_t msgsz, \
-				    l_long msgtyp, l_int msgflg); }
-71	AUE_NULL	STD	{ int linux_msgctl(l_int msqid, l_int cmd, \
-				    struct l_msqid_ds *buf); }
-72	AUE_FCNTL	STD	{ int linux_fcntl(l_uint fd, l_uint cmd, \
-				    l_ulong arg); }
-73	AUE_FLOCK	NOPROTO	{ int flock(int fd, int how); }
-74	AUE_FSYNC	NOPROTO	{ int fsync(int fd); }
-75	AUE_NULL	STD	{ int linux_fdatasync(l_uint fd); }
-76	AUE_TRUNCATE	STD	{ int linux_truncate(char *path, \
-				    l_ulong length); }
-77	AUE_FTRUNCATE	STD	{ int linux_ftruncate(l_int fd, l_long length); }
-78	AUE_GETDIRENTRIES	STD { int linux_getdents(l_uint fd, void *dent, \
-				    l_uint count); }
-79	AUE_GETCWD	STD	{ int linux_getcwd(char *buf, \
-				    l_ulong bufsize); }
-80	AUE_CHDIR	STD	{ int linux_chdir(char *path); }
-81	AUE_FCHDIR	NOPROTO	{ int fchdir(int fd); }
-82	AUE_RENAME	STD	{ int linux_rename(char *from, char *to); }
-83	AUE_MKDIR	STD	{ int linux_mkdir(char *path, l_int mode); }
-84	AUE_RMDIR	STD	{ int linux_rmdir(char *path); }
-85	AUE_CREAT	STD	{ int linux_creat(char *path, \
-				    l_int mode); }
-86	AUE_LINK	STD	{ int linux_link(char *path, char *to); }
-87	AUE_UNLINK	STD	{ int linux_unlink(char *path); }
-88	AUE_SYMLINK	STD	{ int linux_symlink(char *path, char *to); }
-89	AUE_READLINK	STD	{ int linux_readlink(char *name, char *buf, \
-				    l_int count); }
-90	AUE_CHMOD	STD	{ int linux_chmod(char *path, \
-				    l_mode_t mode); }
-91	AUE_FCHMOD	NOPROTO	{ int fchmod(int fd, int mode); }
-92	AUE_LCHOWN	STD	{ int linux_chown(char *path, \
-				    l_uid_t uid, l_gid_t gid); }
-93	AUE_FCHOWN	NOPROTO	{ int fchown(int fd, int uid, int gid); }
-94	AUE_LCHOWN	STD	{ int linux_lchown(char *path, l_uid_t uid, \
-				    l_gid_t gid); }
-95	AUE_UMASK	NOPROTO	{ int umask(int newmask); }
-96	AUE_NULL	NOPROTO	{ int gettimeofday(struct l_timeval *tp, \
-				    struct timezone *tzp); }
-97	AUE_GETRLIMIT	STD	{ int linux_getrlimit(l_uint resource, \
-				    struct l_rlimit *rlim); }
-98	AUE_GETRUSAGE	NOPROTO	{ int getrusage(int who, struct rusage *rusage); }
-99	AUE_NULL	STD	{ int linux_sysinfo(struct l_sysinfo *info); }
-100	AUE_NULL	STD	{ int linux_times(struct l_times_argv *buf); }
-101	AUE_PTRACE	STD	{ int linux_ptrace(l_long req, l_long pid, \
-				    l_long addr, l_long data); }
-102	AUE_GETUID	STD	{ int linux_getuid(void); }
-103	AUE_NULL	STD	{ int linux_syslog(l_int type, char *buf, \
-				    l_int len); }
-104	AUE_GETGID	STD	{ int linux_getgid(void); }
-105	AUE_SETUID	NOPROTO	{ int setuid(uid_t uid); }
-106	AUE_SETGID	NOPROTO	{ int setgid(gid_t gid); }
-107	AUE_GETEUID	NOPROTO	{ int geteuid(void); }
-108	AUE_GETEGID	NOPROTO	{ int getegid(void); }
-109	AUE_SETPGRP	NOPROTO	{ int setpgid(int pid, int pgid); }
-110	AUE_GETPPID	STD	{ int linux_getppid(void); }
-111	AUE_GETPGRP	NOPROTO	{ int getpgrp(void); }
-112	AUE_SETSID	NOPROTO	{ int setsid(void); }
-113	AUE_SETREUID	NOPROTO	{ int setreuid(uid_t ruid, uid_t euid); }
-114	AUE_SETREGID	NOPROTO	{ int setregid(gid_t rgid, gid_t egid); }
-115	AUE_GETGROUPS	STD	{ int linux_getgroups(l_int gidsetsize, \
-				    l_gid_t *grouplist); }
-116	AUE_SETGROUPS	STD	{ int linux_setgroups(l_int gidsetsize, \
-				    l_gid_t *grouplist); }
-117	AUE_SETRESUID	NOPROTO	{ int setresuid(uid_t ruid, uid_t euid, \
-				    uid_t suid); }
-118	AUE_GETRESUID	NOPROTO	{ int getresuid(uid_t *ruid, uid_t *euid, \
-				    uid_t *suid); }
-119	AUE_SETRESGID	NOPROTO	{ int setresgid(gid_t rgid, gid_t egid, \
-				    gid_t sgid); }
-120	AUE_GETRESGID	NOPROTO	{ int getresgid(gid_t *rgid, gid_t *egid, \
-				    gid_t *sgid); }
-121	AUE_GETPGID	NOPROTO	{ int getpgid(int pid); }
-122	AUE_SETFSUID	STD	{ int linux_setfsuid(l_uid_t uid); }
-123	AUE_SETFSGID	STD	{ int linux_setfsgid(l_gid_t gid); }
-124	AUE_GETSID	STD	{ int linux_getsid(l_pid_t pid); }
-125	AUE_CAPGET	STD	{ int linux_capget(struct l_user_cap_header *hdrp, \
-				    struct l_user_cap_data *datap); }
-126	AUE_CAPSET	STD	{ int linux_capset(struct l_user_cap_header *hdrp, \
-				    struct l_user_cap_data *datap); }
-127	AUE_NULL	STD	{ int linux_rt_sigpending(l_sigset_t *set, \
-				    l_size_t sigsetsize); }
-128	AUE_NULL	STD	{ int linux_rt_sigtimedwait(l_sigset_t *mask, \
-				    l_siginfo_t *ptr, \
-				    struct l_timeval *timeout, \
-				    l_size_t sigsetsize); }
-129	AUE_NULL	STD	{ int linux_rt_sigqueueinfo(l_pid_t pid, l_int sig, \
-				    l_siginfo_t *info); }
-130	AUE_NULL	STD	{ int linux_rt_sigsuspend( \
-				    l_sigset_t *newset, \
-				    l_size_t sigsetsize); }
-131	AUE_NULL	STD	{ int linux_sigaltstack(l_stack_t *uss, \
-				    l_stack_t *uoss); }
-132	AUE_UTIME	STD	{ int linux_utime(char *fname, \
-				    struct l_utimbuf *times); }
-133	AUE_MKNOD	STD	{ int linux_mknod(char *path, l_int mode, \
-				    l_dev_t dev); }
-134	AUE_USELIB	UNIMPL	uselib
-135	AUE_PERSONALITY	STD	{ int linux_personality(l_uint per); }
-136	AUE_NULL	STD	{ int linux_ustat(l_dev_t dev, \
-				    struct l_ustat *ubuf); }
-137	AUE_STATFS	STD	{ int linux_statfs(char *path, \
-				    struct l_statfs_buf *buf); }
-138	AUE_FSTATFS	STD	{ int linux_fstatfs(l_uint fd, \
-				    struct l_statfs_buf *buf); }
-139	AUE_NULL	STD	{ int linux_sysfs(l_int option, \
-				    l_ulong arg1, l_ulong arg2); }
-140	AUE_GETPRIORITY	STD	{ int linux_getpriority(int which, int who); }
-141	AUE_SETPRIORITY	NOPROTO	{ int setpriority(int which, int who, \
-				    int prio); }
-142	AUE_SCHED_SETPARAM	STD	{ int linux_sched_setparam(l_pid_t pid, \
-				    struct sched_param *param); }
-143	AUE_SCHED_GETPARAM	STD	{ int linux_sched_getparam(l_pid_t pid, \
-				    struct sched_param *param); }
-144	AUE_SCHED_SETSCHEDULER	STD { int linux_sched_setscheduler( \
-				    l_pid_t pid, l_int policy, \
-				    struct sched_param *param); }
-145	AUE_SCHED_GETSCHEDULER	STD { int linux_sched_getscheduler( \
-				    l_pid_t pid); }
-146	AUE_SCHED_GET_PRIORITY_MAX	STD { int linux_sched_get_priority_max( \
-				    l_int policy); }
-147	AUE_SCHED_GET_PRIORITY_MIN	STD { int linux_sched_get_priority_min( \
-				    l_int policy); }
-148	AUE_SCHED_RR_GET_INTERVAL	STD { int linux_sched_rr_get_interval(l_pid_t pid, \
-				    struct l_timespec *interval); }
-149	AUE_MLOCK	NOPROTO	{ int mlock(const void *addr, size_t len); }
-150	AUE_MUNLOCK	NOPROTO	{ int munlock(const void *addr, size_t len); }
-151	AUE_MLOCKALL	NOPROTO	{ int mlockall(int how); }
-152	AUE_MUNLOCKALL	NOPROTO	{ int munlockall(void); }
-153	AUE_NULL	STD	{ int linux_vhangup(void); }
-154	AUE_NULL	UNIMPL	modify_ldt
-155	AUE_PIVOT_ROOT	STD	{ int linux_pivot_root(void); }
-156	AUE_SYSCTL	STD	{ int linux_sysctl( \
-				    struct l___sysctl_args *args); }
-157	AUE_PRCTL	STD	{ int linux_prctl(l_int option, l_uintptr_t arg2, \
-				    l_uintptr_t arg3, l_uintptr_t arg4, \
-				    l_uintptr_t arg5); }
-158	AUE_PRCTL	STD	{ int linux_arch_prctl(l_int code, l_ulong addr); }
-159	AUE_ADJTIME	STD	{ int linux_adjtimex(void); }
-160	AUE_SETRLIMIT	STD	{ int linux_setrlimit(l_uint resource, \
-				    struct l_rlimit *rlim); }
-161	AUE_CHROOT	NOPROTO	{ int chroot(char *path); }
-162	AUE_SYNC	NOPROTO	{ int sync(void); }
-163	AUE_ACCT	NOPROTO	{ int acct(char *path); }
-164	AUE_SETTIMEOFDAY	NOPROTO	{ int settimeofday(struct l_timeval *tv, struct timezone *tzp); }
-165	AUE_MOUNT	STD	{ int linux_mount(char *specialfile, \
-				    char *dir, char *filesystemtype, \
-				    l_ulong rwflag, void *data); }
-166	AUE_UMOUNT	STD	{ int linux_umount(char *path, l_int flags); }
-167	AUE_SWAPON	NOPROTO	{ int swapon(char *name); }
-168	AUE_SWAPOFF	STD	{ int linux_swapoff(void); }
-169	AUE_REBOOT	STD	{ int linux_reboot(l_int magic1, \
-				    l_int magic2, l_uint cmd, void *arg); }
-170	AUE_SYSCTL	STD	{ int linux_sethostname(char *hostname, \
-				    l_uint len); }
-171	AUE_SYSCTL	STD	{ int linux_setdomainname(char *name, \
-				    l_int len); }
-172	AUE_NULL	STD	{ int linux_iopl(l_uint level); }
-173	AUE_NULL	UNIMPL	ioperm
-174	AUE_NULL	STD	{ int linux_create_module(void); }
-175	AUE_NULL	STD	{ int linux_init_module(void); }
-176	AUE_NULL	STD	{ int linux_delete_module(void); }
-177	AUE_NULL	STD	{ int linux_get_kernel_syms(void); }
-178	AUE_NULL	STD	{ int linux_query_module(void); }
-179	AUE_QUOTACTL	STD	{ int linux_quotactl(void); }
-180	AUE_NULL	STD	{ int linux_nfsservctl(void); }
-181	AUE_GETPMSG	STD	{ int linux_getpmsg(void); }
-182	AUE_PUTPMSG	STD	{ int linux_putpmsg(void); }
-183	AUE_NULL	STD	{ int linux_afs_syscall(void); }
-184	AUE_NULL	STD	{ int linux_tuxcall(void); }
-185	AUE_NULL	STD	{ int linux_security(void); }
-186	AUE_NULL	STD	{ int linux_gettid(void); }
-187	AUE_NULL	UNIMPL	linux_readahead
-188	AUE_NULL	STD	{ int linux_setxattr(void); }
-189	AUE_NULL	STD	{ int linux_lsetxattr(void); }
-190	AUE_NULL	STD	{ int linux_fsetxattr(void); }
-191	AUE_NULL	STD	{ int linux_getxattr(void); }
-192	AUE_NULL	STD	{ int linux_lgetxattr(void); }
-193	AUE_NULL	STD	{ int linux_fgetxattr(void); }
-194	AUE_NULL	STD	{ int linux_listxattr(void); }
-195	AUE_NULL	STD	{ int linux_llistxattr(void); }
-196	AUE_NULL	STD	{ int linux_flistxattr(void); }
-197	AUE_NULL	STD	{ int linux_removexattr(void); }
-198	AUE_NULL	STD	{ int linux_lremovexattr(void); }
-199	AUE_NULL	STD	{ int linux_fremovexattr(void); }
-200	AUE_NULL	STD	{ int linux_tkill(int tid, int sig); }
-201	AUE_NULL	STD	{ int linux_time(l_time_t *tm); }
-202	AUE_NULL	STD	{ int linux_sys_futex(void *uaddr, int op, int val, \
-				    struct l_timespec *timeout, void *uaddr2, int val3); }
-203	AUE_NULL	STD	{ int linux_sched_setaffinity(l_pid_t pid, l_uint len, \
-				    l_ulong *user_mask_ptr); }
-204	AUE_NULL	STD	{ int linux_sched_getaffinity(l_pid_t pid, l_uint len, \
-				    l_ulong *user_mask_ptr); }
-205	AUE_NULL	STD	{ int linux_set_thread_area(void); }
-206	AUE_NULL	UNIMPL	linux_io_setup
-207	AUE_NULL	UNIMPL	linux_io_destroy
-208	AUE_NULL	UNIMPL	linux_io_getevents
-209	AUE_NULL	UNIMPL	inux_io_submit
-210	AUE_NULL	UNIMPL	linux_io_cancel
-211	AUE_NULL	UNIMPL	linux_get_thread_area
-212	AUE_NULL	STD	{ int linux_lookup_dcookie(void); }
-213	AUE_NULL	STD	{ int linux_epoll_create(l_int size); }
-214	AUE_NULL	STD	{ int linux_epoll_ctl_old(void); }
-215	AUE_NULL	STD	{ int linux_epoll_wait_old(void); }
-216	AUE_NULL	STD	{ int linux_remap_file_pages(void); }
-217	AUE_GETDIRENTRIES	STD { int linux_getdents64(l_uint fd, \
-				    void *dirent, l_uint count); }
-218	AUE_NULL	STD	{ int linux_set_tid_address(int *tidptr); }
-219	AUE_NULL	UNIMPL	restart_syscall
-220	AUE_NULL	STD	{ int linux_semtimedop(void); }
-221	AUE_NULL	STD	{ int linux_fadvise64(int fd, l_loff_t offset, \
-				    l_size_t len, int advice); }
-222	AUE_NULL	STD	{ int linux_timer_create(clockid_t clock_id, \
-				    struct sigevent *evp, l_timer_t *timerid); }
-223	AUE_NULL	STD	{ int linux_timer_settime(l_timer_t timerid, l_int flags, \
-				    const struct itimerspec *new, struct itimerspec *old); }
-224	AUE_NULL	STD	{ int linux_timer_gettime(l_timer_t timerid, struct itimerspec *setting); }
-225	AUE_NULL	STD	{ int linux_timer_getoverrun(l_timer_t timerid); }
-226	AUE_NULL	STD	{ int linux_timer_delete(l_timer_t timerid); }
-227	AUE_CLOCK_SETTIME	STD	{ int linux_clock_settime(clockid_t which, struct l_timespec *tp); }
-228	AUE_NULL	STD	{ int linux_clock_gettime(clockid_t which, struct l_timespec *tp); }
-229	AUE_NULL	STD	{ int linux_clock_getres(clockid_t which, struct l_timespec *tp); }
-230	AUE_NULL	STD	{ int linux_clock_nanosleep(clockid_t which, int flags, \
-				    struct l_timespec *rqtp, struct l_timespec *rmtp); }
-231	AUE_EXIT	STD	{ int linux_exit_group(int error_code); }
-232	AUE_NULL	STD	{ int linux_epoll_wait(l_int epfd, struct epoll_event *events, \
-					l_int maxevents, l_int timeout); }
-233	AUE_NULL	STD	{ int linux_epoll_ctl(l_int epfd, l_int op, l_int fd, \
-					struct epoll_event *event); }
-234	AUE_NULL	STD	{ int linux_tgkill(int tgid, int pid, int sig); }
-235	AUE_UTIMES	STD	{ int linux_utimes(char *fname, \
-				    struct l_timeval *tptr); }
-236	AUE_NULL	UNIMPL	vserver
-237	AUE_NULL	STD	{ int linux_mbind(void); }
-238	AUE_NULL	STD	{ int linux_set_mempolicy(void); }
-239	AUE_NULL	STD	{ int linux_get_mempolicy(void); }
-240	AUE_NULL	STD	{ int linux_mq_open(void); }
-241	AUE_NULL	STD	{ int linux_mq_unlink(void); }
-242	AUE_NULL	STD	{ int linux_mq_timedsend(void); }
-243	AUE_NULL	STD	{ int linux_mq_timedreceive(void); }
-244	AUE_NULL	STD	{ int linux_mq_notify(void); }
-245	AUE_NULL	STD	{ int linux_mq_getsetattr(void); }
-246	AUE_NULL	STD	{ int linux_kexec_load(void); }
-247	AUE_WAIT6	STD	{ int linux_waitid(int idtype, l_pid_t id, \
-				    l_siginfo_t *info, int options, \
-				    struct rusage *rusage); }
-248	AUE_NULL	STD	{ int linux_add_key(void); }
-249	AUE_NULL	STD	{ int linux_request_key(void); }
-250	AUE_NULL	STD	{ int linux_keyctl(void); }
-251	AUE_NULL	STD	{ int linux_ioprio_set(void); }
-252	AUE_NULL	STD	{ int linux_ioprio_get(void); }
-253	AUE_NULL	STD	{ int linux_inotify_init(void); }
-254	AUE_NULL	STD	{ int linux_inotify_add_watch(void); }
-255	AUE_NULL	STD	{ int linux_inotify_rm_watch(void); }
-256	AUE_NULL	STD	{ int linux_migrate_pages(void); }
-257	AUE_OPEN_RWTC	STD	{ int linux_openat(l_int dfd, const char *filename, \
-				    l_int flags, l_int mode); }
-258	AUE_MKDIRAT	STD	{ int linux_mkdirat(l_int dfd, const char *pathname, \
-				    l_int mode); }
-259	AUE_MKNODAT	STD	{ int linux_mknodat(l_int dfd, const char *filename, \
-				    l_int mode, l_uint dev); }
-260	AUE_FCHOWNAT	STD	{ int linux_fchownat(l_int dfd, const char *filename, \
-				    l_uid_t uid, l_gid_t gid, l_int flag); }
-261	AUE_FUTIMESAT	STD	{ int linux_futimesat(l_int dfd, char *filename, \
-				    struct l_timeval *utimes); }
-262	AUE_FSTATAT	STD	{ int linux_newfstatat(l_int dfd, char *pathname, \
-				    struct l_stat64 *statbuf, l_int flag); }
-263	AUE_UNLINKAT	STD	{ int linux_unlinkat(l_int dfd, const char *pathname, \
-				    l_int flag); }
-264	AUE_RENAMEAT	STD	{ int linux_renameat(l_int olddfd, const char *oldname, \
-				    l_int newdfd, const char *newname); }
-265	AUE_LINKAT	STD	{ int linux_linkat(l_int olddfd, const char *oldname, \
-				    l_int newdfd, const char *newname, l_int flag); }
-266	AUE_SYMLINKAT	STD	{ int linux_symlinkat(const char *oldname, l_int newdfd, \
-				    const char *newname); }
-267	AUE_READLINKAT	STD	{ int linux_readlinkat(l_int dfd, const char *path, \
-				    char *buf, l_int bufsiz); }
-268	AUE_FCHMODAT	STD	{ int linux_fchmodat(l_int dfd, const char *filename, \
-				    l_mode_t mode); }
-269	AUE_FACCESSAT	STD	{ int linux_faccessat(l_int dfd, const char *filename, \
-				    l_int amode); }
-270	AUE_SELECT	STD	{ int linux_pselect6(l_int nfds,			\
-				    l_fd_set *readfds, l_fd_set *writefds, l_fd_set *exceptfds,	\
-				    struct l_timespec *tsp, l_uintptr_t *sig); }
-271	AUE_POLL	STD	{ int linux_ppoll(struct pollfd *fds, uint32_t nfds,	\
-				    struct l_timespec *tsp, l_sigset_t *sset, l_size_t ssize); }
-272	AUE_NULL	STD	{ int linux_unshare(void); }
-273	AUE_NULL	STD	{ int linux_set_robust_list(struct linux_robust_list_head *head, \
-				    l_size_t len); }
-274	AUE_NULL	STD	{ int linux_get_robust_list(l_int pid, \
-				    struct linux_robust_list_head **head, l_size_t *len); }
-275	AUE_NULL	STD	{ int linux_splice(void); }
-276	AUE_NULL	STD	{ int linux_tee(void); }
-277	AUE_NULL	STD	{ int linux_sync_file_range(void); }
-278	AUE_NULL	STD	{ int linux_vmsplice(void); }
-279	AUE_NULL	STD	{ int linux_move_pages(void); }
-280	AUE_FUTIMESAT	STD	{ int linux_utimensat(l_int dfd, const char *pathname, \
-					const struct l_timespec *times, l_int flags); }
-281     AUE_NULL        STD     { int linux_epoll_pwait(l_int epfd, struct epoll_event *events, \
-                                        l_int maxevents, l_int timeout, l_sigset_t *mask); }
-282	AUE_NULL	STD	{ int linux_signalfd(void); }
-283	AUE_NULL	STD	{ int linux_timerfd(void); }
-284	AUE_NULL	STD	{ int linux_eventfd(l_uint initval); }
-285	AUE_NULL	STD	{ int linux_fallocate(l_int fd, l_int mode, \
-				    l_loff_t offset, l_loff_t len); }
-286	AUE_NULL	STD	{ int linux_timerfd_settime(void); }
-287	AUE_NULL	STD	{ int linux_timerfd_gettime(void); }
-288	AUE_ACCEPT	STD	{ int linux_accept4(l_int s, l_uintptr_t addr, \
-				    l_uintptr_t namelen, int flags); }
-289	AUE_NULL	STD	{ int linux_signalfd4(void); }
-290	AUE_NULL	STD	{ int linux_eventfd2(l_uint initval, l_int flags); }
-291	AUE_NULL	STD	{ int linux_epoll_create1(l_int flags); }
-292	AUE_NULL	STD	{ int linux_dup3(l_int oldfd,		\
-				    l_int newfd, l_int flags); }
-293	AUE_NULL	STD	{ int linux_pipe2(l_int *pipefds, l_int flags); }
-294	AUE_NULL	STD	{ int linux_inotify_init1(void); }
-295	AUE_NULL	STD	{ int linux_preadv(void); }
-296	AUE_NULL	STD	{ int linux_pwritev(void); }
-297	AUE_NULL	STD	{ int linux_rt_tsigqueueinfo(void); }
-298	AUE_NULL	STD	{ int linux_perf_event_open(void); }
-299	AUE_NULL	STD	{ int linux_recvmmsg(l_int s,			\
-				    struct l_mmsghdr *msg, l_uint vlen,		\
-				    l_uint flags, struct l_timespec *timeout); }
-300	AUE_NULL	STD	{ int linux_fanotify_init(void); }
-301	AUE_NULL	STD	{ int linux_fanotify_mark(void); }
-302	AUE_NULL	STD	{ int linux_prlimit64(l_pid_t pid, l_uint resource, \
-				    struct rlimit *new, struct rlimit *old); }
-303	AUE_NULL	STD	{ int linux_name_to_handle_at(void); }
-304	AUE_NULL	STD	{ int linux_open_by_handle_at(void); }
-305	AUE_NULL	STD	{ int linux_clock_adjtime(void); }
-306	AUE_SYNC	STD	{ int linux_syncfs(l_int fd); }
-307	AUE_NULL	STD	{ int linux_sendmmsg(l_int s,			\
-				    struct l_mmsghdr *msg, l_uint vlen,		\
-				    l_uint flags); }
-308	AUE_NULL	STD	{ int linux_setns(void); }
-309	AUE_NULL	STD	{ int linux_process_vm_readv(void); }
-310	AUE_NULL	STD	{ int linux_process_vm_writev(void); }
-311	AUE_NULL	STD	{ int linux_kcmp(void); }
-312	AUE_NULL	STD	{ int linux_finit_module(void); }
-; please, keep this line at the end.
-313	AUE_NULL	UNIMPL	nosys
--- a/support/syscall-gen/types+linux-x64.frag
+++ b/support/syscall-gen/types+linux-x64.frag
@@ -34,11 +34,12 @@
 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
@@ -103,6 +104,34 @@
 	usec	: uint64
 ;;
 
+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 */
@@ -113,6 +142,24 @@
 	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
@@ -131,6 +178,28 @@
 	__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
@@ -178,6 +247,45 @@
 	__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]
@@ -189,6 +297,12 @@
 	revents	: pollevt
 ;;
 
+type file_handle = struct
+	bytes	: uint
+	kind	: int
+	handle	: byte[...]
+;;
+
 type iovec = struct
 	base	: byte#
 	len	: uint64
@@ -213,6 +327,31 @@
 	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
@@ -234,6 +373,13 @@
 	effective	: uint32
 	permitted	: uint32
 	inheritable	: uint32
+;;
+
+type kexec_segment = struct
+	buf	: void#
+	bufsz	: size
+	mem	: void#
+	memsz	: size
 ;;
 
 /* clone options */