internal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RawSyscall4

func RawSyscall4(num, a1, a2, a3, a4 uintptr) (r1, errno uintptr)

RawSyscall4 executes a syscall with up to 4 arguments. It bypasses the Go runtime's syscall machinery entirely.

Register mapping (AMD64 Linux ABI):

  • RAX: syscall number (num)
  • RDI: arg1 (a1)
  • RSI: arg2 (a2)
  • RDX: arg3 (a3)
  • R10: arg4 (a4)

Returns:

  • r1: raw syscall return value
  • errno: 0 on success, or the error number on failure

On Linux, a negative return value in RAX indicates -errno. This function extracts the errno and returns it separately.

func RawSyscall6

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

RawSyscall6 executes a syscall with up to 6 arguments. It bypasses the Go runtime's syscall machinery entirely.

Register mapping (AMD64 Linux ABI):

  • RAX: syscall number (num)
  • RDI: arg1 (a1)
  • RSI: arg2 (a2)
  • RDX: arg3 (a3)
  • R10: arg4 (a4)
  • R8: arg5 (a5)
  • R9: arg6 (a6)

Returns:

  • r1: raw syscall return value
  • errno: 0 on success, or the error number on failure

On Linux, a negative return value in RAX indicates -errno. This function extracts the errno and returns it separately.

Types

This section is empty.

Jump to

Keyboard shortcuts

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