github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/syscall/syscall_darwin.go (about)

     1  // Copyright 2009,2010 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  // Darwin system calls.
     6  // This file is compiled as ordinary Go code,
     7  // but it is also input to mksyscall,
     8  // which parses the //sys lines and generates system call stubs.
     9  // Note that sometimes we use a lowercase //sys name and wrap
    10  // it in our own nicer implementation, either here or in
    11  // syscall_bsd.go or syscall_unix.go.
    12  
    13  package syscall
    14  
    15  func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
    16  func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
    17  func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
    18  func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
    19  
    20  type SockaddrDatalink struct {
    21  	Len    uint8
    22  	Family uint8
    23  	Index  uint16
    24  	Type   uint8
    25  	Nlen   uint8
    26  	Alen   uint8
    27  	Slen   uint8
    28  	Data   [12]int8
    29  	raw    RawSockaddrDatalink
    30  }
    31  
    32  func PtraceAttach(pid int) (err error)
    33  func PtraceDetach(pid int) (err error)
    34  
    35  func Pipe(p []int) (err error)
    36  
    37  func Getfsstat(buf []Statfs_t, flags int) (n int, err error)
    38  
    39  func Kill(pid int, signum Signal) (err error)
    40  
    41  func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)