syscall.sh / x64 / swapon

swapon

start/stop swapping to file/device

sys_swapon(const char *specialfile, int swap_flags)
number167 (0xa7)
abicommon
entry pointsys_swapon
sinceLinux 3.3
man pageswapon(2)
sourceelixir.bootlin.com

Registers

registervalue
rax167, the syscall number
rdiconst char *specialfile
rsiint swap_flags
raxthe return value

Then run syscall to enter the kernel.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/swapon