.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / sys@v0.0.0-20210124154548-22da62e12c0c / unix / syscall_darwin_arm.go
1 // Copyright 2015 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 unix
6
7 import "syscall"
8
9 func ptrace1(request int, pid int, addr uintptr, data uintptr) error {
10         return ENOTSUP
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 func SetKevent(k *Kevent_t, fd, mode, flags int) {
22         k.Ident = uint32(fd)
23         k.Filter = int16(mode)
24         k.Flags = uint16(flags)
25 }
26
27 func (iov *Iovec) SetLen(length int) {
28         iov.Len = uint32(length)
29 }
30
31 func (msghdr *Msghdr) SetControllen(length int) {
32         msghdr.Controllen = uint32(length)
33 }
34
35 func (msghdr *Msghdr) SetIovlen(length int) {
36         msghdr.Iovlen = int32(length)
37 }
38
39 func (cmsg *Cmsghdr) SetLen(length int) {
40         cmsg.Len = uint32(length)
41 }
42
43 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
44
45 //sys   Fstat(fd int, stat *Stat_t) (err error)
46 //sys   Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
47 //sys   Fstatfs(fd int, stat *Statfs_t) (err error)
48 //sys   getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
49 //sys   Lstat(path string, stat *Stat_t) (err error)
50 //sys   Stat(path string, stat *Stat_t) (err error)
51 //sys   Statfs(path string, stat *Statfs_t) (err error)