syscall_darwin.go 20 KB

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