syscall_openbsd_mips64.mx raw

   1  // Copyright 2020 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  
   5  package syscall
   6  
   7  const (
   8  	_SYS_DUP3         = SYS_DUP3
   9  	_F_DUP2FD_CLOEXEC = 0
  10  )
  11  
  12  func setTimespec(sec, nsec int64) Timespec {
  13  	return Timespec{Sec: sec, Nsec: nsec}
  14  }
  15  
  16  func setTimeval(sec, usec int64) Timeval {
  17  	return Timeval{Sec: sec, Usec: usec}
  18  }
  19  
  20  func SetKevent(k *Kevent_t, fd, mode, flags int) {
  21  	k.Ident = uint64(fd)
  22  	k.Filter = int16(mode)
  23  	k.Flags = uint16(flags)
  24  }
  25  
  26  func (iov *Iovec) SetLen(length int) {
  27  	iov.Len = uint64(length)
  28  }
  29  
  30  func (msghdr *Msghdr) SetControllen(length int) {
  31  	msghdr.Controllen = uint32(length)
  32  }
  33  
  34  func (cmsg *Cmsghdr) SetLen(length int) {
  35  	cmsg.Len = uint32(length)
  36  }
  37  
  38  // RTM_LOCK only exists in OpenBSD 6.3 and earlier.
  39  const RTM_LOCK = 0x8
  40  
  41  // SYS___SYSCTL only exists in OpenBSD 5.8 and earlier, when it was
  42  // was renamed to SYS_SYSCTL.
  43  const SYS___SYSCTL = SYS_SYSCTL
  44