1// Copyright 2009,2010 The Go Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// FreeBSD system calls. 6// This file is compiled as ordinary Go code, 7// but it is also input to mksyscall, 8// which parses the //sys lines and generates system call stubs. 9// Note that sometimes we use a lowercase //sys name and wrap 10// it in our own nicer implementation, either here or in 11// syscall_bsd.go or syscall_unix.go. 12 13package unix 14 15import ( 16 "strings" 17 "unsafe" 18) 19 20// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. 21type SockaddrDatalink struct { 22 Len uint8 23 Family uint8 24 Index uint16 25 Type uint8 26 Nlen uint8 27 Alen uint8 28 Slen uint8 29 Data [46]int8 30 raw RawSockaddrDatalink 31} 32 33// Translate "kern.hostname" to []_C_int{0,1,2,3}. 34func nametomib(name string) (mib []_C_int, err error) { 35 const siz = unsafe.Sizeof(mib[0]) 36 37 // NOTE(rsc): It seems strange to set the buffer to have 38 // size CTL_MAXNAME+2 but use only CTL_MAXNAME 39 // as the size. I don't know why the +2 is here, but the 40 // kernel uses +2 for its own implementation of this function. 41 // I am scared that if we don't include the +2 here, the kernel 42 // will silently write 2 words farther than we specify 43 // and we'll get memory corruption. 44 var buf [CTL_MAXNAME + 2]_C_int 45 n := uintptr(CTL_MAXNAME) * siz 46 47 p := (*byte)(unsafe.Pointer(&buf[0])) 48 bytes, err := ByteSliceFromString(name) 49 if err != nil { 50 return nil, err 51 } 52 53 // Magic sysctl: "setting" 0.3 to a string name 54 // lets you read back the array of integers form. 55 if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil { 56 return nil, err 57 } 58 return buf[0 : n/siz], nil 59} 60 61//sysnb pipe() (r int, w int, err error) 62 63func Pipe(p []int) (err error) { 64 if len(p) != 2 { 65 return EINVAL 66 } 67 p[0], p[1], err = pipe() 68 return 69} 70 71func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) { 72 var value IPMreqn 73 vallen := _Socklen(SizeofIPMreqn) 74 errno := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) 75 return &value, errno 76} 77 78func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) { 79 return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq)) 80} 81 82func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) { 83 var rsa RawSockaddrAny 84 var len _Socklen = SizeofSockaddrAny 85 nfd, err = accept4(fd, &rsa, &len, flags) 86 if err != nil { 87 return 88 } 89 if len > SizeofSockaddrAny { 90 panic("RawSockaddrAny too small") 91 } 92 sa, err = anyToSockaddr(&rsa) 93 if err != nil { 94 Close(nfd) 95 nfd = 0 96 } 97 return 98} 99 100const ImplementsGetwd = true 101 102//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD 103 104func Getwd() (string, error) { 105 var buf [PathMax]byte 106 _, err := Getcwd(buf[0:]) 107 if err != nil { 108 return "", err 109 } 110 n := clen(buf[:]) 111 if n < 1 { 112 return "", EINVAL 113 } 114 return string(buf[:n]), nil 115} 116 117func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { 118 var _p0 unsafe.Pointer 119 var bufsize uintptr 120 if len(buf) > 0 { 121 _p0 = unsafe.Pointer(&buf[0]) 122 bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf)) 123 } 124 r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags)) 125 n = int(r0) 126 if e1 != 0 { 127 err = e1 128 } 129 return 130} 131 132func setattrlistTimes(path string, times []Timespec, flags int) error { 133 // used on Darwin for UtimesNano 134 return ENOSYS 135} 136 137// Derive extattr namespace and attribute name 138 139func xattrnamespace(fullattr string) (ns int, attr string, err error) { 140 s := strings.IndexByte(fullattr, '.') 141 if s == -1 { 142 return -1, "", ENOATTR 143 } 144 145 namespace := fullattr[0:s] 146 attr = fullattr[s+1:] 147 148 switch namespace { 149 case "user": 150 return EXTATTR_NAMESPACE_USER, attr, nil 151 case "system": 152 return EXTATTR_NAMESPACE_SYSTEM, attr, nil 153 default: 154 return -1, "", ENOATTR 155 } 156} 157 158func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) { 159 if len(dest) > idx { 160 return unsafe.Pointer(&dest[idx]) 161 } else { 162 return unsafe.Pointer(_zero) 163 } 164} 165 166// FreeBSD implements its own syscalls to handle extended attributes 167 168func Getxattr(file string, attr string, dest []byte) (sz int, err error) { 169 d := initxattrdest(dest, 0) 170 destsize := len(dest) 171 172 nsid, a, err := xattrnamespace(attr) 173 if err != nil { 174 return -1, err 175 } 176 177 return ExtattrGetFile(file, nsid, a, uintptr(d), destsize) 178} 179 180func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { 181 d := initxattrdest(dest, 0) 182 destsize := len(dest) 183 184 nsid, a, err := xattrnamespace(attr) 185 if err != nil { 186 return -1, err 187 } 188 189 return ExtattrGetFd(fd, nsid, a, uintptr(d), destsize) 190} 191 192func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { 193 d := initxattrdest(dest, 0) 194 destsize := len(dest) 195 196 nsid, a, err := xattrnamespace(attr) 197 if err != nil { 198 return -1, err 199 } 200 201 return ExtattrGetLink(link, nsid, a, uintptr(d), destsize) 202} 203 204// flags are unused on FreeBSD 205 206func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) { 207 d := unsafe.Pointer(&data[0]) 208 datasiz := len(data) 209 210 nsid, a, err := xattrnamespace(attr) 211 if err != nil { 212 return 213 } 214 215 _, err = ExtattrSetFd(fd, nsid, a, uintptr(d), datasiz) 216 return 217} 218 219func Setxattr(file string, attr string, data []byte, flags int) (err error) { 220 d := unsafe.Pointer(&data[0]) 221 datasiz := len(data) 222 223 nsid, a, err := xattrnamespace(attr) 224 if err != nil { 225 return 226 } 227 228 _, err = ExtattrSetFile(file, nsid, a, uintptr(d), datasiz) 229 return 230} 231 232func Lsetxattr(link string, attr string, data []byte, flags int) (err error) { 233 d := unsafe.Pointer(&data[0]) 234 datasiz := len(data) 235 236 nsid, a, err := xattrnamespace(attr) 237 if err != nil { 238 return 239 } 240 241 _, err = ExtattrSetLink(link, nsid, a, uintptr(d), datasiz) 242 return 243} 244 245func Removexattr(file string, attr string) (err error) { 246 nsid, a, err := xattrnamespace(attr) 247 if err != nil { 248 return 249 } 250 251 err = ExtattrDeleteFile(file, nsid, a) 252 return 253} 254 255func Fremovexattr(fd int, attr string) (err error) { 256 nsid, a, err := xattrnamespace(attr) 257 if err != nil { 258 return 259 } 260 261 err = ExtattrDeleteFd(fd, nsid, a) 262 return 263} 264 265func Lremovexattr(link string, attr string) (err error) { 266 nsid, a, err := xattrnamespace(attr) 267 if err != nil { 268 return 269 } 270 271 err = ExtattrDeleteLink(link, nsid, a) 272 return 273} 274 275func Listxattr(file string, dest []byte) (sz int, err error) { 276 d := initxattrdest(dest, 0) 277 destsiz := len(dest) 278 279 // FreeBSD won't allow you to list xattrs from multiple namespaces 280 s := 0 281 for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { 282 stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz) 283 284 /* Errors accessing system attrs are ignored so that 285 * we can implement the Linux-like behavior of omitting errors that 286 * we don't have read permissions on 287 * 288 * Linux will still error if we ask for user attributes on a file that 289 * we don't have read permissions on, so don't ignore those errors 290 */ 291 if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { 292 continue 293 } else if e != nil { 294 return s, e 295 } 296 297 s += stmp 298 destsiz -= s 299 if destsiz < 0 { 300 destsiz = 0 301 } 302 d = initxattrdest(dest, s) 303 } 304 305 return s, nil 306} 307 308func Flistxattr(fd int, dest []byte) (sz int, err error) { 309 d := initxattrdest(dest, 0) 310 destsiz := len(dest) 311 312 s := 0 313 for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { 314 stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz) 315 if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { 316 continue 317 } else if e != nil { 318 return s, e 319 } 320 321 s += stmp 322 destsiz -= s 323 if destsiz < 0 { 324 destsiz = 0 325 } 326 d = initxattrdest(dest, s) 327 } 328 329 return s, nil 330} 331 332func Llistxattr(link string, dest []byte) (sz int, err error) { 333 d := initxattrdest(dest, 0) 334 destsiz := len(dest) 335 336 s := 0 337 for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { 338 stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz) 339 if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { 340 continue 341 } else if e != nil { 342 return s, e 343 } 344 345 s += stmp 346 destsiz -= s 347 if destsiz < 0 { 348 destsiz = 0 349 } 350 d = initxattrdest(dest, s) 351 } 352 353 return s, nil 354} 355 356//sys ioctl(fd int, req uint, arg uintptr) (err error) 357 358// ioctl itself should not be exposed directly, but additional get/set 359// functions for specific types are permissible. 360 361// IoctlSetInt performs an ioctl operation which sets an integer value 362// on fd, using the specified request number. 363func IoctlSetInt(fd int, req uint, value int) error { 364 return ioctl(fd, req, uintptr(value)) 365} 366 367func IoctlSetWinsize(fd int, req uint, value *Winsize) error { 368 return ioctl(fd, req, uintptr(unsafe.Pointer(value))) 369} 370 371func IoctlSetTermios(fd int, req uint, value *Termios) error { 372 return ioctl(fd, req, uintptr(unsafe.Pointer(value))) 373} 374 375// IoctlGetInt performs an ioctl operation which gets an integer value 376// from fd, using the specified request number. 377func IoctlGetInt(fd int, req uint) (int, error) { 378 var value int 379 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) 380 return value, err 381} 382 383func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { 384 var value Winsize 385 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) 386 return &value, err 387} 388 389func IoctlGetTermios(fd int, req uint) (*Termios, error) { 390 var value Termios 391 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) 392 return &value, err 393} 394 395func Uname(uname *Utsname) error { 396 mib := []_C_int{CTL_KERN, KERN_OSTYPE} 397 n := unsafe.Sizeof(uname.Sysname) 398 if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { 399 return err 400 } 401 402 mib = []_C_int{CTL_KERN, KERN_HOSTNAME} 403 n = unsafe.Sizeof(uname.Nodename) 404 if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { 405 return err 406 } 407 408 mib = []_C_int{CTL_KERN, KERN_OSRELEASE} 409 n = unsafe.Sizeof(uname.Release) 410 if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { 411 return err 412 } 413 414 mib = []_C_int{CTL_KERN, KERN_VERSION} 415 n = unsafe.Sizeof(uname.Version) 416 if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { 417 return err 418 } 419 420 // The version might have newlines or tabs in it, convert them to 421 // spaces. 422 for i, b := range uname.Version { 423 if b == '\n' || b == '\t' { 424 if i == len(uname.Version)-1 { 425 uname.Version[i] = 0 426 } else { 427 uname.Version[i] = ' ' 428 } 429 } 430 } 431 432 mib = []_C_int{CTL_HW, HW_MACHINE} 433 n = unsafe.Sizeof(uname.Machine) 434 if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { 435 return err 436 } 437 438 return nil 439} 440 441/* 442 * Exposed directly 443 */ 444//sys Access(path string, mode uint32) (err error) 445//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) 446//sys CapEnter() (err error) 447//sys capRightsGet(version int, fd int, rightsp *CapRights) (err error) = SYS___CAP_RIGHTS_GET 448//sys capRightsLimit(fd int, rightsp *CapRights) (err error) 449//sys Chdir(path string) (err error) 450//sys Chflags(path string, flags int) (err error) 451//sys Chmod(path string, mode uint32) (err error) 452//sys Chown(path string, uid int, gid int) (err error) 453//sys Chroot(path string) (err error) 454//sys Close(fd int) (err error) 455//sys Dup(fd int) (nfd int, err error) 456//sys Dup2(from int, to int) (err error) 457//sys Exit(code int) 458//sys ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) 459//sys ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) 460//sys ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) 461//sys ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) 462//sys ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) 463//sys ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) 464//sys ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) 465//sys ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) 466//sys ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) 467//sys ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) 468//sys ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) 469//sys ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) 470//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE 471//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error) 472//sys Fchdir(fd int) (err error) 473//sys Fchflags(fd int, flags int) (err error) 474//sys Fchmod(fd int, mode uint32) (err error) 475//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) 476//sys Fchown(fd int, uid int, gid int) (err error) 477//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) 478//sys Flock(fd int, how int) (err error) 479//sys Fpathconf(fd int, name int) (val int, err error) 480//sys Fstat(fd int, stat *Stat_t) (err error) 481//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) 482//sys Fstatfs(fd int, stat *Statfs_t) (err error) 483//sys Fsync(fd int) (err error) 484//sys Ftruncate(fd int, length int64) (err error) 485//sys Getdents(fd int, buf []byte) (n int, err error) 486//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) 487//sys Getdtablesize() (size int) 488//sysnb Getegid() (egid int) 489//sysnb Geteuid() (uid int) 490//sysnb Getgid() (gid int) 491//sysnb Getpgid(pid int) (pgid int, err error) 492//sysnb Getpgrp() (pgrp int) 493//sysnb Getpid() (pid int) 494//sysnb Getppid() (ppid int) 495//sys Getpriority(which int, who int) (prio int, err error) 496//sysnb Getrlimit(which int, lim *Rlimit) (err error) 497//sysnb Getrusage(who int, rusage *Rusage) (err error) 498//sysnb Getsid(pid int) (sid int, err error) 499//sysnb Gettimeofday(tv *Timeval) (err error) 500//sysnb Getuid() (uid int) 501//sys Issetugid() (tainted bool) 502//sys Kill(pid int, signum syscall.Signal) (err error) 503//sys Kqueue() (fd int, err error) 504//sys Lchown(path string, uid int, gid int) (err error) 505//sys Link(path string, link string) (err error) 506//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) 507//sys Listen(s int, backlog int) (err error) 508//sys Lstat(path string, stat *Stat_t) (err error) 509//sys Mkdir(path string, mode uint32) (err error) 510//sys Mkdirat(dirfd int, path string, mode uint32) (err error) 511//sys Mkfifo(path string, mode uint32) (err error) 512//sys Mknod(path string, mode uint32, dev int) (err error) 513//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) 514//sys Open(path string, mode int, perm uint32) (fd int, err error) 515//sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) 516//sys Pathconf(path string, name int) (val int, err error) 517//sys Pread(fd int, p []byte, offset int64) (n int, err error) 518//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) 519//sys read(fd int, p []byte) (n int, err error) 520//sys Readlink(path string, buf []byte) (n int, err error) 521//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error) 522//sys Rename(from string, to string) (err error) 523//sys Renameat(fromfd int, from string, tofd int, to string) (err error) 524//sys Revoke(path string) (err error) 525//sys Rmdir(path string) (err error) 526//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK 527//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) 528//sysnb Setegid(egid int) (err error) 529//sysnb Seteuid(euid int) (err error) 530//sysnb Setgid(gid int) (err error) 531//sys Setlogin(name string) (err error) 532//sysnb Setpgid(pid int, pgid int) (err error) 533//sys Setpriority(which int, who int, prio int) (err error) 534//sysnb Setregid(rgid int, egid int) (err error) 535//sysnb Setreuid(ruid int, euid int) (err error) 536//sysnb Setresgid(rgid int, egid int, sgid int) (err error) 537//sysnb Setresuid(ruid int, euid int, suid int) (err error) 538//sysnb Setrlimit(which int, lim *Rlimit) (err error) 539//sysnb Setsid() (pid int, err error) 540//sysnb Settimeofday(tp *Timeval) (err error) 541//sysnb Setuid(uid int) (err error) 542//sys Stat(path string, stat *Stat_t) (err error) 543//sys Statfs(path string, stat *Statfs_t) (err error) 544//sys Symlink(path string, link string) (err error) 545//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error) 546//sys Sync() (err error) 547//sys Truncate(path string, length int64) (err error) 548//sys Umask(newmask int) (oldmask int) 549//sys Undelete(path string) (err error) 550//sys Unlink(path string) (err error) 551//sys Unlinkat(dirfd int, path string, flags int) (err error) 552//sys Unmount(path string, flags int) (err error) 553//sys write(fd int, p []byte) (n int, err error) 554//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) 555//sys munmap(addr uintptr, length uintptr) (err error) 556//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ 557//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE 558//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) 559//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) 560 561/* 562 * Unimplemented 563 */ 564// Profil 565// Sigaction 566// Sigprocmask 567// Getlogin 568// Sigpending 569// Sigaltstack 570// Ioctl 571// Reboot 572// Execve 573// Vfork 574// Sbrk 575// Sstk 576// Ovadvise 577// Mincore 578// Setitimer 579// Swapon 580// Select 581// Sigsuspend 582// Readv 583// Writev 584// Nfssvc 585// Getfh 586// Quotactl 587// Mount 588// Csops 589// Waitid 590// Add_profil 591// Kdebug_trace 592// Sigreturn 593// Atsocket 594// Kqueue_from_portset_np 595// Kqueue_portset 596// Getattrlist 597// Setattrlist 598// Getdirentriesattr 599// Searchfs 600// Delete 601// Copyfile 602// Watchevent 603// Waitevent 604// Modwatch 605// Getxattr 606// Fgetxattr 607// Setxattr 608// Fsetxattr 609// Removexattr 610// Fremovexattr 611// Listxattr 612// Flistxattr 613// Fsctl 614// Initgroups 615// Posix_spawn 616// Nfsclnt 617// Fhopen 618// Minherit 619// Semsys 620// Msgsys 621// Shmsys 622// Semctl 623// Semget 624// Semop 625// Msgctl 626// Msgget 627// Msgsnd 628// Msgrcv 629// Shmat 630// Shmctl 631// Shmdt 632// Shmget 633// Shm_open 634// Shm_unlink 635// Sem_open 636// Sem_close 637// Sem_unlink 638// Sem_wait 639// Sem_trywait 640// Sem_post 641// Sem_getvalue 642// Sem_init 643// Sem_destroy 644// Open_extended 645// Umask_extended 646// Stat_extended 647// Lstat_extended 648// Fstat_extended 649// Chmod_extended 650// Fchmod_extended 651// Access_extended 652// Settid 653// Gettid 654// Setsgroups 655// Getsgroups 656// Setwgroups 657// Getwgroups 658// Mkfifo_extended 659// Mkdir_extended 660// Identitysvc 661// Shared_region_check_np 662// Shared_region_map_np 663// __pthread_mutex_destroy 664// __pthread_mutex_init 665// __pthread_mutex_lock 666// __pthread_mutex_trylock 667// __pthread_mutex_unlock 668// __pthread_cond_init 669// __pthread_cond_destroy 670// __pthread_cond_broadcast 671// __pthread_cond_signal 672// Setsid_with_pid 673// __pthread_cond_timedwait 674// Aio_fsync 675// Aio_return 676// Aio_suspend 677// Aio_cancel 678// Aio_error 679// Aio_read 680// Aio_write 681// Lio_listio 682// __pthread_cond_wait 683// Iopolicysys 684// __pthread_kill 685// __pthread_sigmask 686// __sigwait 687// __disable_threadsignal 688// __pthread_markcancel 689// __pthread_canceled 690// __semwait_signal 691// Proc_info 692// Stat64_extended 693// Lstat64_extended 694// Fstat64_extended 695// __pthread_chdir 696// __pthread_fchdir 697// Audit 698// Auditon 699// Getauid 700// Setauid 701// Getaudit 702// Setaudit 703// Getaudit_addr 704// Setaudit_addr 705// Auditctl 706// Bsdthread_create 707// Bsdthread_terminate 708// Stack_snapshot 709// Bsdthread_register 710// Workq_open 711// Workq_ops 712// __mac_execve 713// __mac_syscall 714// __mac_get_file 715// __mac_set_file 716// __mac_get_link 717// __mac_set_link 718// __mac_get_proc 719// __mac_set_proc 720// __mac_get_fd 721// __mac_set_fd 722// __mac_get_pid 723// __mac_get_lcid 724// __mac_get_lctx 725// __mac_set_lctx 726// Setlcid 727// Read_nocancel 728// Write_nocancel 729// Open_nocancel 730// Close_nocancel 731// Wait4_nocancel 732// Recvmsg_nocancel 733// Sendmsg_nocancel 734// Recvfrom_nocancel 735// Accept_nocancel 736// Fcntl_nocancel 737// Select_nocancel 738// Fsync_nocancel 739// Connect_nocancel 740// Sigsuspend_nocancel 741// Readv_nocancel 742// Writev_nocancel 743// Sendto_nocancel 744// Pread_nocancel 745// Pwrite_nocancel 746// Waitid_nocancel 747// Poll_nocancel 748// Msgsnd_nocancel 749// Msgrcv_nocancel 750// Sem_wait_nocancel 751// Aio_suspend_nocancel 752// __sigwait_nocancel 753// __semwait_signal_nocancel 754// __mac_mount 755// __mac_get_mount 756// __mac_getfsstat 757