You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

770 lines
20 KiB

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