syscall_openbsd_arm.go 735 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2017 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 arm,openbsd
  5. package unix
  6. func setTimespec(sec, nsec int64) Timespec {
  7. return Timespec{Sec: sec, Nsec: int32(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 = uint32(fd)
  14. k.Filter = int16(mode)
  15. k.Flags = uint16(flags)
  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. }