syscall_darwin.go 18 KB

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