syscall.sh / riscv64 / swapon
swapon
start/stop swapping to file/device
sys_swapon(const char *specialfile, int swap_flags)
| number | 224 (0xe0) |
|---|---|
| abi | common |
| entry point | sys_swapon |
| since | Linux 4.15 |
| man page | swapon(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
a7 | 224, the syscall number |
a0 | const char *specialfile |
a1 | int swap_flags |
a0 | the return value |
Then run ecall to enter the kernel.
Same syscall on other architectures
- x64 167
- x86 87
- arm64 224
- arm 87
- x32 1073741991
- loongarch64 224
- ppc64 87
- ppc 87
- s390x 87
- mips64 5162
- mipsn32 6162
- mipso32 4087
- alpha 322
- arc 224
- csky 224
- hexagon 224
- m68k 87
- microblaze 87
- nios2 224
- openrisc 224
- parisc 87
- sh 87
- sparc 85
- sparc64 85
- xtensa 173
Get this as JSON: https://api.syscall.sh/v2/syscalls/riscv64/swapon