最終更新:2015-10-27 (火) 16:00:46 (1479d)  

Linux/システムコール はてなブックマークを見る
Top / Linux / システムコール

Linuxシステムコール

http://linux.die.net/man/2/syscalls

syscalls? - Linuxシステムコール

メモ

  • システムコールは一般には直接起動されず、 glibc (や他の何らかのライブラリ) 経由で起動される

Linuxカーネル

  • sys_?システムコール名という関数で実装されている
  • linux/syscalls.h

定義

  • SYSCALL_DEFINE
    • 後ろの数字はシステムコールの引数の数
    • 通常の関数定義では変数の型と変数名の間に゛,”はありませんが、SYSCALL_DEFINEでは型と変数名の間に゛,”をつけて区切ります。

番号の定義

関数との対応表

  • arch/x86/kernel/syscall_table_32.S?

システムコールの数

Linux 3.1

System callKernelNotes
_llseek?1.2
_newselect?
_sysctl?
accept?
accept4?2.6.28
access
acct?
add_key?2.6.11
adjtimex?
afs_syscall?Not implemented
alarm?
alloc_hugepages?2.5.36Removed in 2.5.44
bdflush?
bind
breakNot implemented
brk?
cacheflush?1.2Not on i386
capget?2.2
capset?2.2
chdir?
chmod
chown
chown32?2.4
chroot
clock_adjtime?2.6.39
clock_getres?2.6
clock_gettime2.6
clock_nanosleep?2.6
clock_settime?2.6
clone?
close?
connect?
creat?
create_module?
delete_module?
dup?
dup2?
dup3?2.6.27
epoll_create?2.6
epoll_create1?2.6.27
epoll_ctl2.6
epoll_pwait?2.6.19
epoll_wait2.6
eventfd?2.6.22
eventfd2?2.6.27
execve
exit
exit_group?2.6
faccessat?2.6.16
fadvise64?2.6
fadvise64_64?2.6
fallocate?2.6.23
fanotify_init?2.6.37
fanotify_mark?2.6.37
fchdir?
fchmod?
fchmodat?2.6.16
fchown?
fchown32?2.4
fchownat?2.6.16
fcntl
fcntl64?2.4
fdatasync?
fgetxattr?2.6; 2.4.18
flistxattr?2.6; 2.4.18
flock?2.0
fork
free_hugepages?2.5.36Removed in 2.5.44
fremovexattr?2.6; 2.4.18
fsetxattr?2.6; 2.4.18
fstat
fstat64?2.4
fstatat64?2.6.16
fstatfs?
fstatfs64?2.6
fsync?
ftime?Not implemented
ftruncate?
ftruncate64?2.4
futex?2.6
futimesat?2.6.16
get_kernel_syms?
get_mempolicy?2.6.6
get_robust_list?2.6.17
get_thread_area?2.6
getcpu?2.6.19
getcwd?2.2
getdents?2.0
getdents64?2.4
getegid?
getegid32?2.4
geteuid?
geteuid32?2.4
getgid?
getgid32?2.4
getgroups?
getgroups32?2.4
getitimer?
getpeername?
getpagesize?2.0Not on i386
getpgid?
getpgrp?
getpid
getpmsg?Not implemented
getppid?
getpriority?
getresgid?2.2
getresgid32?2.4
getresuid?2.2
getresuid32?2.4
getrlimit?
getrusage
getsid?2.0
getsockname?
getsockopt?
gettid?2.4.11
gettimeofday
getuid?
getuid32?2.4
getxattr?2.6; 2.4.18
gtty?Not implemented
idle?Not implemented
init_module
inotify_add_watch2.6.13
inotify_init2.6.13
inotify_init1?2.6.27
inotify_rm_watch?2.6.13
io_cancel?2.6
io_destroy?2.6
io_getevents?2.6
io_setup?2.6
io_submit?2.6
ioctl
ioperm?
iopl?
ioprio_get?2.6.13
ioprio_set?2.6.13
ipc?
kexec_load?2.6.13
keyctl?2.6.11
kill
lchown?2.2
lchown32?2.4
lgetxattr?2.6; 2.4.18
link?
linkat?2.6.16
listen?
listxattr?2.6; 2.4.18
llistxattr?2.6; 2.4.18
lockNot implemented
lookup_dcookie?2.6
lremovexattr?2.6; 2.4.18
lseek
lsetxattr?2.6; 2.4.18
lstat?
lstat64?2.4
madvise?2.4
madvise1?2.4
mbind?2.6.6
migrate_pages?2.6.16
mincore?2.4
mkdir
mkdirat?2.6.16
mknod
mknodat?2.6.16
mlock?
mlockall?
mmap
mmap2?2.4
modify_ldt?
mount
move_pages?2.6.18
mprotect?
mpx?Not implemented
mq_getsetattr?2.6.6
mq_notify?2.6.6
mq_open?2.6.6
mq_timedreceive?2.6.6
mq_timedsend?2.6.6
mq_unlink?
mremap?2.0
msgctl?
msgget?
msgrcv?
msgsnd?
msync?2.0
munlock?
munlockall?
munmap?
name_to_handle_at?2.6.39
nanosleep2.0
nfsservctl?2.2
nice
oldfstat?
oldlstat?
oldolduname?
oldstat?
olduname?
open
open_by_handle_at?2.6.39
openat?2.6.16
pause
pciconfig_iobase?2.2.15; 2.4Not on i386
pciconfig_read?2.0.26; 2.2Not on i386
pciconfig_write?2.0.26; 2.2Not on i386
perf_event_open?2.6.31Was called perf_counter_open?() in 2.6.31; renamed in 2.6.32
personality?1.2
phys?Not implemented
pipe?
pipe2?2.6.27
pivot_root?2.4
poll2.2
ppoll?2.6.16
prctl?2.2
pread64?Added as "pread?" in 2.2;renamed "pread64?" in 2.6
preadv?2.6.30
prlimit2.6.36
prof?Not implemented
profil?Not implemented
pselect6?2.6.16
ptrace
putpmsg?Not implemented
pwrite64?Added as "pwrite" in 2.2;renamed "pwrite64" in 2.6
pwritev?2.6.30
query_module?2.2
quotactl?
read
readahead2.4.13
readdir?
readlink
readlinkat?2.6.16
readv?2.0
reboot
recv
recvfrom
recvmsg?
recvmmsg?2.6.33
remap_file_pages?2.6
removexattr?2.6; 2.4.18
rename?
renameat?2.6.16
request_key?2.6.11
restart_syscall?2.6
rmdir
rt_sigaction?2.2
rt_sigpending?2.2
rt_sigprocmask?2.2
rt_sigqueueinfo?2.2
rt_sigreturn?2.2
rt_sigsuspend?2.2
rt_sigtimedwait?2.2
rt_tgsigqueueinfo?2.6.31
sched_get_priority_max?2.0
sched_get_priority_min?2.0
sched_getaffinity?2.6
sched_getparam?2.0
sched_getscheduler?2.0
sched_rr_get_interval?2.0
sched_setaffinity?2.6
sched_setparam?2.0
sched_setscheduler?2.0
sched_yield?2.0
security?Not implemented
select
semctl?
semget?
semop?
semtimedop?2.6; 2.4.22
send?
sendfile?2.2
sendfile64?2.6; 2.4.19
sendmmsg?3.0
sendmsg?
sendto?
set_mempolicy?2.6.6
set_robust_list?2.6.17
set_thread_area?2.6
set_tid_address?2.6
set_zone_reclaim?2.6.13Removed in 2.6.16 (was never available to userspace)
setdomainname?
setfsgid?1.2
setfsgid32?2.4
setfsuid?1.2
setfsuid32?2.4
setgid
setgid32?2.4
setgroups?
setgroups32?2.4
sethostname?
setitimer
setns?3.0
setpgid?
setpriority?
setregid?
setregid32?2.4
setresgid?2.2
setresgid32?2.4
setresuid?2.2
setresuid32?2.4
setreuid?
setreuid32?2.4
setrlimit?
setsid?
setsockopt
settimeofday?
setuid
setuid32?2.4
setupRemoved in 2.2
setxattr?2.6; 2.4.18
sgetmask?
shmat?
shmctl?
shmdt?
shmget?
shutdown
sigaction?
sigaltstack?2.2
signal?
signalfd?2.6.22
signalfd4?2.6.27
sigpending?
sigprocmask?
sigreturn?
sigsuspend?
socket
socketcall?
socketpair?
splice?2.6.17
spu_create?2.6.16PowerPC only
spu_run?2.6.16PowerPC only
ssetmask?
stat?
stat64?2.4
statfs?
statfs64?2.6
stime?
sttyNot implemented
subpage_prot?2.6.25PowerPC if CONFIG_PPC_64K_PAGES
swapoff
swapon
symlink?
symlinkat?2.6.16
sync
sync_file_range?2.6.17
sync_file_range2?2.6.22Architecture-specific variant
syncfs?2.6.39
sync_file_range?
sysfs1.2
sysinfo
syslog
tee2.6.17
tgkill?2.6
time
timer_create?2.6
timer_delete?2.6
timer_getoverrun?2.6
timer_gettime?2.6
timer_settime?2.6
timerfd_create?2.6.25
timerfd_gettime?2.6.25
timerfd_settime?2.6.25
times?
tkill?2.6; 2.4.22
truncate?
truncate64?2.4
tuxcall?Not implemented
ugetrlimit?2.4
ulimit?Not implemented
umask
umount
umount2?2.2
uname
unlink
unlinkat?2.6.16
unshare?2.6.16
uselib?
ustat?
utime?
utimensat?2.6.22
utimes?2.2
vfork?
vhangup?
vm86old?
vmsplice?2.6.17
vserver?Not implemented
wait4?
waitid?2.6.10
waitpid?
write
writev?2.0

関連