linux

package standard library
go1.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation ΒΆ

Overview ΒΆ

Package linux provides the syscall primitives required for the runtime.

Index ΒΆ

Constants ΒΆ

View Source
const (
	AT_FDCWD = -0x64

	ENOENT = 0x2

	EPOLLIN       = 0x1
	EPOLLOUT      = 0x4
	EPOLLERR      = 0x8
	EPOLLHUP      = 0x10
	EPOLLRDHUP    = 0x2000
	EPOLLET       = 0x80000000
	EPOLL_CLOEXEC = 0x80000
	EPOLL_CTL_ADD = 0x1
	EPOLL_CTL_DEL = 0x2
	EPOLL_CTL_MOD = 0x3
	EFD_CLOEXEC   = 0x80000

	O_RDONLY  = 0x0
	O_CLOEXEC = 0x80000

	PR_SET_VMA           = 0x53564d41
	PR_SET_VMA_ANON_NAME = 0
)
View Source
const (
	SYS_CLOSE         = 3
	SYS_MPROTECT      = 10
	SYS_FCNTL         = 72
	SYS_PRCTL         = 157
	SYS_EPOLL_CTL     = 233
	SYS_EPOLL_PWAIT   = 281
	SYS_EPOLL_CREATE1 = 291
	SYS_EPOLL_PWAIT2  = 441
	SYS_EVENTFD2      = 290
	SYS_OPENAT        = 257
	SYS_PREAD64       = 17
	SYS_READ          = 0

	EFD_NONBLOCK = 0x800

	O_LARGEFILE = 0x0
)

Variables ΒΆ

This section is empty.

Functions ΒΆ

func Close ΒΆ

func Close(fd int) (errno uintptr)

func EpollCreate1 ΒΆ

func EpollCreate1(flags int32) (fd int32, errno uintptr)

func EpollCtl ΒΆ

func EpollCtl(epfd, op, fd int32, event *EpollEvent) (errno uintptr)

func EpollWait ΒΆ

func EpollWait(epfd int32, events []EpollEvent, maxev, waitms int32) (n int32, errno uintptr)

func Eventfd ΒΆ

func Eventfd(initval, flags int32) (fd int32, errno uintptr)

func Open ΒΆ

func Open(path *byte, mode int, perm uint32) (fd int, errno uintptr)

func Pread ΒΆ

func Pread(fd int, p []byte, offset int64) (n int, errno uintptr)

func Read ΒΆ

func Read(fd int, p []byte) (n int, errno uintptr)

func Syscall6 ΒΆ

func Syscall6(num, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, errno uintptr)

Syscall6 calls system call number 'num' with arguments a1-6.

Types ΒΆ

type EpollEvent ΒΆ

type EpollEvent struct {
	Events uint32
	Data   [8]byte // unaligned uintptr
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL