syscall_netbsd_arm64.go 730 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2019 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 arm64,netbsd
  5. package unix
  6. func setTimespec(sec, nsec int64) Timespec {
  7. return Timespec{Sec: sec, Nsec: nsec}
  8. }
  9. func setTimeval(sec, usec int64) Timeval {
  10. return Timeval{Sec: sec, Usec: int32(usec)}
  11. }
  12. func SetKevent(k *Kevent_t, fd, mode, flags int) {
  13. k.Ident = uint64(fd)
  14. k.Filter = uint32(mode)
  15. k.Flags = uint32(flags)
  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. }