[intro]
[a:index by names]
[s:index by topic]
[#:index by numbers]
[1..64]
[65..128]
[129..192]
[193..256]
[257..]
[ref]
[struc]
[fcntl]
[ioctl]
[pguide]
[man2]
[next]
[back]
[linux]
[main]
[bot]
[top]
Syscalls pages archive,
updated (2.3.0, ver. 1.66) man 2 & 3p pages
Common reference which will not be repeated throughout this text:
"P ", according to asmutils-0.14 there are 46 system calls
the names of which are common to the LINUX (2.2/4), FREEBSD, NETBSD, OPENBSD,
BEOS and ATHEOS operating systems, marked "P" to denoting their (sort of) "portability".
"Obsolete ", mentioned but not linked to a corresponding table.
"Not Implemented ", linked for possible future specification and marked in a different colour.
"K4 ", <name> added where differently named w. kernel 2.4+ versions.
i386-PC-Linux System Calls
P exit int - - - - : terminate the current process -1-
P fork s pt_regs - - - - : create child process -2-
P read uint ch* size_t - - : read from file descriptor -3-
P write uint c ch* size_t - - : write to file descriptor -4-
P open c ch* int int - - : open / create file or device -5-
P close uint - - - - : close a file descriptor -6-
waitpid pid_t uint* int - - : wait for process termination -7-
creat c ch* int - - - : create child process -8-
P link c ch* c ch* - - - : assign new name to a file -9-
P unlink c ch* - - - - : del name & file it refers to -10-
P execve s pt_regs - - - - : execute program -11-
P chdir c ch* - - - - : change working directory -12-
time int* - - - - : get time in seconds -13-
P mknod c ch* int dev_t - - : create dir, special, ordinary file -14-
P chmod c ch* mode_t - - - : change permissions of a file -15-
lchown c ch* uid_t gid_t - - : change ownership of a file -16-
break
oldstat
P lseek uint off_t uint - - : reposition read/write file offset -19-
getpid - - - - - : get process identification -20-
P mount ch* ch* ch* - - : mount and unmount filesystems -21-
umount K4(18):oldumount ch* - - - - : mount and unmount filesystems. -22-
P setuid uid_t - - - - : set user identity -23-
P getuid - - - - - : get user identity -24-
stime int* - - - - : set time -25-
ptrace l l l l - : process trace -26-
P alarm uint - - - - : set alarm clock for delivery of signal -27-
oldfstat
pause - - - - - : wait for signal -29-
P utime ch* s utimbuf* - - -: chg access and/or modification times -30-
stty
gtty
P access c ch* int - - - : check user's permissions for a file -33-
nice int - - - - : change process priority -34-
ftime : (re time) return date and time -35-
P sync - - - - - : commit buffer cache to disk -36-
P kill int int - - - : send signal to a process -37-
P rename c ch* c ch* - - - : change the name or location of a file -38-
P mkdir c ch* int - - - : create directory -39-
P rmdir c ch* - - - - : delete (an empty) directory -40-
P dup uint - - - - : duplicate a file descriptor -41-
P pipe ul* - - - - : create pipe -42-
times s tms* - - - - : get process times -43-
prof
P brk ul - - - - : change data segment size -45-
P setgid gid_t - - - - : set group identity -46-
P getgid - - - - - : get group identity -47-
P signal int __sighandler_t - - - : ANSI C signal handling -48-
geteuid - - - - - : get user identity -49-
getegid - - - - - : get group identity -50-
acct c ch* - - - - : switch process accounting on or off
umount2 K4(18):umount ch* int - - - : mount and unmount filesystems. -52-
lock
P ioctl uint uint ul - - : re ioctl assignations , control device -54-
fcntl uint uint ul - - : re fcntl.h , manipulate file descriptor -55-
mpx
P setpgid pid_t pid_t - - -: set/get process group -57-
ulimit : re getrlimit(2) -58-
oldolduname s oldold_utsname* - - - -
umask int - - - - : set file creation mask -60-
P chroot c ch* - - - - : change root directory -61-
ustat dev_t s ustat* - - - : get file system statistics -62-
P dup2 uint uint - - - : replace 2nd w/ duplicate of 1st fd -63-
P getppid - - - - - : get process identification -64-
P getpgrp - - - - - : set/get process group -65-
P setsid - - - - - : crea session, set process group ID -66-
P sigaction int c s olds old_sigaction* - - : POSIX signal handling functions -67-
sgetmask - - - - -
ssetmask - - - -
setreuid uid_t uid_t - - - : set real and / or effective user ID -70-
setregid gid_t gid_t - - - : set real and / or effective group ID -71-
sigsuspend int int old_sigset_t - - : POSIX signal handling functions. -72-
sigpending old_sigset_t* - - - - : POSIX signal handling functions -73-
sethostname ch* int - - - : set host name -74-
setrlimit uint s rlimit* - - - : get/set resource limits and usage -75-
getrlimit uint s rlimit* - - - : get/set resource limits and usage -76-
getrusage int s rusage* - - - : get/set resource limits and usage -77-
gettimeofday s timeval* s timezone* - - - : get time -78-
settimeofday s timeval* s timezone* - - - : set time -79-
P getgroups int gid_t* - - - : get list of supplementary group IDs -80-
setgroups int gid_t* - - - : set list of supplementary group IDs -81-
select +K4:oldselect s sel_arg_s* - - - - : synchronous I/O multiplexing -82-
P symlink c ch* c ch* - - - : make new name for a file -83-
oldlstat
P readlink c ch* ch* int - - : read value of a symbolic link -85-
uselib c ch* - - - - : select shared library -86-
swapon c ch* int - - - : start swapping to file/device -87-
P reboot int int int void* - : reboot or enable/disable Ctrl-Alt-Del -88-
readdir uint void* uint - - : read directory entry -89-
mmap s mmap_arg_s* - - - - : map files or devices into memory -90-
munmap ul size_t - - - : unmap files or devices into memory -91-
truncate c ch* ul - - - : truncate file to specified length -92-
ftruncate uint ul - - - : truncate file to specified length -93-
fchmod int fd uint mode_t - - - : change permissions of a file -94-
fchown int fd uint uid_t gid_t - - : change ownership of a file -95-
getpriority int int - - - : get program scheduling priority -96-
setpriority int int int - - : set program scheduling priority -97-
profil : execution time profile -98-
statfs c ch* s statfs* - - - : get file system statistics -99-
fstatfs uint s statfs* - - - : get file system statistics -100-
ioperm ul ul int - - : set port input/output permissions -101-
socketcall int ul* - - - : socket system calls -102-
syslog int ch* int - - : read/clr kernel msg buffer; loglevel -103-
setitimer int s itimerval* s itimerval* - - : set an interval timer -104-
getitimer int s itimerval* - - - : get value of an interval timer -105-
P stat ch* s stat* - - - : get file status -106-
lstat ch* s stat* - - - : get file status -107-
P fstat uint s stat* - - - : get file status -108-
olduname s old_utsname* - - - -
iopl ul - - - - : change I/O privilege level -110-
vhangup - - - - - : virtually hangup the current tty -111-
idle - - - - - : make process 0 idle -112-
vm86old ul s vm86plus_s* - - - : enter virtual 8086 mode -113-
wait4 ul* int options s rusage* - : wait for process termination, BSD -114-
swapoff c ch* - - - - : stop swapping to file/device -115-
sysinfo s sysinfo* - - - - : info on overall system statistics -116-
ipc uint int int int void* : System V IPC system calls -117-
fsync uint - - - - : sync complete in-core state with disk -118-
sigreturn ul - - - - : ret from sig hnd, cleanup stack -119-
clone s pt_regs - - - - : create child process -120-
setdomainname ch* int - - - : get/set domain name -121-
P uname s new_utsname* - - - - : get name & info about current kernel -122-
modify_ldt int void* ul - - : get or set ldt -123-
adjtimex s timex* - - - - : tune kernel clock -124-
mprotect ul size_t ul - - : control allowable accesses to memory -125-
sigprocmask int old_sigset_t* old_sigset_t* - - : POSIX signal handling functions -126-
create_module c ch* size_t - - - : create module entry -127-
init_module c ch* s module* - - - : init loadable module entry -128-
delete_module c ch* - - - - : delete module entry -129-
get_kernel_syms s kernel_sym* - - - - : retrieve kernel & module syms -130-
quotactl int c ch* int caddr_t - : manipulate disk quotas -131-
getpgid pid_t - - - - : set/get process group -132-
fchdir uint - - - - : change working directory -133-
bdflush int l - - - : start/flsh/tune buf-dirty-flsh daem -134-
sysfs int ul ul - - : get file system type information -135-
personality ul - - - - : set process execution domain -136-
afs_syscall
setfsuid uid_t - - - - : set user id for file system checks -138-
setfsgid gid_t - - - - : set group id for file system checks -139-
llseek uint ul ul loff_t* uint : reposn r/w file offset -140-
getdents uint void* uint - - : get directory entries -141-
newselect +K4:select int fd_set* fd_set* fd_set* s timeval* : sync I/O multiplexing -142-
flock uint uint - - - : apply/remove advisory file lock -143-
msync ul size_t int - - : synchronize file with a memory map -144-
readv ul c s iovec* ul - - : read or write a vector -145-
writev ul c s iovec* ul - - : read or write a vector -146-
getsid pid_t - - - - : get session ID -147-
fdatasync uint - - - - : synchronize in-core data with disk -148-
sysctl s __sysctl_args* - - - - : -149-
mlock ul size_t - - - : disable paging for parts of memory -150-
munlock ul size_t - - - : reenable paging for parts of memory -151-
mlockall int - - - - : disable paging for calling process -152-
munlockall - - - - - : reenable paging for calling process -153-
sched_setparam pid_t s sched_param* - - - : set scheduling parameters -154-
sched_getparam pid_t s sched_param* - - - : get scheduling parameters -155-
sched_setscheduler pid_t int s sched_param* - - : set scheduling algo/param -156-
sched_getscheduler pid_t - - - - : get scheduling algo/param -157-
sched_yield - - - - - : yield the processor -158-
sched_get_priority_max - - - - : get static priority rng -159-
sched_get_priority_min - - - - : get static priority rng -160-
sched_rr_get_interval pid_t s timespec* - - - : get SCHED_RR interval -161-
P nanosleep s timespec* s timespec* - - - : pause execution for specified time -162-
mremap ul ul ul ul - : re-map a virtual memory address -163-
setresuid uid_t uid_t uid_t - - : set real, eff. and saved user ID -164-
getresuid uid_t* uid_t* uid_t* - - : get real/effective/saved user ID -165-
vm86 s vm86_s* - - - - : enter virtual 8086 mode -166-
query_module c ch* int ch* size_t size_t* : for bits pertaining to modules -167-
poll s pollfd* uint l - - : wait for event on file descriptor -168-
nfsservctl int void* void* - - : syscall i.f. to kernel nfs daemon -169-
setresgid gid_t gid_t gid_t - - : set real,effective,saved group ID -170-
getresgid gid_t* gid_t* gid_t* - - : get real/effective/saved group ID -171-
prctl ul ul unsigned l ul : operations on a process -172-
rt_sigreturn ul - - - - :
rt_sigaction int c s sigaction*, s sigaction*, size_t - : setup rt sighnd (RTL)
rt_sigprocmask int sigset_t* sigset_t* size_t - :
rt_sigpending sigset_t* size_t - - - :
rt_sigtimedwait c sigset_t* siginfo_t* c s timespec* size_t - :
rt_sigqueueinfo int int siginfo_t* - - :
rt_sigsuspend sigset_t* size_t - - - :
pread uint ch* size_t loff_t - : read from file descr at given offset -180-
pwrite uint c ch* size_t loff_t - : write to file descriptor at offset -181-
chown c ch* uid_t gid_t - - : change ownership of a file -182-
getcwd ch* ul - - - : get current working directory -183-
capget cap_user_header_t cap_user_data_t - - - : get process capabilities -184-
capset cap_user_header_t c cap_user_data_t - - - : set process capabilities -185-
sigaltstack c stack_t* stack_t* ul ss - -
sendfile int int off_t* size_t - : xfer data between file descriptors -187-
getpmsg
putpmsg
vfork s pt_regs - - - - : create child process & block parent -190-
Kernel 2.4.2
(Documentation delayed until/if sufficiently stable & consistent - which seems very un-likely...)
getrlimit
mmap2
truncate64
ftruncate64
stat64 -195-
lstat64
fstat64
- re below, modified w. 2.4.18 -
lchown
getuid
getgid -200-
geteuid
getegid
setreuid
setregid
getgroups -205-
setgroups
fchown
setresuid
getresuid
setresgid -210-
getresgid
chown
setuid
setgid
setfsuid -215-
setfsgid
pivot_root
mincore
madvise
Kernel 2.4.18
different names wrt previous 2.4 kernels(!) and new system calls:
lchown32
getuid32
getgid32 200
geteuid32
getegid32
setreuid32
setregid32
getgroups32 205
setgroups32
fchown32
setresuid32
getresuid32
setresgid32 210
getresgid32
chown32
setuid32
setgid32
setfsuid32 215
setfsgid32
pivot_root
mincore
madvise, madvise1
getdents64 220
fcntl64
security
gettid
readahead 225
setxattr
lsetxattr
fsetxattr
getxattr
lgetxattr 230
fgetxattr
listxattr
llistxattr
flistxattr
removexattr 235
lremovexattr
fremovexattr
Kernel 2.4.19, additional system calls
tkill 238
sendfile64
futex 240
sched_setaffinity
sched_getaffinity 242
Kernel 2.4.20, additional system calls
set_thread_area 243
get_thread_area
io_setup 245
io_destroy
io_getevents
io_submit
io_cancel
alloc_hugepages 250
free_hugepages
exit_group 252
kernel 2.6.0 additional system calls
lookup_dcookie 253
epoll_create
epoll_ctl 255
epoll_wait
remap_file_pages
set_tid_address 258
timer_create 259
timer_settime (__NR_timer_create+1)
timer_gettime (__NR_timer_create+2)
timer_getoverrun (__NR_timer_create+3)
timer_delete (__NR_timer_create+4)
clock_settime (__NR_timer_create+5)
clock_gettime (__NR_timer_create+6)
clock_getres (__NR_timer_create+7)
clock_nanosleep (__NR_timer_create+8)
statfs64 268
fstatfs64 269
tgkill 270
utimes 271
kernel 2.6.3 additional system calls
fadvise64_64 272
vserver 273
kernel 2.6.18 additional system calls
mbind 274
get_mempolicy
set_mempolicy
mq_open
mq_unlink 278
mq_timedsend
mq_timedreceive
mq_notify
mq_getsetattr
kexec_load 283
waitid
add_key
request_key
keyctl
ioprio_set 298
ioprio_get
inotify_init
inotify_add_watch
inotify_rm_watch
migrate_pages 293
openat
mkdirat
mknodat
fchownat
futimesat 298
fstatat64
unlinkat
renameat
linkat
symlinkat 303
readlinkat
fchmodat
faccessat
pselect6
ppoll 308
unshare
set_robust_list
get_robust_list
splice
sync_file_range 313
tee
vmsplice
move_pages 316
By asmutils-0.14 supported System Calls
common to the LINUX, FREEBSD, NETBSD, OPENBSD, BEOS and ATHEOS OS's.
Several others can probably be emulated - re [pguide]
P access : check user's permissions for a file -33-
P alarm : set alarm clock for delivery of signal -27-
P brk : change data segment size -45-
P chdir : change working directory -12-
P chmod : change permissions of a file -15-
P chroot : change root directory -61-
P close : close a file descriptor -6-
P dup2 : replace 2nd w/ duplicate of 1st file descriptor -63-
P dup : duplicate a file descriptor -41-
P execve : execute program -11-
P exit : terminate the current process -1-
P fork : create a child process -2-
P fstat : get file status -108-
P getgid : get group identity -47-
P getgroups : get list of supplementary group IDs -80-
P getpgrp : set/get process group -65-
P getppid : get process identification -64-
P getuid : get user identity -24-
P ioctl : re list of ioctl assignations : device control -54-
P kill : send signal to a process -37-
P link : make a new name for a file -9-
P lseek : reposition read/write file offset -19-
P mkdir : create a directory -39-
P mknod : create directory, special, ordinary file -14-
P mount : mount and unmount filesystems -21-
P nanosleep : pause execution for a specified time -162-
P open : open and possibly create a file or device -5-
P pipe : create pipe -42-
P readlink : read value of a symbolic link -85-
P read : read from a file descriptor -3-
P reboot : reboot or enable/disable Ctrl-Alt-Del -88-
P rename : change the name or location of a file -38-
P rmdir : delete a directory -40-
P setgid : set group identity -46-
P setpgid : set/get process group -57-
P setsid : creates session, sets process group ID -66-
P setuid : set user identity -23-
P sigaction : POSIX signal handling functions -67-
P signal : ANSI C signal handling -48-
P stat : get file status -106-
P symlink : make a new name for a file -83-
P sync : commit buffer cache to disk -36-
P uname : get name & info about current kernel -122-
P unlink : del name & possibly file it refers to -110-
P utime : chg access and/or modification times -30-
P write : write to a file descriptor -4-
[main]
[back]
[intro]
[bot]
[top]
[a:index]
[#:index]
[1..64]
[65..128]
[129..192]
[193..]
[ref]
[struc]
[ioctl]
[pguide]
H.-Peter Recktenwald, Berlin , 18.Feb.2000 = .hpr.l0 =
updt:8.Mar.04+ :