syscall.sh / sh / fcntl

fcntl

manipulate file descriptor

sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
number55 (0x37)
abicommon
entry pointsys_fcntl
sinceLinux 5.0
man pagefcntl(2)
sourceelixir.bootlin.com

Registers

registervalue
r355, the syscall number
r4unsigned int fd
r5unsigned int cmd
r6unsigned long arg
r0the return value

Then run trapa #31 to enter the kernel.

Same syscall on other architectures

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