syscall_openbsd_mips64.go 874 B

1234567891011121314151617181920212223242526272829303132333435
  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. package unix
  5. func setTimespec(sec, nsec int64) Timespec {
  6. return Timespec{Sec: sec, Nsec: nsec}
  7. }
  8. func setTimeval(sec, usec int64) Timeval {
  9. return Timeval{Sec: sec, Usec: usec}
  10. }
  11. func SetKevent(k *Kevent_t, fd, mode, flags int) {
  12. k.Ident = uint64(fd)
  13. k.Filter = int16(mode)
  14. k.Flags = uint16(flags)
  15. }
  16. func (iov *Iovec) SetLen(length int) {
  17. iov.Len = uint64(length)
  18. }
  19. func (msghdr *Msghdr) SetControllen(length int) {
  20. msghdr.Controllen = uint32(length)
  21. }
  22. func (cmsg *Cmsghdr) SetLen(length int) {
  23. cmsg.Len = uint32(length)
  24. }
  25. // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
  26. // of OpenBSD the syscall is called sysctl instead of __sysctl.
  27. const SYS___SYSCTL = SYS_SYSCTL