This page lists every system call: its number, the arguments that the call
reads, and the kernel function that runs it. The mechanism is in
System calls .
The numbers come from kernel/include/usr/vex/syscall.h. Each subsystem owns a
block of 32 numbers that starts at a multiple of 0x20. The table gives the
calls of each block in number order and leaves out the numbers that no call
uses. A call with such a number fails with ENOSYS. A number in the header
without a registered handler fails with ENOSYS too.
The arguments are in the order of the registers, one for each register. A
call reads at most six.
user_addr_t is a pointer into the address space of the caller. The handler
copies through it. It is never a kernel pointer.
A descriptor is an int. When the _fd macro registered the handler, the
handler gets the resolved file instead, and the table shows the descriptor
that the caller passes.
A call with a dirfd also takes the path as a user pointer. The kernel
copies the path before it uses it.
The return value is an intptr_t. A negative value is an errno number that
is negated, and every other value is a result.
The link on a name goes to the handler.
Number Call Arguments
0x020SYS_EXITint code
0x021SYS_FORKnone
0x022SYS_EXECuser_addr_t path, user_addr_t argv, user_addr_t envp
0x023SYS_WAITPIDpid_t pid, user_addr_t wstatus, uintptr_t options, user_addr_t usage
0x024SYS_GETPIDnone
0x025SYS_GETPPIDnone
0x026SYS_SETSIDnone
0x027SYS_SETPGIDpid_t pid, pid_t pgid
0x028SYS_GETPGIDpid_t pid
0x029SYS_GETSIDpid_t pid
0x02BSYS_GETPRIORITYint which, pid_t who
0x02CSYS_SETPRIORITYint which, pid_t who, intptr_t value
0x02DSYS_GETSCHEDULERpid_t pid
0x02ESYS_SETSCHEDULERpid_t pid, uintptr_t policy, user_addr_t param
0x02FSYS_GETSCHEDPARAMpid_t pid, user_addr_t param
0x030SYS_SETSCHEDPARAMpid_t pid, user_addr_t param
0x031SYS_GETSCHEDRANGEuintptr_t policy, user_addr_t range
0x032SYS_GETSCHEDINTERVALpid_t pid, user_addr_t interval
0x033SYS_GETAFFINITYpid_t pid, pid_t tid, size_t size, user_addr_t mask
0x034SYS_SETAFFINITYpid_t pid, pid_t tid, size_t size, user_addr_t mask
0x035SYS_WAITIDunsigned idtype, pid_t id, user_addr_t info, uintptr_t options, user_addr_t usage
0x036SYS_GETCPUnone
0x037SYS_SPAWNuser_addr_t address
Number Call Arguments
0x060SYS_KILLpid_t pid, int sig
0x061SYS_TGKILLpid_t pid, pid_t tid, int sig
0x062SYS_SIGACTIONint sig, user_addr_t act, user_addr_t oact
0x063SYS_SIGPROCMASKint how, user_addr_t set, user_addr_t oset
0x064SYS_SIGPENDINGuser_addr_t set
0x065SYS_SIGRETURNnone
0x066SYS_SIGALTSTACKuser_addr_t ss, user_addr_t old
0x067SYS_SIGSUSPENDuser_addr_t set
0x068SYS_SIGTIMEDWAITuser_addr_t set, user_addr_t info, user_addr_t timeout
0x069SYS_SIGQUEUEpid_t pid, int sig, uintptr_t value
0x06ASYS_SETITIMERint which, user_addr_t value, user_addr_t old
Number Call Arguments
0x080SYS_GETRESUIDuser_addr_t ruid, user_addr_t euid, user_addr_t suid
0x081SYS_SETRESUIDuid_t ruid, uid_t euid, uid_t suid
0x082SYS_GETRESGIDuser_addr_t rgid, user_addr_t egid, user_addr_t sgid
0x083SYS_SETRESGIDgid_t rgid, gid_t egid, gid_t sgid
0x084SYS_GETGROUPSsize_t size, user_addr_t list
0x085SYS_SETGROUPSsize_t size, user_addr_t list
0x086SYS_GETUMASKnone
0x087SYS_SETUMASKmode_t mask
0x088SYS_CAPGETuser_addr_t caps
0x089SYS_CAPSETuser_addr_t caps
Number Call Arguments
0x0A0SYS_MMAPuser_addr_t addr, uintptr_t length, uintptr_t prot, uintptr_t flags, int fd, uintptr_t offset
0x0A1SYS_MUNMAPuser_addr_t addr, uintptr_t length
0x0A2SYS_MPROTECTuser_addr_t addr, uintptr_t length, uintptr_t prot
0x0A3SYS_MSYNCuser_addr_t addr, uintptr_t length, uintptr_t flags
0x0A4SYS_MADVISEuser_addr_t addr, uintptr_t length, uintptr_t advice
0x0A5SYS_MLOCKuser_addr_t addr, uintptr_t length
0x0A6SYS_MUNLOCKuser_addr_t addr, uintptr_t length
0x0A7SYS_MLOCKALLuintptr_t flags
0x0A8SYS_MUNLOCKALLnone
0x0A9SYS_MREMAPuser_addr_t addr, uintptr_t old_size, uintptr_t new_size, uintptr_t flags
Number Call Arguments
0x0C0SYS_OPENATint dirfd, const char* path, uintptr_t flags, mode_t mode
0x0C1SYS_CLOSEint fd
0x0C2SYS_READint fd, user_addr_t buffer, size_t count
0x0C3SYS_WRITEint fd, user_addr_t buffer, size_t count
0x0C4SYS_SEEKint fd, off_t offset, int origin
0x0C5SYS_IOCTLint fd, uint32_t request, uintptr_t argument
0x0C6SYS_DUPint old_fd, int new_fd, uintptr_t flags
0x0C9SYS_FSTATint fd, user_addr_t stat
0x0CASYS_FTRUNCATEint fd, off_t length
0x0CBSYS_FSYNCint fd
0x0CCSYS_FCNTLint fd, unsigned command, uintptr_t argument
0x0CDSYS_PREADint fd, user_addr_t buffer, size_t count, off_t offset
0x0CESYS_PWRITEint fd, user_addr_t buffer, size_t count, off_t offset
0x0CFSYS_READVint fd, user_addr_t iov, size_t count
0x0D0SYS_WRITEVint fd, user_addr_t iov, size_t count
0x0D1SYS_PREADVint fd, user_addr_t iov, size_t count, off_t offset
0x0D2SYS_PWRITEVint fd, user_addr_t iov, size_t count, off_t offset
0x0D3SYS_PIPEuser_addr_t fds, uintptr_t flags
0x0D4SYS_PPOLLuser_addr_t fds, size_t count, user_addr_t timeout, user_addr_t mask
0x0D5SYS_FLOCKint fd, uintptr_t operation
0x0D6SYS_FALLOCATEint fd, uintptr_t mode, off_t offset, off_t length
Number Call Arguments
0x0E0SYS_FSTATATint dirfd, const char* path, user_addr_t stat, unsigned flags
0x0E1SYS_FCHMODATint dirfd, const char* path, mode_t mode, unsigned flags
0x0E2SYS_FCHOWNATint dirfd, const char* path, uid_t uid, gid_t gid, unsigned flags
0x0E3SYS_UTIMENSATint dirfd, const char* path, user_addr_t times, unsigned flags
0x0E4SYS_MKDIRATint dirfd, const char* path, mode_t mode
0x0E5SYS_UNLINKATint dirfd, const char* path, unsigned flags
0x0E6SYS_RENAMEATint old_dirfd, user_addr_t old_path, int new_dirfd, user_addr_t new_path
0x0E7SYS_LINKATint old_dirfd, user_addr_t old_path, int new_dirfd, user_addr_t new_path, unsigned flags
0x0E8SYS_SYMLINKATuser_addr_t target, int dirfd, user_addr_t path
0x0E9SYS_READLINKATint dirfd, const char* path, user_addr_t buffer, size_t size
0x0EASYS_GETDENTSint fd, user_addr_t buffer, size_t size
0x0EBSYS_GETCWDuser_addr_t buffer, size_t size
0x0ECSYS_CHDIRuser_addr_t path
0x0EDSYS_FCHDIRint fd
0x0EESYS_FACCESSATint dirfd, const char* path, unsigned mode, unsigned flags
0x0EFSYS_CHROOTuser_addr_t path
0x0F0SYS_MKNODATint dirfd, const char* path, mode_t mode, dev_t rdev
Number Call Arguments
0x100SYS_GETXATTRATint dirfd, const char* path, user_addr_t name, user_addr_t value, size_t size, unsigned flags
0x101SYS_SETXATTRATint dirfd, const char* path, user_addr_t name, user_addr_t value, size_t size, unsigned flags
0x102SYS_LISTXATTRATint dirfd, const char* path, user_addr_t list, size_t size, unsigned flags
0x103SYS_REMOVEXATTRATint dirfd, const char* path, user_addr_t name, unsigned flags
0x104SYS_MOUNTuser_addr_t source, user_addr_t target, user_addr_t type, uintptr_t flags, user_addr_t params
0x105SYS_UMOUNTuser_addr_t path
0x106SYS_SYNCnone
0x107SYS_SYNCFSint fd
0x108SYS_STATVFSint fd, user_addr_t buffer
Number Call Arguments
0x120SYS_UNAMEuser_addr_t buffer
0x121SYS_GETTIMEuintptr_t clock, user_addr_t time
0x122SYS_SETTIMEuintptr_t clock, user_addr_t time
0x123SYS_SETHOSTNAMEuser_addr_t name, size_t length
0x124SYS_NANOSLEEPuintptr_t clock_id, uintptr_t flags, user_addr_t request, user_addr_t remaining
0x125SYS_GETTIMERESuintptr_t clock, user_addr_t resolution
0x126SYS_SYSINFOuser_addr_t buffer
0x127SYS_GETRLIMITuintptr_t resource, user_addr_t out
0x128SYS_SETRLIMITuintptr_t resource, user_addr_t in
0x129SYS_GETRUSAGEintptr_t who, user_addr_t out
0x12ASYS_GETRANDOMuser_addr_t buffer, size_t size, uintptr_t flags
0x12BSYS_REBOOTreserved; ENOSYS
0x12CSYS_SHUTDOWNreserved; ENOSYS