syscall_aix_ppc64.go 932 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 ppc64
  6. package unix
  7. //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
  8. //sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
  9. //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek
  10. //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64
  11. func setTimespec(sec, nsec int64) Timespec {
  12. return Timespec{Sec: sec, Nsec: nsec}
  13. }
  14. func setTimeval(sec, usec int64) Timeval {
  15. return Timeval{Sec: int64(sec), Usec: int32(usec)}
  16. }
  17. func (iov *Iovec) SetLen(length int) {
  18. iov.Len = uint64(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. }