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

syscall_darwin_arm.go 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Copyright 2015 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. package unix
  5. import (
  6. "syscall"
  7. )
  8. func ptrace(request int, pid int, addr uintptr, data uintptr) error {
  9. return ENOTSUP
  10. }
  11. func setTimespec(sec, nsec int64) Timespec {
  12. return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
  13. }
  14. func setTimeval(sec, usec int64) Timeval {
  15. return Timeval{Sec: int32(sec), Usec: int32(usec)}
  16. }
  17. func SetKevent(k *Kevent_t, fd, mode, flags int) {
  18. k.Ident = uint32(fd)
  19. k.Filter = int16(mode)
  20. k.Flags = uint16(flags)
  21. }
  22. func (iov *Iovec) SetLen(length int) {
  23. iov.Len = uint32(length)
  24. }
  25. func (msghdr *Msghdr) SetControllen(length int) {
  26. msghdr.Controllen = uint32(length)
  27. }
  28. func (msghdr *Msghdr) SetIovlen(length int) {
  29. msghdr.Iovlen = int32(length)
  30. }
  31. func (cmsg *Cmsghdr) SetLen(length int) {
  32. cmsg.Len = uint32(length)
  33. }
  34. func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
  35. //sys Fstat(fd int, stat *Stat_t) (err error)
  36. //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
  37. //sys Fstatfs(fd int, stat *Statfs_t) (err error)
  38. //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
  39. //sys Lstat(path string, stat *Stat_t) (err error)
  40. //sys Stat(path string, stat *Stat_t) (err error)
  41. //sys Statfs(path string, stat *Statfs_t) (err error)