syscall_darwin.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693
  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. // Darwin 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 (
  13. "errors"
  14. "syscall"
  15. "unsafe"
  16. )
  17. const ImplementsGetwd = true
  18. func Getwd() (string, error) {
  19. buf := make([]byte, 2048)
  20. attrs, err := getAttrList(".", attrList{CommonAttr: attrCmnFullpath}, buf, 0)
  21. if err == nil && len(attrs) == 1 && len(attrs[0]) >= 2 {
  22. wd := string(attrs[0])
  23. // Sanity check that it's an absolute path and ends
  24. // in a null byte, which we then strip.
  25. if wd[0] == '/' && wd[len(wd)-1] == 0 {
  26. return wd[:len(wd)-1], nil
  27. }
  28. }
  29. // If pkg/os/getwd.go gets ENOTSUP, it will fall back to the
  30. // slow algorithm.
  31. return "", ENOTSUP
  32. }
  33. // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
  34. type SockaddrDatalink struct {
  35. Len uint8
  36. Family uint8
  37. Index uint16
  38. Type uint8
  39. Nlen uint8
  40. Alen uint8
  41. Slen uint8
  42. Data [12]int8
  43. raw RawSockaddrDatalink
  44. }
  45. // Translate "kern.hostname" to []_C_int{0,1,2,3}.
  46. func nametomib(name string) (mib []_C_int, err error) {
  47. const siz = unsafe.Sizeof(mib[0])
  48. // NOTE(rsc): It seems strange to set the buffer to have
  49. // size CTL_MAXNAME+2 but use only CTL_MAXNAME
  50. // as the size. I don't know why the +2 is here, but the
  51. // kernel uses +2 for its own implementation of this function.
  52. // I am scared that if we don't include the +2 here, the kernel
  53. // will silently write 2 words farther than we specify
  54. // and we'll get memory corruption.
  55. var buf [CTL_MAXNAME + 2]_C_int
  56. n := uintptr(CTL_MAXNAME) * siz
  57. p := (*byte)(unsafe.Pointer(&buf[0]))
  58. bytes, err := ByteSliceFromString(name)
  59. if err != nil {
  60. return nil, err
  61. }
  62. // Magic sysctl: "setting" 0.3 to a string name
  63. // lets you read back the array of integers form.
  64. if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
  65. return nil, err
  66. }
  67. return buf[0 : n/siz], nil
  68. }
  69. //sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
  70. func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
  71. func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
  72. const (
  73. attrBitMapCount = 5
  74. attrCmnFullpath = 0x08000000
  75. )
  76. type attrList struct {
  77. bitmapCount uint16
  78. _ uint16
  79. CommonAttr uint32
  80. VolAttr uint32
  81. DirAttr uint32
  82. FileAttr uint32
  83. Forkattr uint32
  84. }
  85. func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (attrs [][]byte, err error) {
  86. if len(attrBuf) < 4 {
  87. return nil, errors.New("attrBuf too small")
  88. }
  89. attrList.bitmapCount = attrBitMapCount
  90. var _p0 *byte
  91. _p0, err = BytePtrFromString(path)
  92. if err != nil {
  93. return nil, err
  94. }
  95. _, _, e1 := Syscall6(
  96. SYS_GETATTRLIST,
  97. uintptr(unsafe.Pointer(_p0)),
  98. uintptr(unsafe.Pointer(&attrList)),
  99. uintptr(unsafe.Pointer(&attrBuf[0])),
  100. uintptr(len(attrBuf)),
  101. uintptr(options),
  102. 0,
  103. )
  104. if e1 != 0 {
  105. return nil, e1
  106. }
  107. size := *(*uint32)(unsafe.Pointer(&attrBuf[0]))
  108. // dat is the section of attrBuf that contains valid data,
  109. // without the 4 byte length header. All attribute offsets
  110. // are relative to dat.
  111. dat := attrBuf
  112. if int(size) < len(attrBuf) {
  113. dat = dat[:size]
  114. }
  115. dat = dat[4:] // remove length prefix
  116. for i := uint32(0); int(i) < len(dat); {
  117. header := dat[i:]
  118. if len(header) < 8 {
  119. return attrs, errors.New("truncated attribute header")
  120. }
  121. datOff := *(*int32)(unsafe.Pointer(&header[0]))
  122. attrLen := *(*uint32)(unsafe.Pointer(&header[4]))
  123. if datOff < 0 || uint32(datOff)+attrLen > uint32(len(dat)) {
  124. return attrs, errors.New("truncated results; attrBuf too small")
  125. }
  126. end := uint32(datOff) + attrLen
  127. attrs = append(attrs, dat[datOff:end])
  128. i = end
  129. if r := i % 4; r != 0 {
  130. i += (4 - r)
  131. }
  132. }
  133. return
  134. }
  135. //sysnb pipe() (r int, w int, err error)
  136. func Pipe(p []int) (err error) {
  137. if len(p) != 2 {
  138. return EINVAL
  139. }
  140. p[0], p[1], err = pipe()
  141. return
  142. }
  143. func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
  144. var _p0 unsafe.Pointer
  145. var bufsize uintptr
  146. if len(buf) > 0 {
  147. _p0 = unsafe.Pointer(&buf[0])
  148. bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
  149. }
  150. r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(_p0), bufsize, uintptr(flags))
  151. n = int(r0)
  152. if e1 != 0 {
  153. err = e1
  154. }
  155. return
  156. }
  157. func xattrPointer(dest []byte) *byte {
  158. // It's only when dest is set to NULL that the OS X implementations of
  159. // getxattr() and listxattr() return the current sizes of the named attributes.
  160. // An empty byte array is not sufficient. To maintain the same behaviour as the
  161. // linux implementation, we wrap around the system calls and pass in NULL when
  162. // dest is empty.
  163. var destp *byte
  164. if len(dest) > 0 {
  165. destp = &dest[0]
  166. }
  167. return destp
  168. }
  169. //sys getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error)
  170. func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
  171. return getxattr(path, attr, xattrPointer(dest), len(dest), 0, 0)
  172. }
  173. func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {
  174. return getxattr(link, attr, xattrPointer(dest), len(dest), 0, XATTR_NOFOLLOW)
  175. }
  176. //sys fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error)
  177. func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
  178. return fgetxattr(fd, attr, xattrPointer(dest), len(dest), 0, 0)
  179. }
  180. //sys setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error)
  181. func Setxattr(path string, attr string, data []byte, flags int) (err error) {
  182. // The parameters for the OS X implementation vary slightly compared to the
  183. // linux system call, specifically the position parameter:
  184. //
  185. // linux:
  186. // int setxattr(
  187. // const char *path,
  188. // const char *name,
  189. // const void *value,
  190. // size_t size,
  191. // int flags
  192. // );
  193. //
  194. // darwin:
  195. // int setxattr(
  196. // const char *path,
  197. // const char *name,
  198. // void *value,
  199. // size_t size,
  200. // u_int32_t position,
  201. // int options
  202. // );
  203. //
  204. // position specifies the offset within the extended attribute. In the
  205. // current implementation, only the resource fork extended attribute makes
  206. // use of this argument. For all others, position is reserved. We simply
  207. // default to setting it to zero.
  208. return setxattr(path, attr, xattrPointer(data), len(data), 0, flags)
  209. }
  210. func Lsetxattr(link string, attr string, data []byte, flags int) (err error) {
  211. return setxattr(link, attr, xattrPointer(data), len(data), 0, flags|XATTR_NOFOLLOW)
  212. }
  213. //sys fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error)
  214. func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {
  215. return fsetxattr(fd, attr, xattrPointer(data), len(data), 0, 0)
  216. }
  217. //sys removexattr(path string, attr string, options int) (err error)
  218. func Removexattr(path string, attr string) (err error) {
  219. // We wrap around and explicitly zero out the options provided to the OS X
  220. // implementation of removexattr, we do so for interoperability with the
  221. // linux variant.
  222. return removexattr(path, attr, 0)
  223. }
  224. func Lremovexattr(link string, attr string) (err error) {
  225. return removexattr(link, attr, XATTR_NOFOLLOW)
  226. }
  227. //sys fremovexattr(fd int, attr string, options int) (err error)
  228. func Fremovexattr(fd int, attr string) (err error) {
  229. return fremovexattr(fd, attr, 0)
  230. }
  231. //sys listxattr(path string, dest *byte, size int, options int) (sz int, err error)
  232. func Listxattr(path string, dest []byte) (sz int, err error) {
  233. return listxattr(path, xattrPointer(dest), len(dest), 0)
  234. }
  235. func Llistxattr(link string, dest []byte) (sz int, err error) {
  236. return listxattr(link, xattrPointer(dest), len(dest), XATTR_NOFOLLOW)
  237. }
  238. //sys flistxattr(fd int, dest *byte, size int, options int) (sz int, err error)
  239. func Flistxattr(fd int, dest []byte) (sz int, err error) {
  240. return flistxattr(fd, xattrPointer(dest), len(dest), 0)
  241. }
  242. func setattrlistTimes(path string, times []Timespec, flags int) error {
  243. _p0, err := BytePtrFromString(path)
  244. if err != nil {
  245. return err
  246. }
  247. var attrList attrList
  248. attrList.bitmapCount = ATTR_BIT_MAP_COUNT
  249. attrList.CommonAttr = ATTR_CMN_MODTIME | ATTR_CMN_ACCTIME
  250. // order is mtime, atime: the opposite of Chtimes
  251. attributes := [2]Timespec{times[1], times[0]}
  252. options := 0
  253. if flags&AT_SYMLINK_NOFOLLOW != 0 {
  254. options |= FSOPT_NOFOLLOW
  255. }
  256. _, _, e1 := Syscall6(
  257. SYS_SETATTRLIST,
  258. uintptr(unsafe.Pointer(_p0)),
  259. uintptr(unsafe.Pointer(&attrList)),
  260. uintptr(unsafe.Pointer(&attributes)),
  261. uintptr(unsafe.Sizeof(attributes)),
  262. uintptr(options),
  263. 0,
  264. )
  265. if e1 != 0 {
  266. return e1
  267. }
  268. return nil
  269. }
  270. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
  271. // Darwin doesn't support SYS_UTIMENSAT
  272. return ENOSYS
  273. }
  274. /*
  275. * Wrapped
  276. */
  277. //sys kill(pid int, signum int, posix int) (err error)
  278. func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) }
  279. //sys ioctl(fd int, req uint, arg uintptr) (err error)
  280. // ioctl itself should not be exposed directly, but additional get/set
  281. // functions for specific types are permissible.
  282. // IoctlSetInt performs an ioctl operation which sets an integer value
  283. // on fd, using the specified request number.
  284. func IoctlSetInt(fd int, req uint, value int) error {
  285. return ioctl(fd, req, uintptr(value))
  286. }
  287. func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
  288. return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
  289. }
  290. func ioctlSetTermios(fd int, req uint, value *Termios) error {
  291. return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
  292. }
  293. // IoctlGetInt performs an ioctl operation which gets an integer value
  294. // from fd, using the specified request number.
  295. func IoctlGetInt(fd int, req uint) (int, error) {
  296. var value int
  297. err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
  298. return value, err
  299. }
  300. func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
  301. var value Winsize
  302. err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
  303. return &value, err
  304. }
  305. func IoctlGetTermios(fd int, req uint) (*Termios, error) {
  306. var value Termios
  307. err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
  308. return &value, err
  309. }
  310. func Uname(uname *Utsname) error {
  311. mib := []_C_int{CTL_KERN, KERN_OSTYPE}
  312. n := unsafe.Sizeof(uname.Sysname)
  313. if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {
  314. return err
  315. }
  316. mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
  317. n = unsafe.Sizeof(uname.Nodename)
  318. if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {
  319. return err
  320. }
  321. mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
  322. n = unsafe.Sizeof(uname.Release)
  323. if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {
  324. return err
  325. }
  326. mib = []_C_int{CTL_KERN, KERN_VERSION}
  327. n = unsafe.Sizeof(uname.Version)
  328. if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
  329. return err
  330. }
  331. // The version might have newlines or tabs in it, convert them to
  332. // spaces.
  333. for i, b := range uname.Version {
  334. if b == '\n' || b == '\t' {
  335. if i == len(uname.Version)-1 {
  336. uname.Version[i] = 0
  337. } else {
  338. uname.Version[i] = ' '
  339. }
  340. }
  341. }
  342. mib = []_C_int{CTL_HW, HW_MACHINE}
  343. n = unsafe.Sizeof(uname.Machine)
  344. if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {
  345. return err
  346. }
  347. return nil
  348. }
  349. /*
  350. * Exposed directly
  351. */
  352. //sys Access(path string, mode uint32) (err error)
  353. //sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
  354. //sys Chdir(path string) (err error)
  355. //sys Chflags(path string, flags int) (err error)
  356. //sys Chmod(path string, mode uint32) (err error)
  357. //sys Chown(path string, uid int, gid int) (err error)
  358. //sys Chroot(path string) (err error)
  359. //sys Close(fd int) (err error)
  360. //sys Dup(fd int) (nfd int, err error)
  361. //sys Dup2(from int, to int) (err error)
  362. //sys Exchangedata(path1 string, path2 string, options int) (err error)
  363. //sys Exit(code int)
  364. //sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
  365. //sys Fchdir(fd int) (err error)
  366. //sys Fchflags(fd int, flags int) (err error)
  367. //sys Fchmod(fd int, mode uint32) (err error)
  368. //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
  369. //sys Fchown(fd int, uid int, gid int) (err error)
  370. //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
  371. //sys Flock(fd int, how int) (err error)
  372. //sys Fpathconf(fd int, name int) (val int, err error)
  373. //sys Fsync(fd int) (err error)
  374. //sys Ftruncate(fd int, length int64) (err error)
  375. //sys Getdtablesize() (size int)
  376. //sysnb Getegid() (egid int)
  377. //sysnb Geteuid() (uid int)
  378. //sysnb Getgid() (gid int)
  379. //sysnb Getpgid(pid int) (pgid int, err error)
  380. //sysnb Getpgrp() (pgrp int)
  381. //sysnb Getpid() (pid int)
  382. //sysnb Getppid() (ppid int)
  383. //sys Getpriority(which int, who int) (prio int, err error)
  384. //sysnb Getrlimit(which int, lim *Rlimit) (err error)
  385. //sysnb Getrusage(who int, rusage *Rusage) (err error)
  386. //sysnb Getsid(pid int) (sid int, err error)
  387. //sysnb Getuid() (uid int)
  388. //sysnb Issetugid() (tainted bool)
  389. //sys Kqueue() (fd int, err error)
  390. //sys Lchown(path string, uid int, gid int) (err error)
  391. //sys Link(path string, link string) (err error)
  392. //sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
  393. //sys Listen(s int, backlog int) (err error)
  394. //sys Mkdir(path string, mode uint32) (err error)
  395. //sys Mkdirat(dirfd int, path string, mode uint32) (err error)
  396. //sys Mkfifo(path string, mode uint32) (err error)
  397. //sys Mknod(path string, mode uint32, dev int) (err error)
  398. //sys Open(path string, mode int, perm uint32) (fd int, err error)
  399. //sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
  400. //sys Pathconf(path string, name int) (val int, err error)
  401. //sys Pread(fd int, p []byte, offset int64) (n int, err error)
  402. //sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
  403. //sys read(fd int, p []byte) (n int, err error)
  404. //sys Readlink(path string, buf []byte) (n int, err error)
  405. //sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
  406. //sys Rename(from string, to string) (err error)
  407. //sys Renameat(fromfd int, from string, tofd int, to string) (err error)
  408. //sys Revoke(path string) (err error)
  409. //sys Rmdir(path string) (err error)
  410. //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
  411. //sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
  412. //sys Setegid(egid int) (err error)
  413. //sysnb Seteuid(euid int) (err error)
  414. //sysnb Setgid(gid int) (err error)
  415. //sys Setlogin(name string) (err error)
  416. //sysnb Setpgid(pid int, pgid int) (err error)
  417. //sys Setpriority(which int, who int, prio int) (err error)
  418. //sys Setprivexec(flag int) (err error)
  419. //sysnb Setregid(rgid int, egid int) (err error)
  420. //sysnb Setreuid(ruid int, euid int) (err error)
  421. //sysnb Setrlimit(which int, lim *Rlimit) (err error)
  422. //sysnb Setsid() (pid int, err error)
  423. //sysnb Settimeofday(tp *Timeval) (err error)
  424. //sysnb Setuid(uid int) (err error)
  425. //sys Symlink(path string, link string) (err error)
  426. //sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
  427. //sys Sync() (err error)
  428. //sys Truncate(path string, length int64) (err error)
  429. //sys Umask(newmask int) (oldmask int)
  430. //sys Undelete(path string) (err error)
  431. //sys Unlink(path string) (err error)
  432. //sys Unlinkat(dirfd int, path string, flags int) (err error)
  433. //sys Unmount(path string, flags int) (err error)
  434. //sys write(fd int, p []byte) (n int, err error)
  435. //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
  436. //sys munmap(addr uintptr, length uintptr) (err error)
  437. //sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
  438. //sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
  439. /*
  440. * Unimplemented
  441. */
  442. // Profil
  443. // Sigaction
  444. // Sigprocmask
  445. // Getlogin
  446. // Sigpending
  447. // Sigaltstack
  448. // Ioctl
  449. // Reboot
  450. // Execve
  451. // Vfork
  452. // Sbrk
  453. // Sstk
  454. // Ovadvise
  455. // Mincore
  456. // Setitimer
  457. // Swapon
  458. // Select
  459. // Sigsuspend
  460. // Readv
  461. // Writev
  462. // Nfssvc
  463. // Getfh
  464. // Quotactl
  465. // Mount
  466. // Csops
  467. // Waitid
  468. // Add_profil
  469. // Kdebug_trace
  470. // Sigreturn
  471. // Atsocket
  472. // Kqueue_from_portset_np
  473. // Kqueue_portset
  474. // Getattrlist
  475. // Setattrlist
  476. // Getdirentriesattr
  477. // Searchfs
  478. // Delete
  479. // Copyfile
  480. // Watchevent
  481. // Waitevent
  482. // Modwatch
  483. // Fsctl
  484. // Initgroups
  485. // Posix_spawn
  486. // Nfsclnt
  487. // Fhopen
  488. // Minherit
  489. // Semsys
  490. // Msgsys
  491. // Shmsys
  492. // Semctl
  493. // Semget
  494. // Semop
  495. // Msgctl
  496. // Msgget
  497. // Msgsnd
  498. // Msgrcv
  499. // Shmat
  500. // Shmctl
  501. // Shmdt
  502. // Shmget
  503. // Shm_open
  504. // Shm_unlink
  505. // Sem_open
  506. // Sem_close
  507. // Sem_unlink
  508. // Sem_wait
  509. // Sem_trywait
  510. // Sem_post
  511. // Sem_getvalue
  512. // Sem_init
  513. // Sem_destroy
  514. // Open_extended
  515. // Umask_extended
  516. // Stat_extended
  517. // Lstat_extended
  518. // Fstat_extended
  519. // Chmod_extended
  520. // Fchmod_extended
  521. // Access_extended
  522. // Settid
  523. // Gettid
  524. // Setsgroups
  525. // Getsgroups
  526. // Setwgroups
  527. // Getwgroups
  528. // Mkfifo_extended
  529. // Mkdir_extended
  530. // Identitysvc
  531. // Shared_region_check_np
  532. // Shared_region_map_np
  533. // __pthread_mutex_destroy
  534. // __pthread_mutex_init
  535. // __pthread_mutex_lock
  536. // __pthread_mutex_trylock
  537. // __pthread_mutex_unlock
  538. // __pthread_cond_init
  539. // __pthread_cond_destroy
  540. // __pthread_cond_broadcast
  541. // __pthread_cond_signal
  542. // Setsid_with_pid
  543. // __pthread_cond_timedwait
  544. // Aio_fsync
  545. // Aio_return
  546. // Aio_suspend
  547. // Aio_cancel
  548. // Aio_error
  549. // Aio_read
  550. // Aio_write
  551. // Lio_listio
  552. // __pthread_cond_wait
  553. // Iopolicysys
  554. // __pthread_kill
  555. // __pthread_sigmask
  556. // __sigwait
  557. // __disable_threadsignal
  558. // __pthread_markcancel
  559. // __pthread_canceled
  560. // __semwait_signal
  561. // Proc_info
  562. // sendfile
  563. // Stat64_extended
  564. // Lstat64_extended
  565. // Fstat64_extended
  566. // __pthread_chdir
  567. // __pthread_fchdir
  568. // Audit
  569. // Auditon
  570. // Getauid
  571. // Setauid
  572. // Getaudit
  573. // Setaudit
  574. // Getaudit_addr
  575. // Setaudit_addr
  576. // Auditctl
  577. // Bsdthread_create
  578. // Bsdthread_terminate
  579. // Stack_snapshot
  580. // Bsdthread_register
  581. // Workq_open
  582. // Workq_ops
  583. // __mac_execve
  584. // __mac_syscall
  585. // __mac_get_file
  586. // __mac_set_file
  587. // __mac_get_link
  588. // __mac_set_link
  589. // __mac_get_proc
  590. // __mac_set_proc
  591. // __mac_get_fd
  592. // __mac_set_fd
  593. // __mac_get_pid
  594. // __mac_get_lcid
  595. // __mac_get_lctx
  596. // __mac_set_lctx
  597. // Setlcid
  598. // Read_nocancel
  599. // Write_nocancel
  600. // Open_nocancel
  601. // Close_nocancel
  602. // Wait4_nocancel
  603. // Recvmsg_nocancel
  604. // Sendmsg_nocancel
  605. // Recvfrom_nocancel
  606. // Accept_nocancel
  607. // Fcntl_nocancel
  608. // Select_nocancel
  609. // Fsync_nocancel
  610. // Connect_nocancel
  611. // Sigsuspend_nocancel
  612. // Readv_nocancel
  613. // Writev_nocancel
  614. // Sendto_nocancel
  615. // Pread_nocancel
  616. // Pwrite_nocancel
  617. // Waitid_nocancel
  618. // Poll_nocancel
  619. // Msgsnd_nocancel
  620. // Msgrcv_nocancel
  621. // Sem_wait_nocancel
  622. // Aio_suspend_nocancel
  623. // __sigwait_nocancel
  624. // __semwait_signal_nocancel
  625. // __mac_mount
  626. // __mac_get_mount
  627. // __mac_getfsstat