Source file src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go

     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  // +build amd64,darwin
     7  
     8  package unix
     9  
    10  import "syscall"
    11  
    12  func setTimespec(sec, nsec int64) Timespec {
    13  	return Timespec{Sec: sec, Nsec: nsec}
    14  }
    15  
    16  func setTimeval(sec, usec int64) Timeval {
    17  	return Timeval{Sec: sec, Usec: int32(usec)}
    18  }
    19  
    20  func SetKevent(k *Kevent_t, fd, mode, flags int) {
    21  	k.Ident = uint64(fd)
    22  	k.Filter = int16(mode)
    23  	k.Flags = uint16(flags)
    24  }
    25  
    26  func (iov *Iovec) SetLen(length int) {
    27  	iov.Len = uint64(length)
    28  }
    29  
    30  func (msghdr *Msghdr) SetControllen(length int) {
    31  	msghdr.Controllen = uint32(length)
    32  }
    33  
    34  func (msghdr *Msghdr) SetIovlen(length int) {
    35  	msghdr.Iovlen = int32(length)
    36  }
    37  
    38  func (cmsg *Cmsghdr) SetLen(length int) {
    39  	cmsg.Len = uint32(length)
    40  }
    41  
    42  func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
    43  
    44  //sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
    45  //sys	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
    46  //sys	Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
    47  //sys	getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
    48  //sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
    49  //sys	ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
    50  //sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
    51  //sys	Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
    52  

View as plain text