Commit e5c884f7 authored by Kai Backman's avatar Kai Backman

some progress on arm linux syscall interface. ztypes_linux_arm

still has problems with godefs.

R=rsc
APPROVED=rsc
DELTA=801  (134 added, 235 deleted, 432 changed)
OCL=35189
CL=35211
parent 8fd53f47
......@@ -21,7 +21,7 @@ chmod +x $GOBIN/quietgcc
# TODO(kaib): converge with normal build
#for i in lib9 libbio libmach libregexp cmd pkg cmd/ebnflint cmd/godoc cmd/gofmt
for i in lib9 libbio libmach libregexp cmd pkg/runtime pkg/sync
for i in lib9 libbio libmach libregexp cmd pkg/runtime pkg/sync pkg/once pkg/syscall
#for i in lib9 libbio libmach libregexp cmd pkg/runtime pkg/sync pkg/once pkg/malloc pkg/sort pkg/unicode
# pkg/hash
# pkg/math
......
......@@ -112,6 +112,14 @@ nacl_386)
mktypes="godefs -gsyscall -f-m32 -f-I$NACLSDK/include -f-I$NACL"
mkerrors="mkerrors_nacl.sh $NACLRUN/include/sys/errno.h"
;;
linux_arm)
ARM="/home/kaib/public/linux-2.6.28"
mksyscall="mksyscall.sh -l32"
mksysnum="mksysnum_linux.sh $ARM/arch/arm/include/asm/unistd.h"
// mktypes="godefs -gsyscall -carm-gcc -f-I$ARM/arch/arm/include -f-I$ARM/include -f-D__deprecated='' -f-I$ARM/arch/arm/mach-at91/include -f-DCONFIG_ARCH_AT91SAM9260 "
mktypes="godefs -gsyscall -carm-gcc"
mkerrors="mkerrors.sh"
;;
*)
echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
exit 1
......
......@@ -2,3 +2,56 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
// System calls for arm, Linux
//
#define SYS_BASE 0x00900000
#define SYS_syscall (SYS_BASE+113);
// TODO(kaib): handle error returns
// func Syscall(syscall uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
TEXT syscall·Syscall(SB),7,$0
BL sys·entersyscall(SB)
MOVW 4(SP), R7
MOVW 8(SP), R0
MOVW 12(SP), R1
MOVW 16(SP), R2
SWI $SYS_syscall
MOVW R0, 20(SP) // r1
MOVW R1, 24(SP) // r2
MOVW $0, 28(SP) // errno
BL sys·exitsyscall(SB)
RET
// func Syscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
// Actually Syscall5 but the rest of the code expects it to be named Syscall6.
TEXT syscall·Syscall6(SB),7,$0
BL sys·entersyscall(SB)
MOVW 4(SP), R7 // syscall entry
MOVW 8(SP), R0
MOVW 12(SP), R1
MOVW 16(SP), R2
MOVW 20(SP), R3
MOVW 24(SP), R4
MOVW 28(SP), R5
SWI $SYS_syscall
MOVW R0, 32(SP) // r1
MOVW R1, 36(SP) // r2
MOVW $0, 40(SP) // errno
BL sys·exitsyscall(SB)
RET
// func RawSyscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
TEXT syscall·RawSyscall(SB),7,$0
MOVW 4(SP), R7 // syscall entry
MOVW 8(SP), R0
MOVW 12(SP), R1
MOVW 16(SP), R2
SWI $SYS_syscall
MOVW R0, 20(SP) // r1
MOVW R1, 24(SP) // r2
MOVW $0, 28(SP) // errno
RET
......@@ -7,18 +7,27 @@
# and signal values (SIGALRM etc). They're unrelated except
# that we use the same method for finding them.
case "$GOARCH" in
arm)
GCC=arm-gcc
;;
*)
GCC=gcc
;;
esac
errors=$(
echo '#include <errno.h>' |
# The gcc command line prints all the #defines
# it encounters while processing the input
gcc -x c - -E -dM |
$GCC -x c - -E -dM |
egrep -h '#define E[A-Z0-9_]+ ' $files |
sed 's/#define //; s/ .*//'
)
signals=$(
echo '#include <sys/signal.h>' |
gcc -x c - -E -dM |
$GCC -x c - -E -dM |
egrep -h '#define SIG[^_]' |
egrep -v '#define (SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))' |
sed 's/#define //; s/ .*//'
......
......@@ -4,26 +4,12 @@
package syscall
import "unsafe"
func Getpagesize() int {
return 4096
}
func TimespecToNsec(ts Timespec) int64 {
return int64(ts.Sec)*1e9 + int64(ts.Nsec);
}
func NsecToTimespec(nsec int64) (ts Timespec) {
ts.Sec = int32(nsec / 1e9);
ts.Nsec = int32(nsec % 1e9);
return;
}
func TimevalToNsec(tv Timeval) int64 {
return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3;
}
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999; // round up to microsecond
tv.Sec = int32(nsec/1e9);
......@@ -31,108 +17,15 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
return;
}
// 64-bit file system and 32-bit uid calls
// (386 default is 32-bit file system and 16-bit uid).
//sys Chown(path string, uid int, gid int) (errno int) = SYS_CHOWN32
//sys Fchown(fd int, uid int, gid int) (errno int) = SYS_FCHOWN32
//sys Fstat(fd int, stat *Stat_t) (errno int) = SYS_FSTAT64
//sys Fstatfs(fd int, buf *Statfs_t) (errno int) = SYS_FSTATFS64
//sys Getegid() (egid int) = SYS_GETEGID32
//sys Geteuid() (euid int) = SYS_GETEUID32
//sys Getgid() (gid int) = SYS_GETGID32
//sys Getuid() (uid int) = SYS_GETUID32
//sys Lchown(path string, uid int, gid int) (errno int) = SYS_LCHOWN32
//sys Lstat(path string, stat *Stat_t) (errno int) = SYS_LSTAT64
//sys Setfsgid(gid int) (errno int) = SYS_SETFSGID32
//sys Setfsuid(uid int) (errno int) = SYS_SETFSUID32
//sys Setgid(gid int) (errno int) = SYS_SETGID32
//sys Setregid(rgid int, egid int) (errno int) = SYS_SETREGID32
//sys Setresgid(rgid int, egid int, sgid int) (errno int) = SYS_SETRESGID32
//sys Setresuid(ruid int, euid int, suid int) (errno int) = SYS_SETRESUID32
//sys Setreuid(ruid int, euid int) (errno int) = SYS_SETREUID32
//sys Stat(path string, stat *Stat_t) (errno int) = SYS_STAT64
//sys Statfs(path string, buf *Statfs_t) (errno int) = SYS_STATFS64
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, errno int)
//sys bind(s int, addr uintptr, addrlen _Socklen) (errno int)
//sys connect(s int, addr uintptr, addrlen _Socklen) (errno int)
//sys getgroups(n int, list *_Gid_t) (nn int, errno int) = SYS_GETGROUPS32
//sys setgroups(n int, list *_Gid_t) (errno int) = SYS_SETGROUPS32
//sys setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int)
//sys socket(domain int, typ int, proto int) (fd int, errno int)
//sys getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int)
//sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int)
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, errno int) = SYS__NEWSELECT
// Underlying system call writes to newoffset via pointer.
// Implemented in assembly to avoid allocation.
func Seek(fd int, offset int64, whence int) (newoffset int64, errno int)
// On x86 Linux, all the socket calls go through an extra indirection,
// I think because the 5-register system call interface can't handle
// the 6-argument calls like sendto and recvfrom. Instead the
// arguments to the underlying system call are the number below
// and a pointer to an array of uintptr. We hide the pointer in the
// socketcall assembly to avoid allocation on every system call.
const (
// see linux/net.h
_SOCKET = 1;
_BIND = 2;
_CONNECT = 3;
_LISTEN = 4;
_ACCEPT = 5;
_GETSOCKNAME = 6;
_GETPEERNAME = 7;
_SOCKETPAIR = 8;
_SEND = 9;
_RECV = 10;
_SENDTO = 11;
_RECVFROM = 12;
_SHUTDOWN = 13;
_SETSOCKOPT = 14;
_GETSOCKOPT = 15;
_SENDMSG = 16;
_RECVMSG = 17;
)
func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, errno int)
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, errno int) {
fd, errno = socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0);
return;
}
func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
var _ int;
_, errno = socketcall(_GETSOCKNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0);
return;
}
func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
var _ int;
_, errno = socketcall(_GETPEERNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0);
return;
}
func bind(s int, addr uintptr, addrlen _Socklen) (errno int) {
var _ int;
_, errno = socketcall(_BIND, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0);
return;
}
func connect(s int, addr uintptr, addrlen _Socklen) (errno int) {
var _ int;
_, errno = socketcall(_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0);
return;
}
func socket(domain int, typ int, proto int) (fd int, errno int) {
fd, errno = socketcall(_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0);
return;
}
func setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int) {
var _ int;
_, errno = socketcall(_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0);
return;
}
func Listen(s int, n int) (errno int) {
var _ int;
_, errno = socketcall(_LISTEN, uintptr(s), uintptr(n), 0, 0, 0, 0);
return;
}
......@@ -30,6 +30,7 @@ const (
ETXTBSY = 0x1a;
ENOMEM = 0xc;
EINPROGRESS = 0x73;
ENOTEMPTY = 0x27;
ENOTBLK = 0xf;
EPROTOTYPE = 0x5b;
ERESTART = 0x55;
......@@ -58,9 +59,7 @@ const (
EXFULL = 0x36;
EBADSLT = 0x39;
ENOTNAM = 0x76;
ELIBEXEC = 0x53;
ENOCSI = 0x32;
ENOTEMPTY = 0x27;
EADDRINUSE = 0x62;
ENETRESET = 0x66;
EISDIR = 0x15;
......@@ -74,7 +73,6 @@ const (
EKEYREJECTED = 0x81;
ELIBSCN = 0x51;
ENAVAIL = 0x77;
ENOSTR = 0x3c;
EOVERFLOW = 0x4b;
EUCLEAN = 0x75;
ENOMEDIUM = 0x7b;
......@@ -86,11 +84,13 @@ const (
ELIBACC = 0x4f;
E2BIG = 0x7;
EDEADLK = 0x23;
ENOTDIR = 0x14;
ECONNRESET = 0x68;
ENXIO = 0x6;
EBADRQC = 0x38;
ENAMETOOLONG = 0x24;
ESOCKTNOSUPPORT = 0x5e;
ELIBEXEC = 0x53;
EDOTDOT = 0x49;
EADDRNOTAVAIL = 0x63;
ETIME = 0x3e;
......@@ -105,6 +105,7 @@ const (
ENOEXEC = 0x8;
EMSGSIZE = 0x5a;
EDOM = 0x21;
ENOSTR = 0x3c;
EFBIG = 0x1b;
ESRCH = 0x3;
ECHRNG = 0x2c;
......@@ -139,7 +140,6 @@ const (
EHOSTUNREACH = 0x71;
ENOTUNIQ = 0x4c;
EOPNOTSUPP = 0x5f;
ENOTDIR = 0x14;
EMEDIUMTYPE = 0x7c;
SIGBUS = 0x7;
SIGTTIN = 0x15;
......@@ -150,11 +150,10 @@ const (
SIGSTKFLT = 0x10;
SIGUSR1 = 0xa;
SIGURG = 0x17;
SIGIO = 0x1d;
SIGQUIT = 0x3;
SIGCLD = 0x11;
SIGIO = 0x1d;
SIGABRT = 0x6;
SIGUSR2 = 0xc;
SIGTRAP = 0x5;
SIGVTALRM = 0x1a;
SIGPOLL = 0x1d;
......@@ -167,6 +166,7 @@ const (
SIGSYS = 0x1f;
SIGSTOP = 0x13;
SIGALRM = 0xe;
SIGUSR2 = 0xc;
SIGTSTP = 0x14;
SIGKILL = 0x9;
SIGXCPU = 0x18;
......@@ -204,6 +204,7 @@ var errors = [...]string {
26: "text file busy",
12: "cannot allocate memory",
115: "operation now in progress",
39: "directory not empty",
15: "block device required",
91: "protocol wrong type for socket",
85: "interrupted system call should be restarted",
......@@ -232,9 +233,7 @@ var errors = [...]string {
54: "exchange full",
57: "invalid slot",
118: "not a XENIX named type file",
83: "cannot exec a shared library directly",
50: "no CSI structure available",
39: "directory not empty",
98: "address already in use",
102: "network dropped connection on reset",
21: "is a directory",
......@@ -248,7 +247,6 @@ var errors = [...]string {
129: "key was rejected by service",
81: ".lib section in a.out corrupted",
119: "no XENIX semaphores available",
60: "device not a stream",
75: "value too large for defined data type",
117: "structure needs cleaning",
123: "no medium found",
......@@ -260,11 +258,13 @@ var errors = [...]string {
79: "can not access a needed shared library",
7: "argument list too long",
35: "resource deadlock avoided",
20: "not a directory",
104: "connection reset by peer",
6: "no such device or address",
56: "invalid request code",
36: "file name too long",
94: "socket type not supported",
83: "cannot exec a shared library directly",
73: "RFS specific error",
99: "cannot assign requested address",
62: "timer expired",
......@@ -279,6 +279,7 @@ var errors = [...]string {
8: "exec format error",
90: "message too long",
33: "numerical argument out of domain",
60: "device not a stream",
27: "file too large",
3: "no such process",
44: "channel number out of range",
......@@ -310,7 +311,6 @@ var errors = [...]string {
128: "key has been revoked",
113: "no route to host",
76: "name not unique on network",
20: "not a directory",
124: "wrong medium type",
}
// mksyscall.sh -l32 syscall_linux.go syscall_linux_386.go
// mksyscall.sh -l32 syscall_linux.go syscall_linux_arm.go
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
package syscall
......@@ -6,19 +6,19 @@ package syscall
import "unsafe"
func pipe(p *[2]_C_int) (errno int) {
r0, r1, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0);
_, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0);
errno = int(e1);
return;
}
func utimes(path string, times *[2]Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times)), 0);
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times)), 0);
errno = int(e1);
return;
}
func futimesat(dirfd int, path string, times *[2]Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times)));
_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times)));
errno = int(e1);
return;
}
......@@ -26,98 +26,98 @@ func futimesat(dirfd int, path string, times *[2]Timeval) (errno int) {
func Getcwd(buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_GETCWD, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0);
r0, _, e1 := Syscall(SYS_GETCWD, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0);
n = int(r0);
errno = int(e1);
return;
}
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, errno int) {
r0, r1, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0);
r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0);
wpid = int(r0);
errno = int(e1);
return;
}
func ptrace(request int, pid int, addr uintptr, data uintptr) (errno int) {
r0, r1, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0);
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0);
errno = int(e1);
return;
}
func Access(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1);
return;
}
func Acct(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1);
return;
}
func Adjtimex(buf *Timex) (state int, errno int) {
r0, r1, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0);
r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0);
state = int(r0);
errno = int(e1);
return;
}
func Chdir(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1);
return;
}
func Chmod(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1);
return;
}
func Chroot(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1);
return;
}
func Close(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0);
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0);
errno = int(e1);
return;
}
func Creat(path string, mode int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_CREAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
r0, _, e1 := Syscall(SYS_CREAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
fd = int(r0);
errno = int(e1);
return;
}
func Dup(oldfd int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0);
r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0);
fd = int(r0);
errno = int(e1);
return;
}
func Dup2(oldfd int, newfd int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0);
r0, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0);
fd = int(r0);
errno = int(e1);
return;
}
func EpollCreate(size int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0);
r0, _, e1 := Syscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0);
fd = int(r0);
errno = int(e1);
return;
}
func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (errno int) {
r0, r1, e1 := Syscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0);
_, _, e1 := Syscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0);
errno = int(e1);
return;
}
......@@ -125,74 +125,74 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (errno int) {
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, errno int) {
var _p0 *EpollEvent;
if len(events) > 0 { _p0 = &events[0]; }
r0, r1, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(unsafe.Pointer(_p0)), uintptr(len(events)), uintptr(msec), 0, 0);
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(unsafe.Pointer(_p0)), uintptr(len(events)), uintptr(msec), 0, 0);
n = int(r0);
errno = int(e1);
return;
}
func Exit(code int) () {
r0, r1, e1 := Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0);
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0);
return;
}
func Faccessat(dirfd int, path string, mode int, flags int) (errno int) {
r0, r1, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0);
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0);
errno = int(e1);
return;
}
func Fallocate(fd int, mode int, off int64, len int64) (errno int) {
r0, r1, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off >> 32), uintptr(len), uintptr(len >> 32));
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off >> 32), uintptr(len), uintptr(len >> 32));
errno = int(e1);
return;
}
func Fchdir(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0);
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0);
errno = int(e1);
return;
}
func Fchmod(fd int, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0);
_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0);
errno = int(e1);
return;
}
func Fchmodat(dirfd int, path string, mode int, flags int) (errno int) {
r0, r1, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0);
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0);
errno = int(e1);
return;
}
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (errno int) {
r0, r1, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid), uintptr(flags), 0);
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid), uintptr(flags), 0);
errno = int(e1);
return;
}
func fcntl(fd int, cmd int, arg int) (val int, errno int) {
r0, r1, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg));
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg));
val = int(r0);
errno = int(e1);
return;
}
func Fdatasync(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0);
_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0);
errno = int(e1);
return;
}
func Fsync(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0);
_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0);
errno = int(e1);
return;
}
func Ftruncate(fd int, length int64) (errno int) {
r0, r1, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length >> 32));
_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length >> 32));
errno = int(e1);
return;
}
......@@ -200,75 +200,63 @@ func Ftruncate(fd int, length int64) (errno int) {
func Getdents(fd int, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
return;
}
func Getpgid(pid int) (pgid int, errno int) {
r0, r1, e1 := Syscall(SYS_GETPGID, uintptr(pid), 0, 0);
r0, _, e1 := Syscall(SYS_GETPGID, uintptr(pid), 0, 0);
pgid = int(r0);
errno = int(e1);
return;
}
func Getpgrp() (pid int) {
r0, r1, e1 := Syscall(SYS_GETPGRP, 0, 0, 0);
r0, _, _ := Syscall(SYS_GETPGRP, 0, 0, 0);
pid = int(r0);
return;
}
func Getpid() (pid int) {
r0, r1, e1 := Syscall(SYS_GETPID, 0, 0, 0);
r0, _, _ := Syscall(SYS_GETPID, 0, 0, 0);
pid = int(r0);
return;
}
func Getppid() (ppid int) {
r0, r1, e1 := Syscall(SYS_GETPPID, 0, 0, 0);
r0, _, _ := Syscall(SYS_GETPPID, 0, 0, 0);
ppid = int(r0);
return;
}
func Getrlimit(resource int, rlim *Rlimit) (errno int) {
r0, r1, e1 := Syscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0);
_, _, e1 := Syscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0);
errno = int(e1);
return;
}
func Getrusage(who int, rusage *Rusage) (errno int) {
r0, r1, e1 := Syscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0);
_, _, e1 := Syscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0);
errno = int(e1);
return;
}
func Gettid() (tid int) {
r0, r1, e1 := Syscall(SYS_GETTID, 0, 0, 0);
r0, _, _ := Syscall(SYS_GETTID, 0, 0, 0);
tid = int(r0);
return;
}
func Gettimeofday(tv *Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0);
errno = int(e1);
return;
}
func Ioperm(from int, num int, on int) (errno int) {
r0, r1, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on));
errno = int(e1);
return;
}
func Iopl(level int) (errno int) {
r0, r1, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0);
_, _, e1 := Syscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0);
errno = int(e1);
return;
}
func Kill(pid int, sig int) (errno int) {
r0, r1, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(sig), 0);
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(sig), 0);
errno = int(e1);
return;
}
......@@ -276,70 +264,70 @@ func Kill(pid int, sig int) (errno int) {
func Klogctl(typ int, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
return;
}
func Link(oldpath string, newpath string) (errno int) {
r0, r1, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
errno = int(e1);
return;
}
func Mkdir(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1);
return;
}
func Mkdirat(dirfd int, path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode));
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode));
errno = int(e1);
return;
}
func Mknod(path string, mode int, dev int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev));
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev));
errno = int(e1);
return;
}
func Mknodat(dirfd int, path string, mode int, dev int) (errno int) {
r0, r1, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev), 0, 0);
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev), 0, 0);
errno = int(e1);
return;
}
func Nanosleep(time *Timespec, leftover *Timespec) (errno int) {
r0, r1, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0);
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0);
errno = int(e1);
return;
}
func Open(path string, mode int, perm int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm));
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm));
fd = int(r0);
errno = int(e1);
return;
}
func Openat(dirfd int, path string, flags int, mode int) (fd int, errno int) {
r0, r1, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), uintptr(mode), 0, 0);
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), uintptr(mode), 0, 0);
fd = int(r0);
errno = int(e1);
return;
}
func Pause() (errno int) {
r0, r1, e1 := Syscall(SYS_PAUSE, 0, 0, 0);
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0);
errno = int(e1);
return;
}
func PivotRoot(newroot string, putold string) (errno int) {
r0, r1, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(StringBytePtr(newroot))), uintptr(unsafe.Pointer(StringBytePtr(putold))), 0);
_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(StringBytePtr(newroot))), uintptr(unsafe.Pointer(StringBytePtr(putold))), 0);
errno = int(e1);
return;
}
......@@ -347,7 +335,7 @@ func PivotRoot(newroot string, putold string) (errno int) {
func Pread(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0);
r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0);
n = int(r0);
errno = int(e1);
return;
......@@ -356,7 +344,7 @@ func Pread(fd int, p []byte, offset int64) (n int, errno int) {
func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0);
r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0);
n = int(r0);
errno = int(e1);
return;
......@@ -365,7 +353,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
func Read(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
return;
......@@ -374,26 +362,26 @@ func Read(fd int, p []byte) (n int, errno int) {
func Readlink(path string, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
return;
}
func Rename(oldpath string, newpath string) (errno int) {
r0, r1, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
errno = int(e1);
return;
}
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (errno int) {
r0, r1, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(newdirfd), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0, 0);
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(newdirfd), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0, 0);
errno = int(e1);
return;
}
func Rmdir(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1);
return;
}
......@@ -401,7 +389,7 @@ func Rmdir(path string) (errno int) {
func Setdomainname(p []byte) (errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
errno = int(e1);
return;
}
......@@ -409,140 +397,134 @@ func Setdomainname(p []byte) (errno int) {
func Sethostname(p []byte) (errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_SETHOSTNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
errno = int(e1);
return;
}
func Setpgid(pid int, pgid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0);
_, _, e1 := Syscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0);
errno = int(e1);
return;
}
func Setrlimit(resource int, rlim *Rlimit) (errno int) {
r0, r1, e1 := Syscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0);
_, _, e1 := Syscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0);
errno = int(e1);
return;
}
func Setsid() (pid int) {
r0, r1, e1 := Syscall(SYS_SETSID, 0, 0, 0);
r0, _, _ := Syscall(SYS_SETSID, 0, 0, 0);
pid = int(r0);
return;
}
func Settimeofday(tv *Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0);
_, _, e1 := Syscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0);
errno = int(e1);
return;
}
func Setuid(uid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETUID, uintptr(uid), 0, 0);
_, _, e1 := Syscall(SYS_SETUID, uintptr(uid), 0, 0);
errno = int(e1);
return;
}
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, errno int) {
r0, r1, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags));
r0, r1, _ := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags));
n = int64(int64(r1)<<32 | int64(r0));
return;
}
func Symlink(oldpath string, newpath string) (errno int) {
r0, r1, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
errno = int(e1);
return;
}
func Sync() () {
r0, r1, e1 := Syscall(SYS_SYNC, 0, 0, 0);
return;
}
func SyncFileRange(fd int, off int64, n int64, flags int) (errno int) {
r0, r1, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off >> 32), uintptr(n), uintptr(n >> 32), uintptr(flags));
errno = int(e1);
Syscall(SYS_SYNC, 0, 0, 0);
return;
}
func Sysinfo(info *Sysinfo_t) (errno int) {
r0, r1, e1 := Syscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0);
_, _, e1 := Syscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0);
errno = int(e1);
return;
}
func Tee(rfd int, wfd int, len int, flags int) (n int64, errno int) {
r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0);
r0, r1, _ := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0);
n = int64(int64(r1)<<32 | int64(r0));
return;
}
func Tgkill(tgid int, tid int, sig int) (errno int) {
r0, r1, e1 := Syscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig));
_, _, e1 := Syscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig));
errno = int(e1);
return;
}
func Time(t *Time_t) (tt Time_t, errno int) {
r0, r1, e1 := Syscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0);
r0, _, e1 := Syscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0);
tt = Time_t(r0);
errno = int(e1);
return;
}
func Times(tms *Tms) (ticks uintptr, errno int) {
r0, r1, e1 := Syscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0);
r0, _, e1 := Syscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0);
ticks = uintptr(r0);
errno = int(e1);
return;
}
func Truncate(path string, length int64) (errno int) {
r0, r1, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length), uintptr(length >> 32));
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length), uintptr(length >> 32));
errno = int(e1);
return;
}
func Umask(mask int) (oldmask int) {
r0, r1, e1 := Syscall(SYS_UMASK, uintptr(mask), 0, 0);
r0, _, _ := Syscall(SYS_UMASK, uintptr(mask), 0, 0);
oldmask = int(r0);
return;
}
func Uname(buf *Utsname) (errno int) {
r0, r1, e1 := Syscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0);
_, _, e1 := Syscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0);
errno = int(e1);
return;
}
func Unlink(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1);
return;
}
func Unlinkat(dirfd int, path string) (errno int) {
r0, r1, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), 0);
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), 0);
errno = int(e1);
return;
}
func Unshare(flags int) (errno int) {
r0, r1, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0);
_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0);
errno = int(e1);
return;
}
func Ustat(dev int, ubuf *Ustat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0);
_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0);
errno = int(e1);
return;
}
func Utime(path string, buf *Utimbuf) (errno int) {
r0, r1, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0);
_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0);
errno = int(e1);
return;
}
......@@ -550,161 +532,91 @@ func Utime(path string, buf *Utimbuf) (errno int) {
func Write(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
return;
}
func exitThread(code int) (errno int) {
r0, r1, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0);
_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0);
errno = int(e1);
return;
}
func read(fd int, p *byte, np int) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np));
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np));
n = int(r0);
errno = int(e1);
return;
}
func write(fd int, p *byte, np int) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np));
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np));
n = int(r0);
errno = int(e1);
return;
}
func Chown(path string, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_CHOWN32, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid));
errno = int(e1);
return;
}
func Fchown(fd int, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid));
errno = int(e1);
return;
}
func Fstat(fd int, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1);
return;
}
func Fstatfs(fd int, buf *Statfs_t) (errno int) {
r0, r1, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0);
errno = int(e1);
return;
}
func Getegid() (egid int) {
r0, r1, e1 := Syscall(SYS_GETEGID32, 0, 0, 0);
egid = int(r0);
return;
}
func Geteuid() (euid int) {
r0, r1, e1 := Syscall(SYS_GETEUID32, 0, 0, 0);
euid = int(r0);
return;
}
func Getgid() (gid int) {
r0, r1, e1 := Syscall(SYS_GETGID32, 0, 0, 0);
gid = int(r0);
return;
}
func Getuid() (uid int) {
r0, r1, e1 := Syscall(SYS_GETUID32, 0, 0, 0);
uid = int(r0);
return;
}
func Lchown(path string, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid));
errno = int(e1);
return;
}
func Lstat(path string, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1);
return;
}
func Setfsgid(gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0);
errno = int(e1);
return;
}
func Setfsuid(uid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0);
errno = int(e1);
return;
}
func Setgid(gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETGID32, uintptr(gid), 0, 0);
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, errno int) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)));
fd = int(r0);
errno = int(e1);
return;
}
func Setregid(rgid int, egid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0);
func bind(s int, addr uintptr, addrlen _Socklen) (errno int) {
_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen));
errno = int(e1);
return;
}
func Setresgid(rgid int, egid int, sgid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid));
func connect(s int, addr uintptr, addrlen _Socklen) (errno int) {
_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen));
errno = int(e1);
return;
}
func Setresuid(ruid int, euid int, suid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid));
func getgroups(n int, list *_Gid_t) (nn int, errno int) {
r0, _, e1 := Syscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0);
nn = int(r0);
errno = int(e1);
return;
}
func Setreuid(ruid int, euid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0);
func setgroups(n int, list *_Gid_t) (errno int) {
_, _, e1 := Syscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0);
errno = int(e1);
return;
}
func Stat(path string, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
func setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int) {
_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0);
errno = int(e1);
return;
}
func Statfs(path string, buf *Statfs_t) (errno int) {
r0, r1, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0);
func socket(domain int, typ int, proto int) (fd int, errno int) {
r0, _, e1 := Syscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto));
fd = int(r0);
errno = int(e1);
return;
}
func getgroups(n int, list *_Gid_t) (nn int, errno int) {
r0, r1, e1 := Syscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0);
nn = int(r0);
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
_, _, e1 := Syscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)));
errno = int(e1);
return;
}
func setgroups(n int, list *_Gid_t) (errno int) {
r0, r1, e1 := Syscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0);
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
_, _, e1 := Syscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)));
errno = int(e1);
return;
}
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, errno int) {
r0, r1, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0);
r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0);
n = int(r0);
errno = int(e1);
return;
......
// mksysnum_linux.sh /usr/include/asm/unistd_32.h
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
// hand generated
package syscall
const(
SYS_RESTART_SYSCALL = 0;
SYS_EXIT = 1;
SYS_FORK = 2;
SYS_READ = 3;
SYS_WRITE = 4;
SYS_OPEN = 5;
SYS_CLOSE = 6;
SYS_WAITPID = 7;
SYS_CREAT = 8;
SYS_LINK = 9;
SYS_UNLINK = 10;
SYS_EXECVE = 11;
SYS_CHDIR = 12;
SYS_TIME = 13;
SYS_MKNOD = 14;
SYS_CHMOD = 15;
SYS_LCHOWN = 16;
SYS_BREAK = 17;
SYS_OLDSTAT = 18;
SYS_LSEEK = 19;
SYS_GETPID = 20;
SYS_MOUNT = 21;
SYS_UMOUNT = 22;
SYS_SETUID = 23;
SYS_GETUID = 24;
SYS_STIME = 25;
SYS_PTRACE = 26;
SYS_ALARM = 27;
SYS_OLDFSTAT = 28;
SYS_PAUSE = 29;
SYS_UTIME = 30;
SYS_STTY = 31;
SYS_GTTY = 32;
SYS_ACCESS = 33;
SYS_NICE = 34;
SYS_FTIME = 35;
SYS_SYNC = 36;
SYS_KILL = 37;
SYS_RENAME = 38;
SYS_MKDIR = 39;
SYS_RMDIR = 40;
SYS_DUP = 41;
SYS_PIPE = 42;
SYS_TIMES = 43;
SYS_PROF = 44;
SYS_BRK = 45;
SYS_SETGID = 46;
SYS_GETGID = 47;
SYS_SIGNAL = 48;
SYS_GETEUID = 49;
SYS_GETEGID = 50;
SYS_ACCT = 51;
SYS_UMOUNT2 = 52;
SYS_LOCK = 53;
SYS_IOCTL = 54;
SYS_FCNTL = 55;
SYS_MPX = 56;
SYS_SETPGID = 57;
SYS_ULIMIT = 58;
SYS_OLDOLDUNAME = 59;
SYS_UMASK = 60;
SYS_CHROOT = 61;
SYS_USTAT = 62;
SYS_DUP2 = 63;
SYS_GETPPID = 64;
SYS_GETPGRP = 65;
SYS_SETSID = 66;
SYS_SIGACTION = 67;
SYS_SGETMASK = 68;
SYS_SSETMASK = 69;
SYS_SETREUID = 70;
SYS_SETREGID = 71;
SYS_SIGSUSPEND = 72;
SYS_SIGPENDING = 73;
SYS_SETHOSTNAME = 74;
SYS_SETRLIMIT = 75;
SYS_GETRLIMIT = 76;
SYS_GETRUSAGE = 77;
SYS_GETTIMEOFDAY = 78;
SYS_SETTIMEOFDAY = 79;
SYS_GETGROUPS = 80;
SYS_SETGROUPS = 81;
SYS_SELECT = 82;
SYS_SYMLINK = 83;
SYS_OLDLSTAT = 84;
SYS_READLINK = 85;
SYS_USELIB = 86;
SYS_SWAPON = 87;
SYS_REBOOT = 88;
SYS_READDIR = 89;
SYS_MMAP = 90;
SYS_MUNMAP = 91;
SYS_TRUNCATE = 92;
SYS_FTRUNCATE = 93;
SYS_FCHMOD = 94;
SYS_FCHOWN = 95;
SYS_GETPRIORITY = 96;
SYS_SETPRIORITY = 97;
SYS_PROFIL = 98;
SYS_STATFS = 99;
SYS_FSTATFS = 100;
SYS_IOPERM = 101;
SYS_SOCKETCALL = 102;
SYS_SYSLOG = 103;
SYS_SETITIMER = 104;
SYS_GETITIMER = 105;
SYS_STAT = 106;
SYS_LSTAT = 107;
SYS_FSTAT = 108;
SYS_OLDUNAME = 109;
SYS_IOPL = 110;
SYS_VHANGUP = 111;
SYS_IDLE = 112;
SYS_VM86OLD = 113;
SYS_WAIT4 = 114;
SYS_SWAPOFF = 115;
SYS_SYSINFO = 116;
SYS_IPC = 117;
SYS_FSYNC = 118;
SYS_SIGRETURN = 119;
SYS_CLONE = 120;
SYS_SETDOMAINNAME = 121;
SYS_UNAME = 122;
SYS_MODIFY_LDT = 123;
SYS_ADJTIMEX = 124;
SYS_MPROTECT = 125;
SYS_SIGPROCMASK = 126;
SYS_CREATE_MODULE = 127;
SYS_INIT_MODULE = 128;
SYS_DELETE_MODULE = 129;
SYS_GET_KERNEL_SYMS = 130;
SYS_QUOTACTL = 131;
SYS_GETPGID = 132;
SYS_FCHDIR = 133;
SYS_BDFLUSH = 134;
SYS_SYSFS = 135;
SYS_PERSONALITY = 136;
SYS_AFS_SYSCALL = 137;
SYS_SETFSUID = 138;
SYS_SETFSGID = 139;
SYS__LLSEEK = 140;
SYS_GETDENTS = 141;
SYS__NEWSELECT = 142;
SYS_FLOCK = 143;
SYS_MSYNC = 144;
SYS_READV = 145;
SYS_WRITEV = 146;
SYS_GETSID = 147;
SYS_FDATASYNC = 148;
SYS__SYSCTL = 149;
SYS_MLOCK = 150;
SYS_MUNLOCK = 151;
SYS_MLOCKALL = 152;
SYS_MUNLOCKALL = 153;
SYS_SCHED_SETPARAM = 154;
SYS_SCHED_GETPARAM = 155;
SYS_SCHED_SETSCHEDULER = 156;
SYS_SCHED_GETSCHEDULER = 157;
SYS_SCHED_YIELD = 158;
SYS_SCHED_GET_PRIORITY_MAX = 159;
SYS_SCHED_GET_PRIORITY_MIN = 160;
SYS_SCHED_RR_GET_INTERVAL = 161;
SYS_NANOSLEEP = 162;
SYS_MREMAP = 163;
SYS_SETRESUID = 164;
SYS_GETRESUID = 165;
SYS_VM86 = 166;
SYS_QUERY_MODULE = 167;
SYS_POLL = 168;
SYS_NFSSERVCTL = 169;
SYS_SETRESGID = 170;
SYS_GETRESGID = 171;
SYS_PRCTL = 172;
SYS_RT_SIGRETURN = 173;
SYS_RT_SIGACTION = 174;
SYS_RT_SIGPROCMASK = 175;
SYS_RT_SIGPENDING = 176;
SYS_RT_SIGTIMEDWAIT = 177;
SYS_RT_SIGQUEUEINFO = 178;
SYS_RT_SIGSUSPEND = 179;
SYS_PREAD64 = 180;
SYS_PWRITE64 = 181;
SYS_CHOWN = 182;
SYS_GETCWD = 183;
SYS_CAPGET = 184;
SYS_CAPSET = 185;
SYS_SIGALTSTACK = 186;
SYS_SENDFILE = 187;
SYS_GETPMSG = 188;
SYS_PUTPMSG = 189;
SYS_VFORK = 190;
SYS_UGETRLIMIT = 191;
SYS_MMAP2 = 192;
SYS_TRUNCATE64 = 193;
SYS_FTRUNCATE64 = 194;
SYS_STAT64 = 195;
SYS_LSTAT64 = 196;
SYS_FSTAT64 = 197;
SYS_LCHOWN32 = 198;
SYS_GETUID32 = 199;
SYS_GETGID32 = 200;
SYS_GETEUID32 = 201;
SYS_GETEGID32 = 202;
SYS_SETREUID32 = 203;
SYS_SETREGID32 = 204;
SYS_GETGROUPS32 = 205;
SYS_SETGROUPS32 = 206;
SYS_FCHOWN32 = 207;
SYS_SETRESUID32 = 208;
SYS_GETRESUID32 = 209;
SYS_SETRESGID32 = 210;
SYS_GETRESGID32 = 211;
SYS_CHOWN32 = 212;
SYS_SETUID32 = 213;
SYS_SETGID32 = 214;
SYS_SETFSUID32 = 215;
SYS_SETFSGID32 = 216;
SYS_PIVOT_ROOT = 217;
SYS_MINCORE = 218;
SYS_MADVISE = 219;
SYS_MADVISE1 = 219;
SYS_GETDENTS64 = 220;
SYS_FCNTL64 = 221;
SYS_GETTID = 224;
SYS_READAHEAD = 225;
SYS_SETXATTR = 226;
SYS_LSETXATTR = 227;
SYS_FSETXATTR = 228;
SYS_GETXATTR = 229;
SYS_LGETXATTR = 230;
SYS_FGETXATTR = 231;
SYS_LISTXATTR = 232;
SYS_LLISTXATTR = 233;
SYS_FLISTXATTR = 234;
SYS_REMOVEXATTR = 235;
SYS_LREMOVEXATTR = 236;
SYS_FREMOVEXATTR = 237;
SYS_TKILL = 238;
SYS_SENDFILE64 = 239;
SYS_FUTEX = 240;
SYS_SCHED_SETAFFINITY = 241;
SYS_SCHED_GETAFFINITY = 242;
SYS_SET_THREAD_AREA = 243;
SYS_GET_THREAD_AREA = 244;
SYS_IO_SETUP = 245;
SYS_IO_DESTROY = 246;
SYS_IO_GETEVENTS = 247;
SYS_IO_SUBMIT = 248;
SYS_IO_CANCEL = 249;
SYS_FADVISE64 = 250;
SYS_EXIT_GROUP = 252;
SYS_LOOKUP_DCOOKIE = 253;
SYS_EPOLL_CREATE = 254;
SYS_EPOLL_CTL = 255;
SYS_EPOLL_WAIT = 256;
SYS_REMAP_FILE_PAGES = 257;
SYS_SET_TID_ADDRESS = 258;
SYS_TIMER_CREATE = 259;
SYS_STATFS64 = 268;
SYS_FSTATFS64 = 269;
SYS_TGKILL = 270;
SYS_UTIMES = 271;
SYS_FADVISE64_64 = 272;
SYS_VSERVER = 273;
SYS_MBIND = 274;
SYS_GET_MEMPOLICY = 275;
SYS_SET_MEMPOLICY = 276;
SYS_MQ_OPEN = 277;
SYS_KEXEC_LOAD = 283;
SYS_WAITID = 284;
SYS_ADD_KEY = 286;
SYS_REQUEST_KEY = 287;
SYS_KEYCTL = 288;
SYS_IOPRIO_SET = 289;
SYS_IOPRIO_GET = 290;
SYS_INOTIFY_INIT = 291;
SYS_INOTIFY_ADD_WATCH = 292;
SYS_INOTIFY_RM_WATCH = 293;
SYS_MIGRATE_PAGES = 294;
SYS_OPENAT = 295;
SYS_MKDIRAT = 296;
SYS_MKNODAT = 297;
SYS_FCHOWNAT = 298;
SYS_FUTIMESAT = 299;
SYS_FSTATAT64 = 300;
SYS_UNLINKAT = 301;
SYS_RENAMEAT = 302;
SYS_LINKAT = 303;
SYS_SYMLINKAT = 304;
SYS_READLINKAT = 305;
SYS_FCHMODAT = 306;
SYS_FACCESSAT = 307;
SYS_PSELECT6 = 308;
SYS_PPOLL = 309;
SYS_UNSHARE = 310;
SYS_SET_ROBUST_LIST = 311;
SYS_GET_ROBUST_LIST = 312;
SYS_SPLICE = 313;
SYS_SYNC_FILE_RANGE = 314;
SYS_TEE = 315;
SYS_VMSPLICE = 316;
SYS_MOVE_PAGES = 317;
SYS_GETCPU = 318;
SYS_EPOLL_PWAIT = 319;
SYS_UTIMENSAT = 320;
SYS_SIGNALFD = 321;
SYS_TIMERFD = 322;
SYS_EVENTFD = 323;
SYS_FALLOCATE = 324;
SYS_SYSCALL_BASE = 0x900000;
// for thumb and eabi
//SYS_SYSCALL_BASE = 0;
SYS_RESTART_SYSCALL = (SYS_SYSCALL_BASE+ 0);
SYS_EXIT = (SYS_SYSCALL_BASE+ 1);
SYS_FORK = (SYS_SYSCALL_BASE+ 2);
SYS_READ = (SYS_SYSCALL_BASE+ 3);
SYS_WRITE = (SYS_SYSCALL_BASE+ 4);
SYS_OPEN = (SYS_SYSCALL_BASE+ 5);
SYS_CLOSE = (SYS_SYSCALL_BASE+ 6);
SYS_CREAT = (SYS_SYSCALL_BASE+ 8);
SYS_LINK = (SYS_SYSCALL_BASE+ 9);
SYS_UNLINK = (SYS_SYSCALL_BASE+ 10);
SYS_EXECVE = (SYS_SYSCALL_BASE+ 11);
SYS_CHDIR = (SYS_SYSCALL_BASE+ 12);
SYS_TIME = (SYS_SYSCALL_BASE+ 13);
SYS_MKNOD = (SYS_SYSCALL_BASE+ 14);
SYS_CHMOD = (SYS_SYSCALL_BASE+ 15);
SYS_LCHOWN = (SYS_SYSCALL_BASE+ 16);
SYS_LSEEK = (SYS_SYSCALL_BASE+ 19);
SYS_GETPID = (SYS_SYSCALL_BASE+ 20);
SYS_MOUNT = (SYS_SYSCALL_BASE+ 21);
SYS_UMOUNT = (SYS_SYSCALL_BASE+ 22);
SYS_SETUID = (SYS_SYSCALL_BASE+ 23);
SYS_GETUID = (SYS_SYSCALL_BASE+ 24);
SYS_STIME = (SYS_SYSCALL_BASE+ 25);
SYS_PTRACE = (SYS_SYSCALL_BASE+ 26);
SYS_ALARM = (SYS_SYSCALL_BASE+ 27);
SYS_PAUSE = (SYS_SYSCALL_BASE+ 29);
SYS_UTIME = (SYS_SYSCALL_BASE+ 30);
SYS_ACCESS = (SYS_SYSCALL_BASE+ 33);
SYS_NICE = (SYS_SYSCALL_BASE+ 34);
SYS_SYNC = (SYS_SYSCALL_BASE+ 36);
SYS_KILL = (SYS_SYSCALL_BASE+ 37);
SYS_RENAME = (SYS_SYSCALL_BASE+ 38);
SYS_MKDIR = (SYS_SYSCALL_BASE+ 39);
SYS_RMDIR = (SYS_SYSCALL_BASE+ 40);
SYS_DUP = (SYS_SYSCALL_BASE+ 41);
SYS_PIPE = (SYS_SYSCALL_BASE+ 42);
SYS_TIMES = (SYS_SYSCALL_BASE+ 43);
SYS_BRK = (SYS_SYSCALL_BASE+ 45);
SYS_SETGID = (SYS_SYSCALL_BASE+ 46);
SYS_GETGID = (SYS_SYSCALL_BASE+ 47);
SYS_GETEUID = (SYS_SYSCALL_BASE+ 49);
SYS_GETEGID = (SYS_SYSCALL_BASE+ 50);
SYS_ACCT = (SYS_SYSCALL_BASE+ 51);
SYS_UMOUNT2 = (SYS_SYSCALL_BASE+ 52);
SYS_IOCTL = (SYS_SYSCALL_BASE+ 54);
SYS_FCNTL = (SYS_SYSCALL_BASE+ 55);
SYS_SETPGID = (SYS_SYSCALL_BASE+ 57);
SYS_UMASK = (SYS_SYSCALL_BASE+ 60);
SYS_CHROOT = (SYS_SYSCALL_BASE+ 61);
SYS_USTAT = (SYS_SYSCALL_BASE+ 62);
SYS_DUP2 = (SYS_SYSCALL_BASE+ 63);
SYS_GETPPID = (SYS_SYSCALL_BASE+ 64);
SYS_GETPGRP = (SYS_SYSCALL_BASE+ 65);
SYS_SETSID = (SYS_SYSCALL_BASE+ 66);
SYS_SIGACTION = (SYS_SYSCALL_BASE+ 67);
SYS_SETREUID = (SYS_SYSCALL_BASE+ 70);
SYS_SETREGID = (SYS_SYSCALL_BASE+ 71);
SYS_SIGSUSPEND = (SYS_SYSCALL_BASE+ 72);
SYS_SIGPENDING = (SYS_SYSCALL_BASE+ 73);
SYS_SETHOSTNAME = (SYS_SYSCALL_BASE+ 74);
SYS_SETRLIMIT = (SYS_SYSCALL_BASE+ 75);
SYS_GETRLIMIT = (SYS_SYSCALL_BASE+ 76);
SYS_GETRUSAGE = (SYS_SYSCALL_BASE+ 77);
SYS_GETTIMEOFDAY = (SYS_SYSCALL_BASE+ 78);
SYS_SETTIMEOFDAY = (SYS_SYSCALL_BASE+ 79);
SYS_GETGROUPS = (SYS_SYSCALL_BASE+ 80);
SYS_SETGROUPS = (SYS_SYSCALL_BASE+ 81);
SYS_SELECT = (SYS_SYSCALL_BASE+ 82);
SYS_SYMLINK = (SYS_SYSCALL_BASE+ 83);
SYS_READLINK = (SYS_SYSCALL_BASE+ 85);
SYS_USELIB = (SYS_SYSCALL_BASE+ 86);
SYS_SWAPON = (SYS_SYSCALL_BASE+ 87);
SYS_REBOOT = (SYS_SYSCALL_BASE+ 88);
SYS_READDIR = (SYS_SYSCALL_BASE+ 89);
SYS_MMAP = (SYS_SYSCALL_BASE+ 90);
SYS_MUNMAP = (SYS_SYSCALL_BASE+ 91);
SYS_TRUNCATE = (SYS_SYSCALL_BASE+ 92);
SYS_FTRUNCATE = (SYS_SYSCALL_BASE+ 93);
SYS_FCHMOD = (SYS_SYSCALL_BASE+ 94);
SYS_FCHOWN = (SYS_SYSCALL_BASE+ 95);
SYS_GETPRIORITY = (SYS_SYSCALL_BASE+ 96);
SYS_SETPRIORITY = (SYS_SYSCALL_BASE+ 97);
SYS_STATFS = (SYS_SYSCALL_BASE+ 99);
SYS_FSTATFS = (SYS_SYSCALL_BASE+100);
SYS_SOCKETCALL = (SYS_SYSCALL_BASE+102);
SYS_SYSLOG = (SYS_SYSCALL_BASE+103);
SYS_SETITIMER = (SYS_SYSCALL_BASE+104);
SYS_GETITIMER = (SYS_SYSCALL_BASE+105);
SYS_STAT = (SYS_SYSCALL_BASE+106);
SYS_LSTAT = (SYS_SYSCALL_BASE+107);
SYS_FSTAT = (SYS_SYSCALL_BASE+108);
SYS_VHANGUP = (SYS_SYSCALL_BASE+111);
SYS_SYSCALL = (SYS_SYSCALL_BASE+113);
SYS_WAIT4 = (SYS_SYSCALL_BASE+114);
SYS_SWAPOFF = (SYS_SYSCALL_BASE+115);
SYS_SYSINFO = (SYS_SYSCALL_BASE+116);
SYS_IPC = (SYS_SYSCALL_BASE+117);
SYS_FSYNC = (SYS_SYSCALL_BASE+118);
SYS_SIGRETURN = (SYS_SYSCALL_BASE+119);
SYS_CLONE = (SYS_SYSCALL_BASE+120);
SYS_SETDOMAINNAME = (SYS_SYSCALL_BASE+121);
SYS_UNAME = (SYS_SYSCALL_BASE+122);
SYS_ADJTIMEX = (SYS_SYSCALL_BASE+124);
SYS_MPROTECT = (SYS_SYSCALL_BASE+125);
SYS_SIGPROCMASK = (SYS_SYSCALL_BASE+126);
SYS_INIT_MODULE = (SYS_SYSCALL_BASE+128);
SYS_DELETE_MODULE = (SYS_SYSCALL_BASE+129);
SYS_QUOTACTL = (SYS_SYSCALL_BASE+131);
SYS_GETPGID = (SYS_SYSCALL_BASE+132);
SYS_FCHDIR = (SYS_SYSCALL_BASE+133);
SYS_BDFLUSH = (SYS_SYSCALL_BASE+134);
SYS_SYSFS = (SYS_SYSCALL_BASE+135);
SYS_PERSONALITY = (SYS_SYSCALL_BASE+136);
SYS_SETFSUID = (SYS_SYSCALL_BASE+138);
SYS_SETFSGID = (SYS_SYSCALL_BASE+139);
SYS__LLSEEK = (SYS_SYSCALL_BASE+140);
SYS_GETDENTS = (SYS_SYSCALL_BASE+141);
SYS__NEWSELECT = (SYS_SYSCALL_BASE+142);
SYS_FLOCK = (SYS_SYSCALL_BASE+143);
SYS_MSYNC = (SYS_SYSCALL_BASE+144);
SYS_READV = (SYS_SYSCALL_BASE+145);
SYS_WRITEV = (SYS_SYSCALL_BASE+146);
SYS_GETSID = (SYS_SYSCALL_BASE+147);
SYS_FDATASYNC = (SYS_SYSCALL_BASE+148);
SYS__SYSCTL = (SYS_SYSCALL_BASE+149);
SYS_MLOCK = (SYS_SYSCALL_BASE+150);
SYS_MUNLOCK = (SYS_SYSCALL_BASE+151);
SYS_MLOCKALL = (SYS_SYSCALL_BASE+152);
SYS_MUNLOCKALL = (SYS_SYSCALL_BASE+153);
SYS_SCHED_SETPARAM = (SYS_SYSCALL_BASE+154);
SYS_SCHED_GETPARAM = (SYS_SYSCALL_BASE+155);
SYS_SCHED_SETSCHEDULER = (SYS_SYSCALL_BASE+156);
SYS_SCHED_GETSCHEDULER = (SYS_SYSCALL_BASE+157);
SYS_SCHED_YIELD = (SYS_SYSCALL_BASE+158);
SYS_SCHED_GET_PRIORITY_MAX = (SYS_SYSCALL_BASE+159);
SYS_SCHED_GET_PRIORITY_MIN = (SYS_SYSCALL_BASE+160);
SYS_SCHED_RR_GET_INTERVAL = (SYS_SYSCALL_BASE+161);
SYS_NANOSLEEP = (SYS_SYSCALL_BASE+162);
SYS_MREMAP = (SYS_SYSCALL_BASE+163);
SYS_SETRESUID = (SYS_SYSCALL_BASE+164);
SYS_GETRESUID = (SYS_SYSCALL_BASE+165);
SYS_POLL = (SYS_SYSCALL_BASE+168);
SYS_NFSSERVCTL = (SYS_SYSCALL_BASE+169);
SYS_SETRESGID = (SYS_SYSCALL_BASE+170);
SYS_GETRESGID = (SYS_SYSCALL_BASE+171);
SYS_PRCTL = (SYS_SYSCALL_BASE+172);
SYS_RT_SIGRETURN = (SYS_SYSCALL_BASE+173);
SYS_RT_SIGACTION = (SYS_SYSCALL_BASE+174);
SYS_RT_SIGPROCMASK = (SYS_SYSCALL_BASE+175);
SYS_RT_SIGPENDING = (SYS_SYSCALL_BASE+176);
SYS_RT_SIGTIMEDWAIT = (SYS_SYSCALL_BASE+177);
SYS_RT_SIGQUEUEINFO = (SYS_SYSCALL_BASE+178);
SYS_RT_SIGSUSPEND = (SYS_SYSCALL_BASE+179);
SYS_PREAD64 = (SYS_SYSCALL_BASE+180);
SYS_PWRITE64 = (SYS_SYSCALL_BASE+181);
SYS_CHOWN = (SYS_SYSCALL_BASE+182);
SYS_GETCWD = (SYS_SYSCALL_BASE+183);
SYS_CAPGET = (SYS_SYSCALL_BASE+184);
SYS_CAPSET = (SYS_SYSCALL_BASE+185);
SYS_SIGALTSTACK = (SYS_SYSCALL_BASE+186);
SYS_SENDFILE = (SYS_SYSCALL_BASE+187);
SYS_VFORK = (SYS_SYSCALL_BASE+190);
SYS_UGETRLIMIT = (SYS_SYSCALL_BASE+191);
SYS_MMAP2 = (SYS_SYSCALL_BASE+192);
SYS_TRUNCATE64 = (SYS_SYSCALL_BASE+193);
SYS_FTRUNCATE64 = (SYS_SYSCALL_BASE+194);
SYS_STAT64 = (SYS_SYSCALL_BASE+195);
SYS_LSTAT64 = (SYS_SYSCALL_BASE+196);
SYS_FSTAT64 = (SYS_SYSCALL_BASE+197);
SYS_LCHOWN32 = (SYS_SYSCALL_BASE+198);
SYS_GETUID32 = (SYS_SYSCALL_BASE+199);
SYS_GETGID32 = (SYS_SYSCALL_BASE+200);
SYS_GETEUID32 = (SYS_SYSCALL_BASE+201);
SYS_GETEGID32 = (SYS_SYSCALL_BASE+202);
SYS_SETREUID32 = (SYS_SYSCALL_BASE+203);
SYS_SETREGID32 = (SYS_SYSCALL_BASE+204);
SYS_GETGROUPS32 = (SYS_SYSCALL_BASE+205);
SYS_SETGROUPS32 = (SYS_SYSCALL_BASE+206);
SYS_FCHOWN32 = (SYS_SYSCALL_BASE+207);
SYS_SETRESUID32 = (SYS_SYSCALL_BASE+208);
SYS_GETRESUID32 = (SYS_SYSCALL_BASE+209);
SYS_SETRESGID32 = (SYS_SYSCALL_BASE+210);
SYS_GETRESGID32 = (SYS_SYSCALL_BASE+211);
SYS_CHOWN32 = (SYS_SYSCALL_BASE+212);
SYS_SETUID32 = (SYS_SYSCALL_BASE+213);
SYS_SETGID32 = (SYS_SYSCALL_BASE+214);
SYS_SETFSUID32 = (SYS_SYSCALL_BASE+215);
SYS_SETFSGID32 = (SYS_SYSCALL_BASE+216);
SYS_GETDENTS64 = (SYS_SYSCALL_BASE+217);
SYS_PIVOT_ROOT = (SYS_SYSCALL_BASE+218);
SYS_MINCORE = (SYS_SYSCALL_BASE+219);
SYS_MADVISE = (SYS_SYSCALL_BASE+220);
SYS_FCNTL64 = (SYS_SYSCALL_BASE+221);
SYS_GETTID = (SYS_SYSCALL_BASE+224);
SYS_READAHEAD = (SYS_SYSCALL_BASE+225);
SYS_SETXATTR = (SYS_SYSCALL_BASE+226);
SYS_LSETXATTR = (SYS_SYSCALL_BASE+227);
SYS_FSETXATTR = (SYS_SYSCALL_BASE+228);
SYS_GETXATTR = (SYS_SYSCALL_BASE+229);
SYS_LGETXATTR = (SYS_SYSCALL_BASE+230);
SYS_FGETXATTR = (SYS_SYSCALL_BASE+231);
SYS_LISTXATTR = (SYS_SYSCALL_BASE+232);
SYS_LLISTXATTR = (SYS_SYSCALL_BASE+233);
SYS_FLISTXATTR = (SYS_SYSCALL_BASE+234);
SYS_REMOVEXATTR = (SYS_SYSCALL_BASE+235);
SYS_LREMOVEXATTR = (SYS_SYSCALL_BASE+236);
SYS_FREMOVEXATTR = (SYS_SYSCALL_BASE+237);
SYS_TKILL = (SYS_SYSCALL_BASE+238);
SYS_SENDFILE64 = (SYS_SYSCALL_BASE+239);
SYS_FUTEX = (SYS_SYSCALL_BASE+240);
SYS_SCHED_SETAFFINITY = (SYS_SYSCALL_BASE+241);
SYS_SCHED_GETAFFINITY = (SYS_SYSCALL_BASE+242);
SYS_IO_SETUP = (SYS_SYSCALL_BASE+243);
SYS_IO_DESTROY = (SYS_SYSCALL_BASE+244);
SYS_IO_GETEVENTS = (SYS_SYSCALL_BASE+245);
SYS_IO_SUBMIT = (SYS_SYSCALL_BASE+246);
SYS_IO_CANCEL = (SYS_SYSCALL_BASE+247);
SYS_EXIT_GROUP = (SYS_SYSCALL_BASE+248);
SYS_LOOKUP_DCOOKIE = (SYS_SYSCALL_BASE+249);
SYS_EPOLL_CREATE = (SYS_SYSCALL_BASE+250);
SYS_EPOLL_CTL = (SYS_SYSCALL_BASE+251);
SYS_EPOLL_WAIT = (SYS_SYSCALL_BASE+252);
SYS_REMAP_FILE_PAGES = (SYS_SYSCALL_BASE+253);
SYS_SET_TID_ADDRESS = (SYS_SYSCALL_BASE+256);
SYS_TIMER_CREATE = (SYS_SYSCALL_BASE+257);
SYS_TIMER_SETTIME = (SYS_SYSCALL_BASE+258);
SYS_TIMER_GETTIME = (SYS_SYSCALL_BASE+259);
SYS_TIMER_GETOVERRUN = (SYS_SYSCALL_BASE+260);
SYS_TIMER_DELETE = (SYS_SYSCALL_BASE+261);
SYS_CLOCK_SETTIME = (SYS_SYSCALL_BASE+262);
SYS_CLOCK_GETTIME = (SYS_SYSCALL_BASE+263);
SYS_CLOCK_GETRES = (SYS_SYSCALL_BASE+264);
SYS_CLOCK_NANOSLEEP = (SYS_SYSCALL_BASE+265);
SYS_STATFS64 = (SYS_SYSCALL_BASE+266);
SYS_FSTATFS64 = (SYS_SYSCALL_BASE+267);
SYS_TGKILL = (SYS_SYSCALL_BASE+268);
SYS_UTIMES = (SYS_SYSCALL_BASE+269);
SYS_ARM_FADVISE64_64 = (SYS_SYSCALL_BASE+270);
SYS_PCICONFIG_IOBASE = (SYS_SYSCALL_BASE+271);
SYS_PCICONFIG_READ = (SYS_SYSCALL_BASE+272);
SYS_PCICONFIG_WRITE = (SYS_SYSCALL_BASE+273);
SYS_MQ_OPEN = (SYS_SYSCALL_BASE+274);
SYS_MQ_UNLINK = (SYS_SYSCALL_BASE+275);
SYS_MQ_TIMEDSEND = (SYS_SYSCALL_BASE+276);
SYS_MQ_TIMEDRECEIVE = (SYS_SYSCALL_BASE+277);
SYS_MQ_NOTIFY = (SYS_SYSCALL_BASE+278);
SYS_MQ_GETSETATTR = (SYS_SYSCALL_BASE+279);
SYS_WAITID = (SYS_SYSCALL_BASE+280);
SYS_SOCKET = (SYS_SYSCALL_BASE+281);
SYS_BIND = (SYS_SYSCALL_BASE+282);
SYS_CONNECT = (SYS_SYSCALL_BASE+283);
SYS_LISTEN = (SYS_SYSCALL_BASE+284);
SYS_ACCEPT = (SYS_SYSCALL_BASE+285);
SYS_GETSOCKNAME = (SYS_SYSCALL_BASE+286);
SYS_GETPEERNAME = (SYS_SYSCALL_BASE+287);
SYS_SOCKETPAIR = (SYS_SYSCALL_BASE+288);
SYS_SEND = (SYS_SYSCALL_BASE+289);
SYS_SENDTO = (SYS_SYSCALL_BASE+290);
SYS_RECV = (SYS_SYSCALL_BASE+291);
SYS_RECVFROM = (SYS_SYSCALL_BASE+292);
SYS_SHUTDOWN = (SYS_SYSCALL_BASE+293);
SYS_SETSOCKOPT = (SYS_SYSCALL_BASE+294);
SYS_GETSOCKOPT = (SYS_SYSCALL_BASE+295);
SYS_SENDMSG = (SYS_SYSCALL_BASE+296);
SYS_RECVMSG = (SYS_SYSCALL_BASE+297);
SYS_SEMOP = (SYS_SYSCALL_BASE+298);
SYS_SEMGET = (SYS_SYSCALL_BASE+299);
SYS_SEMCTL = (SYS_SYSCALL_BASE+300);
SYS_MSGSND = (SYS_SYSCALL_BASE+301);
SYS_MSGRCV = (SYS_SYSCALL_BASE+302);
SYS_MSGGET = (SYS_SYSCALL_BASE+303);
SYS_MSGCTL = (SYS_SYSCALL_BASE+304);
SYS_SHMAT = (SYS_SYSCALL_BASE+305);
SYS_SHMDT = (SYS_SYSCALL_BASE+306);
SYS_SHMGET = (SYS_SYSCALL_BASE+307);
SYS_SHMCTL = (SYS_SYSCALL_BASE+308);
SYS_ADD_KEY = (SYS_SYSCALL_BASE+309);
SYS_REQUEST_KEY = (SYS_SYSCALL_BASE+310);
SYS_KEYCTL = (SYS_SYSCALL_BASE+311);
SYS_SEMTIMEDOP = (SYS_SYSCALL_BASE+312);
SYS_VSERVER = (SYS_SYSCALL_BASE+313);
SYS_IOPRIO_SET = (SYS_SYSCALL_BASE+314);
SYS_IOPRIO_GET = (SYS_SYSCALL_BASE+315);
SYS_INOTIFY_INIT = (SYS_SYSCALL_BASE+316);
SYS_INOTIFY_ADD_WATCH = (SYS_SYSCALL_BASE+317);
SYS_INOTIFY_RM_WATCH = (SYS_SYSCALL_BASE+318);
SYS_MBIND = (SYS_SYSCALL_BASE+319);
SYS_GET_MEMPOLICY = (SYS_SYSCALL_BASE+320);
SYS_SET_MEMPOLICY = (SYS_SYSCALL_BASE+321);
SYS_OPENAT = (SYS_SYSCALL_BASE+322);
SYS_MKDIRAT = (SYS_SYSCALL_BASE+323);
SYS_MKNODAT = (SYS_SYSCALL_BASE+324);
SYS_FCHOWNAT = (SYS_SYSCALL_BASE+325);
SYS_FUTIMESAT = (SYS_SYSCALL_BASE+326);
SYS_FSTATAT64 = (SYS_SYSCALL_BASE+327);
SYS_UNLINKAT = (SYS_SYSCALL_BASE+328);
SYS_RENAMEAT = (SYS_SYSCALL_BASE+329);
SYS_LINKAT = (SYS_SYSCALL_BASE+330);
SYS_SYMLINKAT = (SYS_SYSCALL_BASE+331);
SYS_READLINKAT = (SYS_SYSCALL_BASE+332);
SYS_FCHMODAT = (SYS_SYSCALL_BASE+333);
SYS_FACCESSAT = (SYS_SYSCALL_BASE+334);
SYS_UNSHARE = (SYS_SYSCALL_BASE+337);
SYS_SET_ROBUST_LIST = (SYS_SYSCALL_BASE+338);
SYS_GET_ROBUST_LIST = (SYS_SYSCALL_BASE+339);
SYS_SPLICE = (SYS_SYSCALL_BASE+340);
SYS_ARM_SYNC_FILE_RANGE = (SYS_SYSCALL_BASE+341);
SYS_SYNC_FILE_RANGE2 = SYS_ARM_SYNC_FILE_RANGE;
SYS_TEE = (SYS_SYSCALL_BASE+342);
SYS_VMSPLICE = (SYS_SYSCALL_BASE+343);
SYS_MOVE_PAGES = (SYS_SYSCALL_BASE+344);
SYS_GETCPU = (SYS_SYSCALL_BASE+345);
SYS_KEXEC_LOAD = (SYS_SYSCALL_BASE+347);
SYS_UTIMENSAT = (SYS_SYSCALL_BASE+348);
SYS_SIGNALFD = (SYS_SYSCALL_BASE+349);
SYS_TIMERFD_CREATE = (SYS_SYSCALL_BASE+350);
SYS_EVENTFD = (SYS_SYSCALL_BASE+351);
SYS_FALLOCATE = (SYS_SYSCALL_BASE+352);
SYS_TIMERFD_SETTIME = (SYS_SYSCALL_BASE+353);
SYS_TIMERFD_GETTIME = (SYS_SYSCALL_BASE+354);
SYS_SIGNALFD4 = (SYS_SYSCALL_BASE+355);
SYS_EVENTFD2 = (SYS_SYSCALL_BASE+356);
SYS_EPOLL_CREATE1 = (SYS_SYSCALL_BASE+357);
SYS_DUP3 = (SYS_SYSCALL_BASE+358);
SYS_PIPE2 = (SYS_SYSCALL_BASE+359);
SYS_INOTIFY_INIT1 = (SYS_SYSCALL_BASE+360);
)
func _darwin_system_call_conflict() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment