Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RawSyscall4 ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.