Commit 89d4068c authored by Tobias Klauser's avatar Tobias Klauser Committed by Brad Fitzpatrick

unix: add *at functions (POSIX.1-2008) on darwin/{arm,arm64}

Follow golang.org/cl/50450 and add the Faccessat, Fchmodat, Fchownat,
Linkat, Mkdirat, Openat, Readlinkat, Renameat, Symlinkat and Unlinkat
functions (to conform to POSIX.1-2008) for darwin/arm and darwin/amd64.
Also add the missing AT_* constants.

Generated on Mac OS 10.11 (Darwin 15.6.0). This also regenerates the
syscall numbers for arm and arm64 akin to golang.org/cl/14151

Also fix the mksysnum call in mkall.sh to work for darwin/arm.

Fixes golang/go#14457

Change-Id: Ia3c36dbca9e6f1e4873afdfafcc4f7d8050644f9
Reviewed-on: https://go-review.googlesource.com/54271Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent f1e7f7a8
......@@ -72,7 +72,7 @@ darwin_amd64)
;;
darwin_arm)
mkerrors="$mkerrors"
mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h"
mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
darwin_arm64)
......
......@@ -221,7 +221,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
_, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
......@@ -466,6 +466,21 @@ func Exit(code int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 {
......@@ -496,6 +511,21 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
......@@ -506,6 +536,21 @@ func Fchown(fd int, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
......@@ -755,6 +800,26 @@ func Link(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
......@@ -795,6 +860,21 @@ func Mkdir(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
......@@ -909,6 +989,22 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
......@@ -998,6 +1094,28 @@ func Readlink(path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
......@@ -1018,6 +1136,26 @@ func Rename(from string, to string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
......@@ -1255,6 +1393,26 @@ func Symlink(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
if e1 != 0 {
......@@ -1318,6 +1476,21 @@ func Unlink(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
......
......@@ -466,6 +466,21 @@ func Exit(code int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 {
......@@ -496,6 +511,21 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
......@@ -506,6 +536,21 @@ func Fchown(fd int, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
......@@ -755,6 +800,26 @@ func Link(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
......@@ -795,6 +860,21 @@ func Mkdir(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
......@@ -909,6 +989,22 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
......@@ -998,6 +1094,28 @@ func Readlink(path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
......@@ -1018,6 +1136,26 @@ func Rename(from string, to string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
......@@ -1255,6 +1393,26 @@ func Symlink(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
if e1 != 0 {
......@@ -1318,6 +1476,21 @@ func Unlink(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
......
// mksysnum_darwin.pl /usr/include/sys/syscall.h
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build arm,darwin
......@@ -121,12 +121,14 @@ const (
SYS_CSOPS = 169
SYS_CSOPS_AUDITTOKEN = 170
SYS_WAITID = 173
SYS_KDEBUG_TYPEFILTER = 177
SYS_KDEBUG_TRACE_STRING = 178
SYS_KDEBUG_TRACE64 = 179
SYS_KDEBUG_TRACE = 180
SYS_SETGID = 181
SYS_SETEGID = 182
SYS_SETEUID = 183
SYS_SIGRETURN = 184
SYS_CHUD = 185
SYS_FDATASYNC = 187
SYS_STAT = 188
SYS_FSTAT = 189
......@@ -140,17 +142,10 @@ const (
SYS_LSEEK = 199
SYS_TRUNCATE = 200
SYS_FTRUNCATE = 201
SYS___SYSCTL = 202
SYS_SYSCTL = 202
SYS_MLOCK = 203
SYS_MUNLOCK = 204
SYS_UNDELETE = 205
SYS_ATSOCKET = 206
SYS_ATGETMSG = 207
SYS_ATPUTMSG = 208
SYS_ATPSNDREQ = 209
SYS_ATPSNDRSP = 210
SYS_ATPGETREQ = 211
SYS_ATPGETRSP = 212
SYS_OPEN_DPROTECTED_NP = 216
SYS_GETATTRLIST = 220
SYS_SETATTRLIST = 221
......@@ -202,9 +197,7 @@ const (
SYS_SEM_WAIT = 271
SYS_SEM_TRYWAIT = 272
SYS_SEM_POST = 273
SYS_SEM_GETVALUE = 274
SYS_SEM_INIT = 275
SYS_SEM_DESTROY = 276
SYS_SYSCTLBYNAME = 274
SYS_OPEN_EXTENDED = 277
SYS_UMASK_EXTENDED = 278
SYS_STAT_EXTENDED = 279
......@@ -286,7 +279,6 @@ const (
SYS_KQUEUE = 362
SYS_KEVENT = 363
SYS_LCHOWN = 364
SYS_STACK_SNAPSHOT = 365
SYS_BSDTHREAD_REGISTER = 366
SYS_WORKQ_OPEN = 367
SYS_WORKQ_KERNRETURN = 368
......@@ -295,6 +287,7 @@ const (
SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
SYS_THREAD_SELFID = 372
SYS_LEDGER = 373
SYS_KEVENT_QOS = 374
SYS___MAC_EXECVE = 380
SYS___MAC_SYSCALL = 381
SYS___MAC_GET_FILE = 382
......@@ -306,11 +299,8 @@ const (
SYS___MAC_GET_FD = 388
SYS___MAC_SET_FD = 389
SYS___MAC_GET_PID = 390
SYS___MAC_GET_LCID = 391
SYS___MAC_GET_LCTX = 392
SYS___MAC_SET_LCTX = 393
SYS_SETLCID = 394
SYS_GETLCID = 395
SYS_PSELECT = 394
SYS_PSELECT_NOCANCEL = 395
SYS_READ_NOCANCEL = 396
SYS_WRITE_NOCANCEL = 397
SYS_OPEN_NOCANCEL = 398
......@@ -354,5 +344,83 @@ const (
SYS_PID_SHUTDOWN_SOCKETS = 436
SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438
SYS_KAS_INFO = 439
SYS_MAXSYSCALL = 440
SYS_MEMORYSTATUS_CONTROL = 440
SYS_GUARDED_OPEN_NP = 441
SYS_GUARDED_CLOSE_NP = 442
SYS_GUARDED_KQUEUE_NP = 443
SYS_CHANGE_FDGUARD_NP = 444
SYS_USRCTL = 445
SYS_PROC_RLIMIT_CONTROL = 446
SYS_CONNECTX = 447
SYS_DISCONNECTX = 448
SYS_PEELOFF = 449
SYS_SOCKET_DELEGATE = 450
SYS_TELEMETRY = 451
SYS_PROC_UUID_POLICY = 452
SYS_MEMORYSTATUS_GET_LEVEL = 453
SYS_SYSTEM_OVERRIDE = 454
SYS_VFS_PURGE = 455
SYS_SFI_CTL = 456
SYS_SFI_PIDCTL = 457
SYS_COALITION = 458
SYS_COALITION_INFO = 459
SYS_NECP_MATCH_POLICY = 460
SYS_GETATTRLISTBULK = 461
SYS_CLONEFILEAT = 462
SYS_OPENAT = 463
SYS_OPENAT_NOCANCEL = 464
SYS_RENAMEAT = 465
SYS_FACCESSAT = 466
SYS_FCHMODAT = 467
SYS_FCHOWNAT = 468
SYS_FSTATAT = 469
SYS_FSTATAT64 = 470
SYS_LINKAT = 471
SYS_UNLINKAT = 472
SYS_READLINKAT = 473
SYS_SYMLINKAT = 474
SYS_MKDIRAT = 475
SYS_GETATTRLISTAT = 476
SYS_PROC_TRACE_LOG = 477
SYS_BSDTHREAD_CTL = 478
SYS_OPENBYID_NP = 479
SYS_RECVMSG_X = 480
SYS_SENDMSG_X = 481
SYS_THREAD_SELFUSAGE = 482
SYS_CSRCTL = 483
SYS_GUARDED_OPEN_DPROTECTED_NP = 484
SYS_GUARDED_WRITE_NP = 485
SYS_GUARDED_PWRITE_NP = 486
SYS_GUARDED_WRITEV_NP = 487
SYS_RENAMEATX_NP = 488
SYS_MREMAP_ENCRYPTED = 489
SYS_NETAGENT_TRIGGER = 490
SYS_STACK_SNAPSHOT_WITH_CONFIG = 491
SYS_MICROSTACKSHOT = 492
SYS_GRAB_PGO_DATA = 493
SYS_PERSONA = 494
SYS_WORK_INTERVAL_CTL = 499
SYS_GETENTROPY = 500
SYS_NECP_OPEN = 501
SYS_NECP_CLIENT_ACTION = 502
SYS___NEXUS_OPEN = 503
SYS___NEXUS_REGISTER = 504
SYS___NEXUS_DEREGISTER = 505
SYS___NEXUS_CREATE = 506
SYS___NEXUS_DESTROY = 507
SYS___NEXUS_GET_OPT = 508
SYS___NEXUS_SET_OPT = 509
SYS___CHANNEL_OPEN = 510
SYS___CHANNEL_GET_INFO = 511
SYS___CHANNEL_SYNC = 512
SYS___CHANNEL_GET_OPT = 513
SYS___CHANNEL_SET_OPT = 514
SYS_ULOCK_WAIT = 515
SYS_ULOCK_WAKE = 516
SYS_FCLONEFILEAT = 517
SYS_FS_SNAPSHOT = 518
SYS_TERMINATE_WITH_PAYLOAD = 520
SYS_ABORT_WITH_PAYLOAD = 521
SYS_MAXSYSCALL = 522
SYS_INVALID = 63
)
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/include/sys/syscall.h
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build arm64,darwin
......@@ -121,13 +121,14 @@ const (
SYS_CSOPS = 169
SYS_CSOPS_AUDITTOKEN = 170
SYS_WAITID = 173
SYS_KDEBUG_TYPEFILTER = 177
SYS_KDEBUG_TRACE_STRING = 178
SYS_KDEBUG_TRACE64 = 179
SYS_KDEBUG_TRACE = 180
SYS_SETGID = 181
SYS_SETEGID = 182
SYS_SETEUID = 183
SYS_SIGRETURN = 184
SYS_CHUD = 185
SYS_FDATASYNC = 187
SYS_STAT = 188
SYS_FSTAT = 189
......@@ -278,7 +279,6 @@ const (
SYS_KQUEUE = 362
SYS_KEVENT = 363
SYS_LCHOWN = 364
SYS_STACK_SNAPSHOT = 365
SYS_BSDTHREAD_REGISTER = 366
SYS_WORKQ_OPEN = 367
SYS_WORKQ_KERNRETURN = 368
......@@ -287,6 +287,7 @@ const (
SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
SYS_THREAD_SELFID = 372
SYS_LEDGER = 373
SYS_KEVENT_QOS = 374
SYS___MAC_EXECVE = 380
SYS___MAC_SYSCALL = 381
SYS___MAC_GET_FILE = 382
......@@ -298,11 +299,8 @@ const (
SYS___MAC_GET_FD = 388
SYS___MAC_SET_FD = 389
SYS___MAC_GET_PID = 390
SYS___MAC_GET_LCID = 391
SYS___MAC_GET_LCTX = 392
SYS___MAC_SET_LCTX = 393
SYS_SETLCID = 394
SYS_GETLCID = 395
SYS_PSELECT = 394
SYS_PSELECT_NOCANCEL = 395
SYS_READ_NOCANCEL = 396
SYS_WRITE_NOCANCEL = 397
SYS_OPEN_NOCANCEL = 398
......@@ -351,6 +349,7 @@ const (
SYS_GUARDED_CLOSE_NP = 442
SYS_GUARDED_KQUEUE_NP = 443
SYS_CHANGE_FDGUARD_NP = 444
SYS_USRCTL = 445
SYS_PROC_RLIMIT_CONTROL = 446
SYS_CONNECTX = 447
SYS_DISCONNECTX = 448
......@@ -367,6 +366,7 @@ const (
SYS_COALITION_INFO = 459
SYS_NECP_MATCH_POLICY = 460
SYS_GETATTRLISTBULK = 461
SYS_CLONEFILEAT = 462
SYS_OPENAT = 463
SYS_OPENAT_NOCANCEL = 464
SYS_RENAMEAT = 465
......@@ -392,7 +392,35 @@ const (
SYS_GUARDED_WRITE_NP = 485
SYS_GUARDED_PWRITE_NP = 486
SYS_GUARDED_WRITEV_NP = 487
SYS_RENAME_EXT = 488
SYS_RENAMEATX_NP = 488
SYS_MREMAP_ENCRYPTED = 489
SYS_MAXSYSCALL = 490
SYS_NETAGENT_TRIGGER = 490
SYS_STACK_SNAPSHOT_WITH_CONFIG = 491
SYS_MICROSTACKSHOT = 492
SYS_GRAB_PGO_DATA = 493
SYS_PERSONA = 494
SYS_WORK_INTERVAL_CTL = 499
SYS_GETENTROPY = 500
SYS_NECP_OPEN = 501
SYS_NECP_CLIENT_ACTION = 502
SYS___NEXUS_OPEN = 503
SYS___NEXUS_REGISTER = 504
SYS___NEXUS_DEREGISTER = 505
SYS___NEXUS_CREATE = 506
SYS___NEXUS_DESTROY = 507
SYS___NEXUS_GET_OPT = 508
SYS___NEXUS_SET_OPT = 509
SYS___CHANNEL_OPEN = 510
SYS___CHANNEL_GET_INFO = 511
SYS___CHANNEL_SYNC = 512
SYS___CHANNEL_GET_OPT = 513
SYS___CHANNEL_SET_OPT = 514
SYS_ULOCK_WAIT = 515
SYS_ULOCK_WAKE = 516
SYS_FCLONEFILEAT = 517
SYS_FS_SNAPSHOT = 518
SYS_TERMINATE_WITH_PAYLOAD = 520
SYS_ABORT_WITH_PAYLOAD = 521
SYS_MAXSYSCALL = 522
SYS_INVALID = 63
)
......@@ -454,3 +454,10 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
const (
AT_FDCWD = -0x2
AT_REMOVEDIR = 0x80
AT_SYMLINK_FOLLOW = 0x40
AT_SYMLINK_NOFOLLOW = 0x20
)
......@@ -462,3 +462,10 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
const (
AT_FDCWD = -0x2
AT_REMOVEDIR = 0x80
AT_SYMLINK_FOLLOW = 0x40
AT_SYMLINK_NOFOLLOW = 0x20
)
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