...
Source file src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
1
2
3
4
5
6
7 package unix
8
9 import (
10 "syscall"
11 )
12
13 func setTimespec(sec, nsec int64) Timespec {
14 return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
15 }
16
17 func setTimeval(sec, usec int64) Timeval {
18 return Timeval{Sec: int32(sec), Usec: int32(usec)}
19 }
20
21
22 func Gettimeofday(tv *Timeval) (err error) {
23
24
25
26 sec, usec, err := gettimeofday(tv)
27 tv.Sec = int32(sec)
28 tv.Usec = int32(usec)
29 return err
30 }
31
32 func SetKevent(k *Kevent_t, fd, mode, flags int) {
33 k.Ident = uint32(fd)
34 k.Filter = int16(mode)
35 k.Flags = uint16(flags)
36 }
37
38 func (iov *Iovec) SetLen(length int) {
39 iov.Len = uint32(length)
40 }
41
42 func (msghdr *Msghdr) SetControllen(length int) {
43 msghdr.Controllen = uint32(length)
44 }
45
46 func (cmsg *Cmsghdr) SetLen(length int) {
47 cmsg.Len = uint32(length)
48 }
49
50 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
51
52
53
54 const SYS___SYSCTL = SYS_SYSCTL
55
56
57
58
59
60
61
62
63
64
View as plain text