25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

43 satır
1014 B

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