syscalls() - Unix,Linux系統呼叫
廣告
名稱none - 所有系統呼叫的列表概要Linux 2.4系統呼叫。描述系統呼叫是應用程式和Linux核心之間的基本介面。截至Linux 2.4.17,在/usr/src/linux/include/asm-*/unistd.h中列出了1100個系統呼叫。本手冊頁列出了大多數平臺通用的那些呼叫。_llseek(2), _newselect(2), _sysctl(2), accept(2), access(2), acct(2), adjtimex(2), afs_syscall, alarm(2), bdflush(2), bind(2), break, brk(2), cacheflush(2), capget(2), capset(2), chdir(2), chmod(2), chown(2), chown32, chroot(2), clone(2), close(2), connect(2), creat(2), create_module(2), delete_module(2), dup(2), dup2(2), execve(2), exit(2), fchdir(2), fchmod(2), fchown(2), fchown32, fcntl(2), fcntl64, fdatasync(2), flock(2), fork(2), fstat(2), fstat64, fstatfs(2), fsync(2), ftime, ftruncate(2), ftruncate64, get_kernel_syms(2), getcwd(2), getdents(2), getdents64, getegid(2), getegid32, geteuid(2), geteuid32, getgid(2), getgid32, getgroups(2), getgroups32, getitimer(2), getpagesize(2), getpeername(2), getpmsg, getpgid(2), getpgrp(2), getpid(2), getppid(2), getpriority(2), getresgid(2), getresgid32, getresuid(2), getresuid32, getrlimit(2), getrusage(2), getsid(2), getsockname(2), getsockopt(2), gettid, gettimeofday(2), getuid(2), getuid32, gtty, idle, init_module(2), ioctl(2), io_perm(2), iopl(2), ipc(2), kill(2), lchown(2), lchown32, link(2), listen(2), lock, lseek(2), lstat(2), lstat64, madvise(2), mincore(2), mkdir(2), mknod(2), mlock(2), mlockall(2), mmap(2), modify_ldt(2), mount(2), mprotect(2), mpx, mremap(2), msync(2), munlock(2), munlockall(2), munmap(2), nanosleep(2), nfsservctl(2), nice(2), oldfstat, oldlstat, oldolduname, oldstat, oldumount, olduname, open(2), pause(2), personality(2), phys, pipe(2), pivot_root(2), poll(2), prctl(2), pread(2), prof, profil, ptrace(2), putpmsg, pwrite(2), query_module(2), quotactl(2), read(2), readahead, readdir(2), readlink(2), readv(2), reboot(2), recv(2), recvfrom(2), recvmsg(2), rename(2), rmdir(2), rt_sigaction, rt_sigpending, rt_sigprocmask, rt_sigqueueinfo, rt_sigreturn, rt_sigsuspend, rt_sigtimedwait, sched_get_priority_max(2), sched_get_priority_min(2), sched_get_param(2), sched_get_scheduler(2), sched_rr_get_interval(2), sched_set_param(2), sched_set_scheduler(2), sched_yield(2), security, select(2), sendfile(2), send(2), sendmsg(2), sendto(2), setdomainname(2), setfsgid(2), setfsgid32, setfsuid(2), setfsuid32, setgid(2), setgid32, setgroups(2), setgroups32, sethostname(2), setitimer(2), setpgid(2), setpriority(2), setregid(2), setregid32, setresgid(2), setresgid32, setresuid(2), setresuid32, setreuid(2), setreuid32, setrlimit(2), setsid(2), setsockopt(2), settimeofday(2), setuid(2), setuid32, setup(2), sgetmask(2), shutdown(2), sigaction(2), sigaltstack(2), signal(2), sigpending(2), sigprocmask(2), sigreturn(2), sigsuspend(2), socket(2), socketcall(2), socketpair(2), ssetmask(2), stat(2), stat64, statfs(2), stime(2), stty, swapoff(2), swapon(2), symlink(2), sync(2), sysfs(2), sysinfo(2), syslog(2), time(2), times(2), truncate(2), truncate64, ulimit, umask(2), umount(2), uname(2), unlink(2), uselib(2), ustat(2), utime(2), vfork(2), vhangup(2), vm86(2), vm86old, wait4(2), waitpid(2), write(2), writev(2)。 在上述系統呼叫中,有9個已過時,即getrlimit、oldfstat、oldlstat、oldolduname、oldstat、olduname、readdir、select和vm86old(另見過時(2)),以及15個在標準核心中未實現,即afs_syscall、break、ftime、getpmsg、gtty、idle、lock、mpx、phys、prof、profil、putpmsg、security、stty和ulimit(另見未實現(2))。但是,ftime(3)、profil(3)和ulimit(3)存在作為庫例程。phys的插槽從2.1.116開始用於umount;phys將永遠不會實現。getpmsg和putpmsg呼叫用於修補以支援流的核心,並且可能永遠不會出現在標準核心中。security呼叫是為將來的使用。 粗略地說,屬於在/usr/include/asm/unistd.h中定義的編號為__NR_xxx的系統呼叫的程式碼可以在核心原始碼中的sys_xxx()例程中找到。(i386的排程表可以在/usr/src/linux/arch/i386/kernel/entry.S中找到。)但是,有很多例外,主要是因為舊的系統呼叫被新的系統呼叫取代,並且這種處理方式有些不成體系。在具有專有作業系統模擬的平臺(例如parisc、sparc、sparc64和alpha)上,有很多額外的系統呼叫;mips64還包含一整套32位系統呼叫。以下是Linux 2.4.17的詳細資訊。 定義__NR_oldstat和__NR_stat分別指代例程sys_stat()和sys_newstat(),fstat和lstat也類似。類似地,定義__NR_oldolduname、__NR_olduname和__NR_uname分別指代例程sys_olduname()、sys_uname()和sys_newuname()。因此,__NR_stat和__NR_uname一直指代系統呼叫的最新版本,而舊版本是為了向後相容。 select和mmap的情況有所不同。它們使用五個或更多引數,並且導致i386引數傳遞的設定方式出現問題。因此,雖然其他架構具有與__NR_select和__NR_mmap對應的sys_select()和sys_mmap(),但在i386上,人們會發現old_select()和old_mmap()(使用指向引數塊的指標的例程)來代替。如今,傳遞五個引數不再是問題,並且有一個__NR_newselect(libc 6使用)直接對應於sys_select(),類似地還有__NR_mmap2。 另外兩個系統呼叫編號__NR_llseek和__NR_sysctl在sys_llseek()和sys_sysctl()中缺少額外的下劃線。 然後是對應於old_readdir()的__NR_readdir,它每次最多讀取一個目錄項,並被sys_getdents()取代。 在許多平臺(包括i386)上,套接字呼叫都透過socketcall()多路複用,而System V IPC呼叫則透過ipc()多路複用。 在新平臺上,這些平臺只有64位檔案訪問和32位uid(例如alpha、ia64、s390x),沒有*64或*32呼叫。如果存在*64和*32呼叫,則其他版本已過時。 chown和lchown系統呼叫在2.1.81中被交換。*64和*32呼叫是為核心2.4新增的,getrlimit和mmap的新版本也是如此,新的呼叫有pivot_root、mincore、madvise、security、gettid和readahead。
廣告
|