github.com/LanceLRQ/deer-common@v0.0.9-0.20210319081233-e8222ac018a8/sandbox/forkexec/zsyscall_linux.go (about)

     1  // mksyscall.pl -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go
     2  // Code generated by the command above; DO NOT EDIT.
     3  
     4  // +build linux,amd64
     5  
     6  package forkexec
     7  
     8  import (
     9  	"syscall"
    10  	"unsafe"
    11  )
    12  
    13  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    14  
    15  func pipe2(p *[2]_C_int, flags int) (err error) {
    16  	_, _, e1 := syscall.RawSyscall(syscall.SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
    17  	if e1 != 0 {
    18  		err = errnoErr(e1)
    19  	}
    20  	return
    21  }
    22  
    23  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    24  
    25  func fcntl(fd int, cmd int, arg int) (val int, err error) {
    26  	r0, _, e1 := syscall.Syscall(syscall.SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
    27  	val = int(r0)
    28  	if e1 != 0 {
    29  		err = errnoErr(e1)
    30  	}
    31  	return
    32  }
    33  
    34  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    35  
    36  func readlen(fd int, p *byte, np int) (n int, err error) {
    37  	r0, _, e1 := syscall.Syscall(syscall.SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
    38  	n = int(r0)
    39  	if e1 != 0 {
    40  		err = errnoErr(e1)
    41  	}
    42  	return
    43  }