Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

39 строки
840 B

  1. // Copyright 2013 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 arm && netbsd
  5. // +build arm,netbsd
  6. package unix
  7. func setTimespec(sec, nsec int64) Timespec {
  8. return Timespec{Sec: sec, Nsec: int32(nsec)}
  9. }
  10. func setTimeval(sec, usec int64) Timeval {
  11. return Timeval{Sec: sec, Usec: int32(usec)}
  12. }
  13. func SetKevent(k *Kevent_t, fd, mode, flags int) {
  14. k.Ident = uint32(fd)
  15. k.Filter = uint32(mode)
  16. k.Flags = uint32(flags)
  17. }
  18. func (iov *Iovec) SetLen(length int) {
  19. iov.Len = uint32(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 = int32(length)
  26. }
  27. func (cmsg *Cmsghdr) SetLen(length int) {
  28. cmsg.Len = uint32(length)
  29. }