go/src/syscall/syscall_linux.go

//go:linkname runtime_entersyscall runtime.entersyscall
func runtime_entersyscall()

//go:linkname runtime_exitsyscall runtime.exitsyscall
func runtime_exitsyscall()

//go:uintptrkeepalive
//go:nosplit
//go:norace
//go:linkname RawSyscall
func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) {}

//go:uintptrkeepalive
//go:nosplit
//go:norace
//go:linkname RawSyscall6
func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) {}

//go:uintptrkeepalive
//go:nosplit
//go:linkname Syscall
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) {}

//go:uintptrkeepalive
//go:nosplit
//go:linkname Syscall6
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) {}

func rawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)

func rawVforkSyscall(trap, a1, a2, a3 uintptr) (r1 uintptr, err Errno)

func Access(path string, mode uint32) (err error) {}

func Chmod(path string, mode uint32) (err error) {}

func Chown(path string, uid int, gid int) (err error) {}

func Creat(path string, mode uint32) (fd int, err error) {}

func EpollCreate(size int) (fd int, err error) {}

func isGroupMember(gid int) bool {}

func isCapDacOverrideSet() bool {}

func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {}

func Fchmodat(dirfd int, path string, mode uint32, flags int) error {}

func Link(oldpath string, newpath string) (err error) {}

func Mkdir(path string, mode uint32) (err error) {}

func Mknod(path string, mode uint32, dev int) (err error) {}

func Open(path string, mode int, perm uint32) (fd int, err error) {}

func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {}

func Pipe(p []int) error {}

func Pipe2(p []int, flags int) error {}

func Readlink(path string, buf []byte) (n int, err error) {}

func Rename(oldpath string, newpath string) (err error) {}

func Rmdir(path string) error {}

func Symlink(oldpath string, newpath string) (err error) {}

func Unlink(path string) error {}

func Unlinkat(dirfd int, path string) error {}

func Utimes(path string, tv []Timeval) (err error) {}

func UtimesNano(path string, ts []Timespec) (err error) {}

func Futimesat(dirfd int, path string, tv []Timeval) (err error) {}

func Futimes(fd int, tv []Timeval) (err error) {}

const ImplementsGetwd

func Getwd() (wd string, err error) {}

func Getgroups() (gids []int, err error) {}

var cgo_libc_setgroups

func Setgroups(gids []int) (err error) {}

type WaitStatus

const mask

const core

const exited

const stopped

const shift

func (w WaitStatus) Exited() bool {}

func (w WaitStatus) Signaled() bool {}

func (w WaitStatus) Stopped() bool {}

func (w WaitStatus) Continued() bool {}

func (w WaitStatus) CoreDump() bool {}

func (w WaitStatus) ExitStatus() int {}

func (w WaitStatus) Signal() Signal {}

func (w WaitStatus) StopSignal() Signal {}

func (w WaitStatus) TrapCause() int {}

func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {}

func Mkfifo(path string, mode uint32) (err error) {}

func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {}

func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {}

func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {}

type SockaddrLinklayer

func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {}

type SockaddrNetlink

func (sa *SockaddrNetlink) sockaddr() (unsafe.Pointer, _Socklen, error) {}

func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {}

func Accept(fd int) (nfd int, sa Sockaddr, err error) {}

func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {}

func Getsockname(fd int) (sa Sockaddr, err error) {}

func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {}

func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {}

func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {}

func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {}

func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {}

func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {}

func GetsockoptUcred(fd, level, opt int) (*Ucred, error) {}

func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {}

func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {}

func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {}

// BindToDevice binds the socket associated with fd to device.
func BindToDevice(fd int, device string) (err error) {}

func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err error) {}

func PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) {}

func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {}

func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (count int, err error) {}

func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {}

func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) {}

const _NT_PRSTATUS

func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {}

func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {}

func PtraceSetOptions(pid int, options int) (err error) {}

func PtraceGetEventMsg(pid int) (msg uint, err error) {}

func PtraceCont(pid int, signal int) (err error) {}

func PtraceSyscall(pid int, signal int) (err error) {}

func PtraceSingleStep(pid int) (err error) {}

func PtraceAttach(pid int) (err error) {}

func PtraceDetach(pid int) (err error) {}

func Reboot(cmd int) (err error) {}

func ReadDirent(fd int, buf []byte) (n int, err error) {}

func direntIno(buf []byte) (uint64, bool) {}

func direntReclen(buf []byte) (uint64, bool) {}

func direntNamlen(buf []byte) (uint64, bool) {}

func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) {}

func Getpgrp() (pid int) {}

// Provided by runtime.syscall_runtime_doAllThreadsSyscall which stops the
// world and invokes the syscall on each OS thread. Once this function returns,
// all threads are in sync.
//
//go:uintptrescapes
func runtime_doAllThreadsSyscall(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)

// AllThreadsSyscall performs a syscall on each OS thread of the Go
// runtime. It first invokes the syscall on one thread. Should that
// invocation fail, it returns immediately with the error status.
// Otherwise, it invokes the syscall on all of the remaining threads
// in parallel. It will terminate the program if it observes any
// invoked syscall's return value differs from that of the first
// invocation.
//
// AllThreadsSyscall is intended for emulating simultaneous
// process-wide state changes that require consistently modifying
// per-thread state of the Go runtime.
//
// AllThreadsSyscall is unaware of any threads that are launched
// explicitly by cgo linked code, so the function always returns
// [ENOTSUP] in binaries that use cgo.
//
//go:uintptrescapes
func AllThreadsSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) {}

// AllThreadsSyscall6 is like [AllThreadsSyscall], but extended to six
// arguments.
//
//go:uintptrescapes
func AllThreadsSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) {}

// linked by runtime.cgocall.go
//
//go:uintptrescapes
func cgocaller(unsafe.Pointer, ...uintptr) uintptr

var cgo_libc_setegid

const minus1

func Setegid(egid int) (err error) {}

var cgo_libc_seteuid

func Seteuid(euid int) (err error) {}

var cgo_libc_setgid

func Setgid(gid int) (err error) {}

var cgo_libc_setregid

func Setregid(rgid, egid int) (err error) {}

var cgo_libc_setresgid

func Setresgid(rgid, egid, sgid int) (err error) {}

var cgo_libc_setresuid

func Setresuid(ruid, euid, suid int) (err error) {}

var cgo_libc_setreuid

func Setreuid(ruid, euid int) (err error) {}

var cgo_libc_setuid

func Setuid(uid int) (err error) {}

var mapper

func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {}

func Munmap(b []byte) (err error) {}

func Getrlimit(resource int, rlim *Rlimit) (err error) {}

// setrlimit sets a resource limit.
// The Setrlimit function is in rlimit.go, and calls this one.
func setrlimit(resource int, rlim *Rlimit) (err error) {}

// prlimit changes a resource limit. We use a single definition so that
// we can tell StartProcess to not restore the original NOFILE limit.
//
// golang.org/x/sys linknames prlimit.
// Do not remove or change the type signature.
//
//go:linkname prlimit
func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {}