aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go')
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go50
1 files changed, 50 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
new file mode 100644
index 0000000..0eaecf5
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
@@ -0,0 +1,50 @@
1// Copyright 2009 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//go:build amd64 && darwin
6
7package unix
8
9import "syscall"
10
11func setTimespec(sec, nsec int64) Timespec {
12 return Timespec{Sec: sec, Nsec: nsec}
13}
14
15func setTimeval(sec, usec int64) Timeval {
16 return Timeval{Sec: sec, Usec: int32(usec)}
17}
18
19func SetKevent(k *Kevent_t, fd, mode, flags int) {
20 k.Ident = uint64(fd)
21 k.Filter = int16(mode)
22 k.Flags = uint16(flags)
23}
24
25func (iov *Iovec) SetLen(length int) {
26 iov.Len = uint64(length)
27}
28
29func (msghdr *Msghdr) SetControllen(length int) {
30 msghdr.Controllen = uint32(length)
31}
32
33func (msghdr *Msghdr) SetIovlen(length int) {
34 msghdr.Iovlen = int32(length)
35}
36
37func (cmsg *Cmsghdr) SetLen(length int) {
38 cmsg.Len = uint32(length)
39}
40
41func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
42
43//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
44//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
45//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
46//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
47//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
48//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
49//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
50//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64