A lightweight mechanism to provide an *instant kickstart* to a Go web server instance upon changing any Go source files under the project directory (and its subdirectories).

syscall_freebsd.go 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  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. func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
  92. var _p0 unsafe.Pointer
  93. var bufsize uintptr
  94. if len(buf) > 0 {
  95. _p0 = unsafe.Pointer(&buf[0])
  96. bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
  97. }
  98. r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
  99. n = int(r0)
  100. if e1 != 0 {
  101. err = e1
  102. }
  103. return
  104. }
  105. // Derive extattr namespace and attribute name
  106. func xattrnamespace(fullattr string) (ns int, attr string, err error) {
  107. s := -1
  108. for idx, val := range fullattr {
  109. if val == '.' {
  110. s = idx
  111. break
  112. }
  113. }
  114. if s == -1 {
  115. return -1, "", ENOATTR
  116. }
  117. namespace := fullattr[0:s]
  118. attr = fullattr[s+1:]
  119. switch namespace {
  120. case "user":
  121. return EXTATTR_NAMESPACE_USER, attr, nil
  122. case "system":
  123. return EXTATTR_NAMESPACE_SYSTEM, attr, nil
  124. default:
  125. return -1, "", ENOATTR
  126. }
  127. }
  128. func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) {
  129. if len(dest) > idx {
  130. return unsafe.Pointer(&dest[idx])
  131. } else {
  132. return unsafe.Pointer(_zero)
  133. }
  134. }
  135. // FreeBSD implements its own syscalls to handle extended attributes
  136. func Getxattr(file string, attr string, dest []byte) (sz int, err error) {
  137. d := initxattrdest(dest, 0)
  138. destsize := len(dest)
  139. nsid, a, err := xattrnamespace(attr)
  140. if err != nil {
  141. return -1, err
  142. }
  143. return ExtattrGetFile(file, nsid, a, uintptr(d), destsize)
  144. }
  145. func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
  146. d := initxattrdest(dest, 0)
  147. destsize := len(dest)
  148. nsid, a, err := xattrnamespace(attr)
  149. if err != nil {
  150. return -1, err
  151. }
  152. return ExtattrGetFd(fd, nsid, a, uintptr(d), destsize)
  153. }
  154. func Lgetxattr(link 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 ExtattrGetLink(link, nsid, a, uintptr(d), destsize)
  162. }
  163. // flags are unused on FreeBSD
  164. func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {
  165. d := unsafe.Pointer(&data[0])
  166. datasiz := len(data)
  167. nsid, a, err := xattrnamespace(attr)
  168. if err != nil {
  169. return
  170. }
  171. _, err = ExtattrSetFd(fd, nsid, a, uintptr(d), datasiz)
  172. return
  173. }
  174. func Setxattr(file string, attr string, data []byte, flags int) (err error) {
  175. d := unsafe.Pointer(&data[0])
  176. datasiz := len(data)
  177. nsid, a, err := xattrnamespace(attr)
  178. if err != nil {
  179. return
  180. }
  181. _, err = ExtattrSetFile(file, nsid, a, uintptr(d), datasiz)
  182. return
  183. }
  184. func Lsetxattr(link string, attr string, data []byte, flags int) (err error) {
  185. d := unsafe.Pointer(&data[0])
  186. datasiz := len(data)
  187. nsid, a, err := xattrnamespace(attr)
  188. if err != nil {
  189. return
  190. }
  191. _, err = ExtattrSetLink(link, nsid, a, uintptr(d), datasiz)
  192. return
  193. }
  194. func Removexattr(file string, attr string) (err error) {
  195. nsid, a, err := xattrnamespace(attr)
  196. if err != nil {
  197. return
  198. }
  199. err = ExtattrDeleteFile(file, nsid, a)
  200. return
  201. }
  202. func Fremovexattr(fd int, attr string) (err error) {
  203. nsid, a, err := xattrnamespace(attr)
  204. if err != nil {
  205. return
  206. }
  207. err = ExtattrDeleteFd(fd, nsid, a)
  208. return
  209. }
  210. func Lremovexattr(link string, attr string) (err error) {
  211. nsid, a, err := xattrnamespace(attr)
  212. if err != nil {
  213. return
  214. }
  215. err = ExtattrDeleteLink(link, nsid, a)
  216. return
  217. }
  218. func Listxattr(file string, dest []byte) (sz int, err error) {
  219. d := initxattrdest(dest, 0)
  220. destsiz := len(dest)
  221. // FreeBSD won't allow you to list xattrs from multiple namespaces
  222. s := 0
  223. var e error
  224. for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
  225. stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
  226. /* Errors accessing system attrs are ignored so that
  227. * we can implement the Linux-like behavior of omitting errors that
  228. * we don't have read permissions on
  229. *
  230. * Linux will still error if we ask for user attributes on a file that
  231. * we don't have read permissions on, so don't ignore those errors
  232. */
  233. if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
  234. e = nil
  235. continue
  236. } else if e != nil {
  237. return s, e
  238. }
  239. s += stmp
  240. destsiz -= s
  241. if destsiz < 0 {
  242. destsiz = 0
  243. }
  244. d = initxattrdest(dest, s)
  245. }
  246. return s, e
  247. }
  248. func Flistxattr(fd int, dest []byte) (sz int, err error) {
  249. d := initxattrdest(dest, 0)
  250. destsiz := len(dest)
  251. s := 0
  252. var e error
  253. for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
  254. stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
  255. if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
  256. e = nil
  257. continue
  258. } else if e != nil {
  259. return s, e
  260. }
  261. s += stmp
  262. destsiz -= s
  263. if destsiz < 0 {
  264. destsiz = 0
  265. }
  266. d = initxattrdest(dest, s)
  267. }
  268. return s, e
  269. }
  270. func Llistxattr(link string, dest []byte) (sz int, err error) {
  271. d := initxattrdest(dest, 0)
  272. destsiz := len(dest)
  273. s := 0
  274. var e error
  275. for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
  276. stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
  277. if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
  278. e = nil
  279. continue
  280. } else if e != nil {
  281. return s, e
  282. }
  283. s += stmp
  284. destsiz -= s
  285. if destsiz < 0 {
  286. destsiz = 0
  287. }
  288. d = initxattrdest(dest, s)
  289. }
  290. return s, e
  291. }
  292. /*
  293. * Exposed directly
  294. */
  295. //sys Access(path string, mode uint32) (err error)
  296. //sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
  297. //sys Chdir(path string) (err error)
  298. //sys Chflags(path string, flags int) (err error)
  299. //sys Chmod(path string, mode uint32) (err error)
  300. //sys Chown(path string, uid int, gid int) (err error)
  301. //sys Chroot(path string) (err error)
  302. //sys Close(fd int) (err error)
  303. //sys Dup(fd int) (nfd int, err error)
  304. //sys Dup2(from int, to int) (err error)
  305. //sys Exit(code int)
  306. //sys ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
  307. //sys ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
  308. //sys ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error)
  309. //sys ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
  310. //sys ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
  311. //sys ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
  312. //sys ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error)
  313. //sys ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
  314. //sys ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
  315. //sys ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
  316. //sys ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error)
  317. //sys ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
  318. //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE
  319. //sys Fchdir(fd int) (err error)
  320. //sys Fchflags(fd int, flags int) (err error)
  321. //sys Fchmod(fd int, mode uint32) (err error)
  322. //sys Fchown(fd int, uid int, gid int) (err error)
  323. //sys Flock(fd int, how int) (err error)
  324. //sys Fpathconf(fd int, name int) (val int, err error)
  325. //sys Fstat(fd int, stat *Stat_t) (err error)
  326. //sys Fstatfs(fd int, stat *Statfs_t) (err error)
  327. //sys Fsync(fd int) (err error)
  328. //sys Ftruncate(fd int, length int64) (err error)
  329. //sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
  330. //sys Getdtablesize() (size int)
  331. //sysnb Getegid() (egid int)
  332. //sysnb Geteuid() (uid int)
  333. //sysnb Getgid() (gid int)
  334. //sysnb Getpgid(pid int) (pgid int, err error)
  335. //sysnb Getpgrp() (pgrp int)
  336. //sysnb Getpid() (pid int)
  337. //sysnb Getppid() (ppid int)
  338. //sys Getpriority(which int, who int) (prio int, err error)
  339. //sysnb Getrlimit(which int, lim *Rlimit) (err error)
  340. //sysnb Getrusage(who int, rusage *Rusage) (err error)
  341. //sysnb Getsid(pid int) (sid int, err error)
  342. //sysnb Gettimeofday(tv *Timeval) (err error)
  343. //sysnb Getuid() (uid int)
  344. //sys Issetugid() (tainted bool)
  345. //sys Kill(pid int, signum syscall.Signal) (err error)
  346. //sys Kqueue() (fd int, err error)
  347. //sys Lchown(path string, uid int, gid int) (err error)
  348. //sys Link(path string, link string) (err error)
  349. //sys Listen(s int, backlog int) (err error)
  350. //sys Lstat(path string, stat *Stat_t) (err error)
  351. //sys Mkdir(path string, mode uint32) (err error)
  352. //sys Mkfifo(path string, mode uint32) (err error)
  353. //sys Mknod(path string, mode uint32, dev int) (err error)
  354. //sys Mlock(b []byte) (err error)
  355. //sys Mlockall(flags int) (err error)
  356. //sys Mprotect(b []byte, prot int) (err error)
  357. //sys Munlock(b []byte) (err error)
  358. //sys Munlockall() (err error)
  359. //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
  360. //sys Open(path string, mode int, perm uint32) (fd int, err error)
  361. //sys Pathconf(path string, name int) (val int, err error)
  362. //sys Pread(fd int, p []byte, offset int64) (n int, err error)
  363. //sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
  364. //sys read(fd int, p []byte) (n int, err error)
  365. //sys Readlink(path string, buf []byte) (n int, err error)
  366. //sys Rename(from string, to string) (err error)
  367. //sys Revoke(path string) (err error)
  368. //sys Rmdir(path string) (err error)
  369. //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
  370. //sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
  371. //sysnb Setegid(egid int) (err error)
  372. //sysnb Seteuid(euid int) (err error)
  373. //sysnb Setgid(gid int) (err error)
  374. //sys Setlogin(name string) (err error)
  375. //sysnb Setpgid(pid int, pgid int) (err error)
  376. //sys Setpriority(which int, who int, prio int) (err error)
  377. //sysnb Setregid(rgid int, egid int) (err error)
  378. //sysnb Setreuid(ruid int, euid int) (err error)
  379. //sysnb Setresgid(rgid int, egid int, sgid int) (err error)
  380. //sysnb Setresuid(ruid int, euid int, suid int) (err error)
  381. //sysnb Setrlimit(which int, lim *Rlimit) (err error)
  382. //sysnb Setsid() (pid int, err error)
  383. //sysnb Settimeofday(tp *Timeval) (err error)
  384. //sysnb Setuid(uid int) (err error)
  385. //sys Stat(path string, stat *Stat_t) (err error)
  386. //sys Statfs(path string, stat *Statfs_t) (err error)
  387. //sys Symlink(path string, link string) (err error)
  388. //sys Sync() (err error)
  389. //sys Truncate(path string, length int64) (err error)
  390. //sys Umask(newmask int) (oldmask int)
  391. //sys Undelete(path string) (err error)
  392. //sys Unlink(path string) (err error)
  393. //sys Unmount(path string, flags int) (err error)
  394. //sys write(fd int, p []byte) (n int, err error)
  395. //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
  396. //sys munmap(addr uintptr, length uintptr) (err error)
  397. //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
  398. //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
  399. //sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
  400. /*
  401. * Unimplemented
  402. */
  403. // Profil
  404. // Sigaction
  405. // Sigprocmask
  406. // Getlogin
  407. // Sigpending
  408. // Sigaltstack
  409. // Ioctl
  410. // Reboot
  411. // Execve
  412. // Vfork
  413. // Sbrk
  414. // Sstk
  415. // Ovadvise
  416. // Mincore
  417. // Setitimer
  418. // Swapon
  419. // Select
  420. // Sigsuspend
  421. // Readv
  422. // Writev
  423. // Nfssvc
  424. // Getfh
  425. // Quotactl
  426. // Mount
  427. // Csops
  428. // Waitid
  429. // Add_profil
  430. // Kdebug_trace
  431. // Sigreturn
  432. // Mmap
  433. // Mlock
  434. // Munlock
  435. // Atsocket
  436. // Kqueue_from_portset_np
  437. // Kqueue_portset
  438. // Getattrlist
  439. // Setattrlist
  440. // Getdirentriesattr
  441. // Searchfs
  442. // Delete
  443. // Copyfile
  444. // Poll
  445. // Watchevent
  446. // Waitevent
  447. // Modwatch
  448. // Getxattr
  449. // Fgetxattr
  450. // Setxattr
  451. // Fsetxattr
  452. // Removexattr
  453. // Fremovexattr
  454. // Listxattr
  455. // Flistxattr
  456. // Fsctl
  457. // Initgroups
  458. // Posix_spawn
  459. // Nfsclnt
  460. // Fhopen
  461. // Minherit
  462. // Semsys
  463. // Msgsys
  464. // Shmsys
  465. // Semctl
  466. // Semget
  467. // Semop
  468. // Msgctl
  469. // Msgget
  470. // Msgsnd
  471. // Msgrcv
  472. // Shmat
  473. // Shmctl
  474. // Shmdt
  475. // Shmget
  476. // Shm_open
  477. // Shm_unlink
  478. // Sem_open
  479. // Sem_close
  480. // Sem_unlink
  481. // Sem_wait
  482. // Sem_trywait
  483. // Sem_post
  484. // Sem_getvalue
  485. // Sem_init
  486. // Sem_destroy
  487. // Open_extended
  488. // Umask_extended
  489. // Stat_extended
  490. // Lstat_extended
  491. // Fstat_extended
  492. // Chmod_extended
  493. // Fchmod_extended
  494. // Access_extended
  495. // Settid
  496. // Gettid
  497. // Setsgroups
  498. // Getsgroups
  499. // Setwgroups
  500. // Getwgroups
  501. // Mkfifo_extended
  502. // Mkdir_extended
  503. // Identitysvc
  504. // Shared_region_check_np
  505. // Shared_region_map_np
  506. // __pthread_mutex_destroy
  507. // __pthread_mutex_init
  508. // __pthread_mutex_lock
  509. // __pthread_mutex_trylock
  510. // __pthread_mutex_unlock
  511. // __pthread_cond_init
  512. // __pthread_cond_destroy
  513. // __pthread_cond_broadcast
  514. // __pthread_cond_signal
  515. // Setsid_with_pid
  516. // __pthread_cond_timedwait
  517. // Aio_fsync
  518. // Aio_return
  519. // Aio_suspend
  520. // Aio_cancel
  521. // Aio_error
  522. // Aio_read
  523. // Aio_write
  524. // Lio_listio
  525. // __pthread_cond_wait
  526. // Iopolicysys
  527. // Mlockall
  528. // Munlockall
  529. // __pthread_kill
  530. // __pthread_sigmask
  531. // __sigwait
  532. // __disable_threadsignal
  533. // __pthread_markcancel
  534. // __pthread_canceled
  535. // __semwait_signal
  536. // Proc_info
  537. // Stat64_extended
  538. // Lstat64_extended
  539. // Fstat64_extended
  540. // __pthread_chdir
  541. // __pthread_fchdir
  542. // Audit
  543. // Auditon
  544. // Getauid
  545. // Setauid
  546. // Getaudit
  547. // Setaudit
  548. // Getaudit_addr
  549. // Setaudit_addr
  550. // Auditctl
  551. // Bsdthread_create
  552. // Bsdthread_terminate
  553. // Stack_snapshot
  554. // Bsdthread_register
  555. // Workq_open
  556. // Workq_ops
  557. // __mac_execve
  558. // __mac_syscall
  559. // __mac_get_file
  560. // __mac_set_file
  561. // __mac_get_link
  562. // __mac_set_link
  563. // __mac_get_proc
  564. // __mac_set_proc
  565. // __mac_get_fd
  566. // __mac_set_fd
  567. // __mac_get_pid
  568. // __mac_get_lcid
  569. // __mac_get_lctx
  570. // __mac_set_lctx
  571. // Setlcid
  572. // Read_nocancel
  573. // Write_nocancel
  574. // Open_nocancel
  575. // Close_nocancel
  576. // Wait4_nocancel
  577. // Recvmsg_nocancel
  578. // Sendmsg_nocancel
  579. // Recvfrom_nocancel
  580. // Accept_nocancel
  581. // Msync_nocancel
  582. // Fcntl_nocancel
  583. // Select_nocancel
  584. // Fsync_nocancel
  585. // Connect_nocancel
  586. // Sigsuspend_nocancel
  587. // Readv_nocancel
  588. // Writev_nocancel
  589. // Sendto_nocancel
  590. // Pread_nocancel
  591. // Pwrite_nocancel
  592. // Waitid_nocancel
  593. // Poll_nocancel
  594. // Msgsnd_nocancel
  595. // Msgrcv_nocancel
  596. // Sem_wait_nocancel
  597. // Aio_suspend_nocancel
  598. // __sigwait_nocancel
  599. // __semwait_signal_nocancel
  600. // __mac_mount
  601. // __mac_get_mount
  602. // __mac_getfsstat