syscall_aix_ppc.go 965 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2018 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. // +build aix
  5. // +build ppc
  6. package unix
  7. //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
  8. //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64
  9. //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
  10. //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
  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 (iov *Iovec) SetLen(length int) {
  18. iov.Len = uint32(length)
  19. }
  20. func (msghdr *Msghdr) SetControllen(length int) {
  21. msghdr.Controllen = uint32(length)
  22. }
  23. func (cmsg *Cmsghdr) SetLen(length int) {
  24. cmsg.Len = uint32(length)
  25. }