OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man2 / syscalls.2
1 .\" Copyright (C) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
2 .\" with some input from Stepan Kasal <kasal@ucw.cz>
3 .\"
4 .\" Some content retained from an earlier version of this page:
5 .\" Copyright (C) 1998 Andries Brouwer (aeb@cwi.nl)
6 .\" Modifications for 2.2 and 2.4 Copyright (C) 2002 Ian Redfern
7 .\" <redferni@logica.com>
8 .\"
9 .\" Permission is granted to make and distribute verbatim copies of this
10 .\" manual provided the copyright notice and this permission notice are
11 .\" preserved on all copies.
12 .\"
13 .\" Permission is granted to copy and distribute modified versions of this
14 .\" manual under the conditions for verbatim copying, provided that the
15 .\" entire resulting derived work is distributed under the terms of a
16 .\" permission notice identical to this one.
17 .\"
18 .\" Since the Linux kernel and libraries are constantly changing, this
19 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
20 .\" responsibility for errors or omissions, or for damages resulting from
21 .\" the use of the information contained herein.  The author(s) may not
22 .\" have taken the same level of care in the production of this manual,
23 .\" which is licensed free of charge, as they might when working
24 .\" professionally.
25 .\"
26 .\" Formatted or processed versions of this manual, if unaccompanied by
27 .\" the source, must acknowledge the copyright and authors of this work.
28 .\"
29 .\"*******************************************************************
30 .\"
31 .\" This file was generated with po4a. Translate the source file.
32 .\"
33 .\"*******************************************************************
34 .TH SYSCALLS 2 2012\-03\-23 Linux "Linux Programmer's Manual"
35 .SH 名前
36 syscalls \- Linux のシステムコール
37 .SH 書式
38 Linux のシステムコール。
39 .SH 説明
40 システムコールは、アプリケーションと Linux カーネルとの間の 基本的なインタフェースである。
41 .SS システムコールとライブラリのラッパー関数
42 システムコールは一般には直接起動されず、 glibc (や他の何らかのライブラリ)  経由で起動される。 システムコールの直接起動については、詳細は
43 \fBintro\fP(2)  を参照のこと。 いつもという訳ではないが、普通は、ラッパー関数の名前はその関数が起動する システムコールの名前と同じである。
44 例えば、glibc には \fBtruncate\fP()  という関数があり、この関数は "truncate" システムコールを起動する。
45
46 たいていの場合、glibc のラッパー関数はかなり簡単なもので、 システムコールを起動する前に引き数を適切なレジスタにコピーし、
47 システムコールが返った後は \fIerrno\fP を適切に設定する以外は、ほとんど処理を行わない (これらは、ラッパー関数が提供されていない場合に
48 システムコールを起動するのに使用する \fBsyscall\fP(2)  により実行される処理と同じである)。 [注意]
49 システムコールは失敗を示すのに負のエラー番号を呼び出し元に返す。 失敗が起こった際には、ラッパー関数は返されたエラー番号を反転して
50 (正の値に変換し)、それを \fIerrno\fP にコピーし、ラッパー関数の呼び出し元に \-1 を返す。
51
52 しかしながら、時には、ラッパー関数がシステムコールを起動する前に 何らかの追加の処理を行う場合がある。 例えば、現在、 二つの関連するシステムコール
53 \fBtruncate\fP(2)  と \fBtruncate64\fP(2)  があり、glibc のラッパー関数 \fBtruncate\fP()
54 は、カーネルがこれらのシステムコールのうちどちらを提供しているかをチェックし、 どちらを採用するかを決定する。
55 .SS システムコールのリスト
56 以下は、ほとんどのプラットフォームに共通するシステムコールのリストである。 このリストで、 \fIKernel\fP の列は、Linux 2.2
57 以降で登場したシステムコールが 登場したカーネルバージョンを示す。 以下に詳細な説明を記す。
58 .IP * 3
59 カーネルバージョンがない場合、そのシステムコールは カーネル 1.0 もしくはそれ以前に登場した。
60 .IP *
61 システムコールに "1.2" と書かれている場合、 そのシステムコールがおそらくバージョン 1.1.x のカーネルで登場し、 安定版のカーネルでは
62 1.2 で初めて登場したことを意味する。 (バージョン 1.2 のカーネルは、カーネル 1.0.6 から分岐し、 バージョン 1.1.x
63 の不安定版のカーネル系列として開発された。)
64 .IP *
65 .\" Was kernel 2.0 started from a branch of 1.2.10?
66 .\" At least from the timestamps of the tarballs of
67 .\" of 1.2.10 and 1.3.0, that's how it looks, but in
68 .\" fact the diff doesn't seem very clear, the
69 .\" 1.3.0 .tar.bz is much bigger (2.0 MB) than the
70 .\" 1.2.10 .tar.bz2 (1.8 MB), and AEB points out the
71 .\" timestamps of some files in 1.3.0 seem to be older
72 .\" than those in 1.2.10.  All of this suggests
73 .\" that there might not have been a clean branch point.
74 システムコールに "2.0" と書かれている場合、 そのシステムコールがおそらくバージョン 1.3.x のカーネルで登場し、 安定版のカーネルでは
75 2.0 で初めて登場したことを意味する。 (バージョン 2.0 のカーネルは、バージョン 1.2.10 あたりのカーネル 1.2.x
76 から分岐し、バージョン 1.3.x の不安定版のカーネル系列として開発された。)
77 .IP *
78 システムコールに "2.2" と書かれている場合、 そのシステムコールがおそらくバージョン 2.1.x のカーネルで登場し、 安定版のカーネルでは
79 2.2.0 で初めて登場したことを意味する。 (バージョン 2.2 のカーネルは、カーネル 2.0.21 から分岐し、 バージョン 2.1.x
80 の不安定版のカーネル系列として開発された。)
81 .IP *
82 システムコールに "2.4" と書かれている場合、 そのシステムコールがおそらくバージョン 2.3.x のカーネルで登場し、 安定版のカーネルでは
83 2.4.0 で初めて登場したことを意味する。 (バージョン 2.4 のカーネルは、カーネル 2.2.8 から分岐し、 バージョン 2.3.x
84 の不安定版のカーネル系列として開発された。)
85 .IP *
86 システムコールに "2.6" と書かれている場合、 そのシステムコールがおそらくバージョン 2.5.x のカーネルで登場し、 安定版のカーネルでは
87 2.6.0 で初めて登場したことを意味する。 (バージョン 2.6 のカーネルは、カーネル 2.4.15 から分岐し、 バージョン 2.5.x
88 の不安定版のカーネル系列として開発された。)
89 .IP *
90 カーネル 2.6.0 から開発モデルは変更され、新しいシステムコールが
91 個々の 2.6.x のリリースでも登場するようになった。
92 その場合、このリストでは、システムコールが登場した
93 厳密なバージョン番号が記載されている。この慣習は、カーネル 2.6.39 の
94 後継となるバージョン 3.x 系列のカーネルでも継続されている。
95 .IP *
96 前の安定版カーネル系列から分岐した後に安定版カーネル系列にシステムコール が追加された場合、以前の安定版カーネル系列にそのシステムコールが 移植
97 (backport) されることがある。 例えば、2.6.x で登場したシステムコールのいくつかは、 2.4.15 以降の 2.4.x リリースにも
98 backport された。 この場合、システムコールが登場したバージョンとして、 両方の安定版系列のバージョンが記載されている。
99 .PP
100 .\"
101 .\" Looking at scripts/checksyscalls.sh in the kernel source is
102 .\" instructive about i386 specifics.
103 .\"
104 カーネル 3.1 で利用可能なシステムコールのリストを以下に示す
105 (それ以前のカーネルでだけ利用可能なものも少数だが含まれる):
106 .TS
107 l l l
108 ---
109 l l l.
110 \fBSystem call\fP       \fBKernel\fP    \fBNotes\fP
111
112 \fB_llseek\fP(2)        1.2
113 \fB_newselect\fP(2)
114 \fB_sysctl\fP(2)
115 \fBaccept\fP(2)
116 \fBaccept4\fP(2)        2.6.28
117 \fBaccess\fP(2)
118 \fBacct\fP(2)
119 \fBadd_key\fP(2)        2.6.11
120 \fBadjtimex\fP(2)
121 \fBalarm\fP(2)
122 \fBalloc_hugepages\fP(2)        2.5.36  2.5.44 で削除
123 \fBbdflush\fP(2)                Linux 2.6 以降では非推奨
124                 (何も行わない)
125 \fBbind\fP(2)
126 \fBbrk\fP(2)
127 \fBcacheflush\fP(2)     1.2     Not on i386
128 \fBcapget\fP(2) 2.2
129 \fBcapset\fP(2) 2.2
130 \fBchdir\fP(2)
131 \fBchmod\fP(2)
132 \fBchown\fP(2)
133 \fBchown32\fP(2)        2.4
134 \fBchroot\fP(2)
135 \fBclock_adjtime\fP(2)  2.6.39
136 \fBclock_getres\fP(2)   2.6
137 \fBclock_gettime\fP(2)  2.6
138 \fBclock_nanosleep\fP(2)        2.6
139 \fBclock_settime\fP(2)  2.6
140 \fBclone\fP(2)
141 \fBclose\fP(2)
142 \fBconnect\fP(2)
143 \fBcreat\fP(2)
144 \fBcreate_module\fP(2)  2.6 で削除
145 \fBdelete_module\fP(2)
146 \fBdup\fP(2)
147 \fBdup2\fP(2)
148 \fBdup3\fP(2)   2.6.27
149 \fBepoll_create\fP(2)   2.6
150 \fBepoll_create1\fP(2)  2.6.27
151 \fBepoll_ctl\fP(2)      2.6
152 \fBepoll_pwait\fP(2)    2.6.19
153 \fBepoll_wait\fP(2)     2.6
154 \fBeventfd\fP(2)        2.6.22
155 \fBeventfd2\fP(2)       2.6.27
156 \fBexecve\fP(2)
157 \fBexit\fP(2)
158 \fBexit_group\fP(2)     2.6
159 \fBfaccessat\fP(2)      2.6.16
160 \fBfadvise64\fP(2)      2.6
161 .\" Implements \fBposix_fadvise\fP(2)
162 \fBfadvise64_64\fP(2)   2.6
163 \fBfallocate\fP(2)      2.6.23
164 \fBfanotify_init\fP(2)  2.6.37
165 \fBfanotify_mark\fP(2)  2.6.37
166 .\" The fanotify calls were added in Linux 2.6.36,
167 .\" but disabled while the API was finalized.
168 \fBfchdir\fP(2)
169 \fBfchmod\fP(2)
170 \fBfchmodat\fP(2)       2.6.16
171 \fBfchown\fP(2)
172 \fBfchown32\fP(2)       2.4
173 \fBfchownat\fP(2)       2.6.16
174 \fBfcntl\fP(2)
175 \fBfcntl64\fP(2)        2.4
176 \fBfdatasync\fP(2)
177 \fBfgetxattr\fP(2)      2.6; 2.4.18
178 \fBflistxattr\fP(2)     2.6; 2.4.18
179 \fBflock\fP(2)  2.0
180 \fBfork\fP(2)
181 \fBfree_hugepages\fP(2) 2.5.36  2.5.44 で削除
182 \fBfremovexattr\fP(2)   2.6; 2.4.18
183 \fBfsetxattr\fP(2)      2.6; 2.4.18
184 \fBfstat\fP(2)
185 \fBfstat64\fP(2)        2.4
186 \fBfstatat64\fP(2)      2.6.16
187 \fBfstatfs\fP(2)
188 \fBfstatfs64\fP(2)      2.6
189 \fBfsync\fP(2)
190 \fBftruncate\fP(2)
191 \fBftruncate64\fP(2)    2.4
192 \fBfutex\fP(2)  2.6
193 \fBfutimesat\fP(2)      2.6.16
194 \fBget_kernel_syms\fP(2)        2.6 で削除
195 \fBget_mempolicy\fP(2)  2.6.6
196 \fBget_robust_list\fP(2)        2.6.17
197 \fBget_thread_area\fP(2)        2.6
198 \fBgetcpu\fP(2) 2.6.19
199 \fBgetcwd\fP(2) 2.2
200 \fBgetdents\fP(2)       2.0
201 \fBgetdents64\fP(2)     2.4
202 \fBgetegid\fP(2)
203 \fBgetegid32\fP(2)      2.4
204 \fBgeteuid\fP(2)
205 \fBgeteuid32\fP(2)      2.4
206 \fBgetgid\fP(2)
207 \fBgetgid32\fP(2)       2.4
208 \fBgetgroups\fP(2)
209 \fBgetgroups32\fP(2)    2.4
210 \fBgetitimer\fP(2)
211 \fBgetpeername\fP(2)
212 \fBgetpagesize\fP(2)    2.0     Not on i386
213 \fBgetpgid\fP(2)
214 \fBgetpgrp\fP(2)
215 \fBgetpid\fP(2)
216 \fBgetppid\fP(2)
217 \fBgetpriority\fP(2)
218 \fBgetresgid\fP(2)      2.2
219 \fBgetresgid32\fP(2)    2.4
220 \fBgetresuid\fP(2)      2.2
221 \fBgetresuid32\fP(2)    2.4
222 \fBgetrlimit\fP(2)
223 \fBgetrusage\fP(2)
224 \fBgetsid\fP(2) 2.0
225 \fBgetsockname\fP(2)
226 \fBgetsockopt\fP(2)
227 \fBgettid\fP(2) 2.4.11
228 \fBgettimeofday\fP(2)
229 \fBgetuid\fP(2)
230 \fBgetuid32\fP(2)       2.4
231 .\" \fBgetunwind\fP(2)  2.4.8   ia64; DEPRECATED
232 \fBgetxattr\fP(2)       2.6; 2.4.18
233 \fBinit_module\fP(2)
234 \fBinotify_add_watch\fP(2)      2.6.13
235 \fBinotify_init\fP(2)   2.6.13
236 \fBinotify_init1\fP(2)  2.6.27
237 \fBinotify_rm_watch\fP(2)       2.6.13
238 \fBio_cancel\fP(2)      2.6
239 \fBio_destroy\fP(2)     2.6
240 \fBio_getevents\fP(2)   2.6
241 \fBio_setup\fP(2)       2.6
242 \fBio_submit\fP(2)      2.6
243 \fBioctl\fP(2)
244 \fBioperm\fP(2)
245 \fBiopl\fP(2)
246 \fBioprio_get\fP(2)     2.6.13
247 \fBioprio_set\fP(2)     2.6.13
248 \fBipc\fP(2)
249 .\" Implements System V IPC calls
250 \fBkexec_load\fP(2)     2.6.13
251 .\" The entry in the syscall table was reserved starting in 2.6.7
252 .\" Was named sys_kexec_load() from 2.6.7 to 2.6.16
253 \fBkeyctl\fP(2) 2.6.11
254 \fBkill\fP(2)
255 \fBlchown\fP(2) 2.2
256 \fBlchown32\fP(2)       2.4
257 \fBlgetxattr\fP(2)      2.6; 2.4.18
258 \fBlink\fP(2)
259 \fBlinkat\fP(2) 2.6.16
260 \fBlisten\fP(2)
261 \fBlistxattr\fP(2)      2.6; 2.4.18
262 \fBllistxattr\fP(2)     2.6; 2.4.18
263 \fBlookup_dcookie\fP(2) 2.6
264 \fBlremovexattr\fP(2)   2.6; 2.4.18
265 \fBlseek\fP(2)
266 \fBlsetxattr\fP(2)      2.6; 2.4.18
267 \fBlstat\fP(2)
268 \fBlstat64\fP(2)        2.4
269 \fBmadvise\fP(2)        2.4
270 \fBmadvise1\fP(2)       2.4
271 \fBmbind\fP(2)  2.6.6
272 .\" \fBmemory_ordering\fP(2)    ???     Sparc64
273 \fBmigrate_pages\fP(2)  2.6.16
274 \fBmincore\fP(2)        2.4
275 \fBmkdir\fP(2)
276 \fBmkdirat\fP(2)        2.6.16
277 \fBmknod\fP(2)
278 \fBmknodat\fP(2)        2.6.16
279 \fBmlock\fP(2)
280 \fBmlockall\fP(2)
281 \fBmmap\fP(2)
282 \fBmmap2\fP(2)  2.4
283 \fBmodify_ldt\fP(2)
284 \fBmount\fP(2)
285 \fBmove_pages\fP(2)     2.6.18
286 \fBmprotect\fP(2)
287 \fBmq_getsetattr\fP(2)  2.6.6
288 .\" Implements \fBmq_getattr\fP(3) and \fBmq_setattr\fP(3)
289 \fBmq_notify\fP(2)      2.6.6
290 \fBmq_open\fP(2)        2.6.6
291 \fBmq_timedreceive\fP(2)        2.6.6
292 \fBmq_timedsend\fP(2)   2.6.6
293 \fBmq_unlink\fP(2)
294 \fBmremap\fP(2) 2.0
295 \fBmsgctl\fP(2)
296 \fBmsgget\fP(2)
297 \fBmsgrcv\fP(2)
298 \fBmsgsnd\fP(2)
299 \fBmsync\fP(2)  2.0
300 .\" \fBmultiplexer\fP(2)        ??      __NR_multiplexer reserved on
301 .\"             PowerPC, but unimplemented?
302 \fBmunlock\fP(2)
303 \fBmunlockall\fP(2)
304 \fBmunmap\fP(2)
305 \fBname_to_handle_at\fP(2)      2.6.39
306 \fBnanosleep\fP(2)      2.0
307 \fBnfsservctl\fP(2)     2.2     3.1 で削除
308 \fBnice\fP(2)
309 \fBoldfstat\fP(2)
310 \fBoldlstat\fP(2)
311 \fBoldolduname\fP(2)
312 \fBoldstat\fP(2)
313 \fBolduname\fP(2)
314 \fBopen\fP(2)
315 \fBopen_by_handle_at\fP(2)      2.6.39
316 \fBopenat\fP(2) 2.6.16
317 \fBpause\fP(2)
318 \fBpciconfig_iobase\fP(2)       2.2.15; 2.4     Not on i386
319 .\" Alpha, PowerPC, ARM; not i386
320 \fBpciconfig_read\fP(2) 2.0.26; 2.2     Not on i386
321 .\" , PowerPC, ARM; not i386
322 \fBpciconfig_write\fP(2)        2.0.26; 2.2     Not on i386
323 .\" , PowerPC, ARM; not i386
324 \fBperf_event_open\fP(2)        2.6.31  Was called perf_counter_open()
325                 in 2.6.31; renamed in 2.6.32
326 \fBpersonality\fP(2)    1.2
327 .\" \fBperfctr\fP(2)    ???     Sparc32, Sparc64
328 .\" \fBperfmonctl\fP(2) ???     ia64
329 \fBpipe\fP(2)
330 \fBpipe2\fP(2)  2.6.27
331 \fBpivot_root\fP(2)     2.4
332 \fBpoll\fP(2)   2.2
333 \fBppoll\fP(2)  2.6.16
334 \fBprctl\fP(2)  2.2
335 \fBpread64\fP(2)                Added as "pread" in 2.2;
336                 renamed "pread64" in 2.6
337 \fBpreadv\fP(2) 2.6.30
338 \fBprlimit\fP(2)        2.6.36
339 \fBprocess_vm_readv(2)\fP       3.2
340 \fBprocess_vm_writev(2)\fP      3.2
341 \fBpselect6\fP(2)       2.6.16
342 .\" Implements \fBpselect\fP(2)
343 \fBptrace\fP(2)
344 \fBpwrite64\fP(2)               Added as "pwrite" in 2.2;
345                 renamed "pwrite64" in 2.6
346 \fBpwritev\fP(2)        2.6.30
347 \fBquery_module\fP(2)   2.2     2.6 で削除
348 \fBquotactl\fP(2)
349 \fBread\fP(2)
350 \fBreadahead\fP(2)      2.4.13
351 \fBreaddir\fP(2)
352 .\" Supersedes \fBgetdents\fP(2)
353 \fBreadlink\fP(2)
354 \fBreadlinkat\fP(2)     2.6.16
355 \fBreadv\fP(2)  2.0
356 \fBreboot\fP(2)
357 \fBrecv\fP(2)
358 \fBrecvfrom\fP(2)
359 \fBrecvmsg\fP(2)
360 \fBrecvmmsg\fP(2)       2.6.33
361 \fBremap_file_pages\fP(2)       2.6
362 \fBremovexattr\fP(2)    2.6; 2.4.18
363 \fBrename\fP(2)
364 \fBrenameat\fP(2)       2.6.16
365 \fBrequest_key\fP(2)    2.6.11
366 \fBrestart_syscall\fP(2)        2.6
367 \fBrmdir\fP(2)
368 \fBrt_sigaction\fP(2)   2.2
369 \fBrt_sigpending\fP(2)  2.2
370 \fBrt_sigprocmask\fP(2) 2.2
371 \fBrt_sigqueueinfo\fP(2)        2.2
372 \fBrt_sigreturn\fP(2)   2.2
373 \fBrt_sigsuspend\fP(2)  2.2
374 \fBrt_sigtimedwait\fP(2)        2.2
375 \fBrt_tgsigqueueinfo\fP(2)      2.6.31
376 \fBsched_get_priority_max\fP(2) 2.0
377 \fBsched_get_priority_min\fP(2) 2.0
378 \fBsched_getaffinity\fP(2)      2.6
379 \fBsched_getparam\fP(2) 2.0
380 \fBsched_getscheduler\fP(2)     2.0
381 \fBsched_rr_get_interval\fP(2)  2.0
382 \fBsched_setaffinity\fP(2)      2.6
383 \fBsched_setparam\fP(2) 2.0
384 \fBsched_setscheduler\fP(2)     2.0
385 \fBsched_yield\fP(2)    2.0
386 \fBselect\fP(2)
387 \fBsemctl\fP(2)
388 \fBsemget\fP(2)
389 \fBsemop\fP(2)
390 \fBsemtimedop\fP(2)     2.6; 2.4.22
391 \fBsend\fP(2)
392 \fBsendfile\fP(2)       2.2
393 \fBsendfile64\fP(2)     2.6; 2.4.19
394 \fBsendmmsg\fP(2)       3.0
395 \fBsendmsg\fP(2)
396 \fBsendto\fP(2)
397 \fBset_mempolicy\fP(2)  2.6.6
398 \fBset_robust_list\fP(2)        2.6.17
399 \fBset_thread_area\fP(2)        2.6
400 \fBset_tid_address\fP(2)        2.6
401 \fBset_zone_reclaim\fP(2)       2.6.13  2.6.16 で削除 (ユーザ空間に
402                 公開されたことはない)
403 .\" See http://lkml.org/lkml/2005/8/1/83
404 .\" "[PATCH] remove sys_set_zone_reclaim()"
405 \fBsetdomainname\fP(2)
406 \fBsetfsgid\fP(2)       1.2
407 \fBsetfsgid32\fP(2)     2.4
408 \fBsetfsuid\fP(2)       1.2
409 \fBsetfsuid32\fP(2)     2.4
410 \fBsetgid\fP(2)
411 \fBsetgid32\fP(2)       2.4
412 \fBsetgroups\fP(2)
413 \fBsetgroups32\fP(2)    2.4
414 \fBsethostname\fP(2)
415 \fBsetitimer\fP(2)
416 \fBsetns\fP(2)  3.0
417 \fBsetpgid\fP(2)
418 \fBsetpriority\fP(2)
419 \fBsetregid\fP(2)
420 \fBsetregid32\fP(2)     2.4
421 \fBsetresgid\fP(2)      2.2
422 \fBsetresgid32\fP(2)    2.4
423 \fBsetresuid\fP(2)      2.2
424 \fBsetresuid32\fP(2)    2.4
425 \fBsetreuid\fP(2)
426 \fBsetreuid32\fP(2)     2.4
427 \fBsetrlimit\fP(2)
428 \fBsetsid\fP(2)
429 \fBsetsockopt\fP(2)
430 \fBsettimeofday\fP(2)
431 \fBsetuid\fP(2)
432 \fBsetuid32\fP(2)       2.4
433 \fBsetup\fP(2)          2.2 で削除
434 \fBsetxattr\fP(2)       2.6; 2.4.18
435 \fBsgetmask\fP(2)
436 \fBshmat\fP(2)
437 \fBshmctl\fP(2)
438 \fBshmdt\fP(2)
439 \fBshmget\fP(2)
440 \fBshutdown\fP(2)
441 \fBsigaction\fP(2)
442 \fBsigaltstack\fP(2)    2.2
443 \fBsignal\fP(2)
444 \fBsignalfd\fP(2)       2.6.22
445 \fBsignalfd4\fP(2)      2.6.27
446 \fBsigpending\fP(2)
447 \fBsigprocmask\fP(2)
448 \fBsigreturn\fP(2)
449 \fBsigsuspend\fP(2)
450 \fBsocket\fP(2)
451 \fBsocketcall\fP(2)
452 .\" Implements BSD socket calls
453 \fBsocketpair\fP(2)
454 \fBsplice\fP(2) 2.6.17
455 \fBspu_create\fP(2)     2.6.16  PowerPC only
456 \fBspu_run\fP(2)        2.6.16  PowerPC only
457 \fBssetmask\fP(2)
458 \fBstat\fP(2)
459 \fBstat64\fP(2) 2.4
460 \fBstatfs\fP(2)
461 \fBstatfs64\fP(2)       2.6
462 \fBstime\fP(2)
463 \fBsubpage_prot\fP(2)   2.6.25  PowerPC if CONFIG_PPC_64K_PAGES
464 \fBswapoff\fP(2)
465 \fBswapon\fP(2)
466 \fBsymlink\fP(2)
467 \fBsymlinkat\fP(2)      2.6.16
468 \fBsync\fP(2)
469 \fBsync_file_range\fP(2)        2.6.17
470 \fBsync_file_range2\fP(2)       2.6.22  Architecture\-specific variant
471 .\" PowerPC, ARM, tile
472 .\" First appeared on ARM, as arm_sync_file_range(), but later renamed
473                 of \fBsync_file_range\fP(2)
474 .\" \fBsys_debug_setcontext\fP(2)       ???     PowerPC if CONFIG_PPC32
475 \fBsyncfs\fP(2) 2.6.39
476 \fBsysfs\fP(2)  1.2
477 \fBsysinfo\fP(2)
478 \fBsyslog\fP(2)
479 .\" glibc interface is \fBklogctl\fP(3)
480 \fBtee\fP(2)    2.6.17
481 \fBtgkill\fP(2) 2.6
482 \fBtime\fP(2)
483 \fBtimer_create\fP(2)   2.6
484 \fBtimer_delete\fP(2)   2.6
485 \fBtimer_getoverrun\fP(2)       2.6
486 \fBtimer_gettime\fP(2)  2.6
487 \fBtimer_settime\fP(2)  2.6
488 \fBtimerfd_create\fP(2) 2.6.25
489 \fBtimerfd_gettime\fP(2)        2.6.25
490 \fBtimerfd_settime\fP(2)        2.6.25
491 \fBtimes\fP(2)
492 \fBtkill\fP(2)  2.6; 2.4.22
493 \fBtruncate\fP(2)
494 \fBtruncate64\fP(2)     2.4
495 \fBugetrlimit\fP(2)     2.4
496 \fBumask\fP(2)
497 \fBumount\fP(2)
498 .\" sys_oldumount() -- __NR_umount
499 \fBumount2\fP(2)        2.2
500 .\" sys_umount() -- __NR_umount2
501 \fBuname\fP(2)
502 \fBunlink\fP(2)
503 \fBunlinkat\fP(2)       2.6.16
504 \fBunshare\fP(2)        2.6.16
505 \fBuselib\fP(2)
506 \fBustat\fP(2)
507 \fButime\fP(2)
508 \fButimensat\fP(2)      2.6.22
509 \fButimes\fP(2) 2.2
510 \fBvfork\fP(2)
511 \fBvhangup\fP(2)
512 \fBvm86old\fP(2)
513 .\" Superseded by \fBvm86\fP(2)
514 \fBvmsplice\fP(2)       2.6.17
515 \fBwait4\fP(2)
516 \fBwaitid\fP(2) 2.6.10
517 \fBwaitpid\fP(2)
518 \fBwrite\fP(2)
519 \fBwritev\fP(2) 2.0
520 .TE
521 .PP
522 i386 を含む多くのプラットフォームでは、ソケット関連のシステムコールは (glibc のラッパー関数を介してだが) すべて
523 \fBsocketcall\fP(2)  経由に多重されている。 同様に、System V IPC 関連のシステムコールは \fBipc\fP(2)
524 経由に多重されている。
525
526 .\" __NR_afs_syscall is 53 on Linux 2.6.22/i386
527 .\" __NR_break is 17 on Linux 2.6.22/i386
528 .\" __NR_ftime is 35 on Linux 2.6.22/i386
529 .\" __NR_getpmsg is 188 on Linux 2.6.22/i386
530 .\" __NR_gtty is 32 on Linux 2.6.22/i386
531 .\" __NR_idle is 112 on Linux 2.6.22/i386
532 .\" __NR_lock is 53 on Linux 2.6.22/i386
533 .\" __NR_madvise1 is 219 on Linux 2.6.22/i386
534 .\" __NR_mpx is 66 on Linux 2.6.22/i386
535 .\" Slot has been reused
536 .\" __NR_prof is 44 on Linux 2.6.22/i386
537 .\" __NR_profil is 98 on Linux 2.6.22/i386
538 .\" __NR_putpmsg is 189 on Linux 2.6.22/i386
539 .\" __NR_security is 223 on Linux 2.4/i386
540 .\" __NR_security is 223 on Linux 2.4/i386; absent on 2.6/i386, present
541 .\" on a couple of 2.6 architectures
542 .\" __NR_stty is 31 on Linux 2.6.22/i386
543 .\" The security call is for future use.
544 .\" __NR_tuxcall is 184 on x86_64, also on PPC and alpha
545 .\" __NR_ulimit is 58 on Linux 2.6.22/i386
546 .\" __NR_vserver is 273 on Linux 2.6.22/i386
547 以下のシステムコールは、システムコール・テーブルにスロットが予約されているが、
548 標準のカーネルには実装されていない:
549 \fBafs_syscall\fP(2), \fBbreak\fP(2), \fBftime\fP(2), \fBgetpmsg\fP(2), \fBgtty\fP(2),
550 \fBidle\fP(2), \fBlock\fP(2), \fBmadvise1\fP(2), \fBmpx\fP(2), \fBphys\fP(2), \fBprof\fP(2),
551 \fBprofil\fP(2), \fBputpmsg\fP(2), \fBsecurity\fP(2), \fBstty\fP(2), \fBtuxcall\fP(2),
552 \fBulimit\fP(2), \fBvserver\fP(2) (\fBunimplemented\fP(2) も参照)。
553 しかし、\fBftime\fP(3), \fBprofil\fP(3), \fBulimit\fP(3) はライブラリ・ルーチンとして
554 実装されている。 \fBphys\fP(2) 用の場所は 2.1.116 以降では \fBumount\fP(2) 用に
555 使用されている; 将来においても \fBphys\fP(2) は実装されない。
556 \fBgetpmsg\fP(2) と \fBputpmsg\fP(2) は STREAMS 対応のパッチが適用された
557 カーネル用であり、標準のカーネルに登場することはないかもしれない。
558 .SH 注意
559 .PP
560 たいていは、 \fI/usr/include/asm/unistd.h\fP で定義されている番号 __NR_xxx のシステムコールのコードは、
561 カーネル・ソースの \fIsys_xxx\fP()  というルーチンに書かれている (i386 における実行テーブルは
562 \fI/usr/src/linux/arch/i386/kernel/entry.S\fP に書かれている)。
563 しかしこれには多くの例外がある。古いシステムコールは新版に置き換えられて きたが、この置き換えはあまり体系立てて行われて来なかったからである。
564 parisc, sparc, sparc64, alpha といったプロプリエタリ OS のエミュレーション
565 機能があるプラットフォームでは、多くの追加システムコールがある。 mips64 には、32 ビットシステムコールのフルセットも含まれている。
566
567 時間の経過とともに、いくつかのシステムコールではインタフェースの 変更が必要になってきた。
568 こうした変更の理由の一つは、システムコールに渡される構造体やスカラー値 のサイズを増やす必要があることだった。
569 これらの変更の結果、現在では、同様の処理を実行するが 引き数のサイズなどの詳細は異なる、一連のシステムコール群が いくつか存在する (例えば、
570 \fBtruncate\fP(2)  と \fBtruncate64\fP(2))。 (すでに述べたように、
571 一般にはアプリケーションがこのことを意識することはない。 glibc のラッパー関数が、適切なシステムコールを起動し、古いバイナリに 対して ABI
572 レベルでの互換性を保持することを保証する処理を行っている。)  複数のバージョンが存在するシステムコールの例を以下に挙げる。
573 .IP * 3
574 .\" e.g., on 2.6.22/i386: __NR_oldstat 18, __NR_stat 106, __NR_stat64 195
575 .\" The stat system calls deal with three different data structures,
576 .\" defined in include/asm-i386/stat.h: __old_kernel_stat, stat, stat64
577 これまでに、 \fBstat\fP(2)  には 3 種類の異なるバージョンが存在する。 \fIsys_stat\fP()  (スロットは
578 \fI__NR_oldstat\fP)、 \fIsys_newstat\fP()  (スロットは \fI__NR_stat\fP)、 \fIsys_stat64\fP()
579 (カーネル 2.4 で導入; スロットは \fI__NR_stat64\fP)。 3つのうち最後のものが最新である。 \fBlstat\fP(2)  と
580 \fBfstat\fP(2)  についても同様である。
581 .IP *
582 また、 \fI__NR_oldolduname\fP, \fI__NR_olduname\fP, \fI__NR_uname\fP という定義は、それぞれ
583 \fIsys_olduname\fP(), \fIsys_uname\fP(), \fIsys_newuname\fP()  というルーチンを参照している。
584 .IP *
585 Linux 2.0 では、 \fBvm86\fP(2)  の新バージョンが登場した。カーネルルーチンの 古いバージョン、新しいバージョンはそれぞれ
586 \fIsys_vm86old\fP(), \fIsys_vm86\fP()  という名前である。
587 .IP *
588 Linux 2.4 では、 \fBgetrlimit\fP(2)  の新バージョンが登場した。カーネルルーチンの 古いバージョン、新しいバージョンはそれぞれ
589 \fIsys_old_getrlimit\fP()  (スロットは \fI__NR_getrlimit\fP), \fIsys_getrlimit\fP()
590 (スロットは \fI__NR_ugetrlimit\fP)  という名前である。
591 .IP *
592 .\" 64-bit off_t changes: ftruncate64, *stat64,
593 .\" fcntl64 (because of the flock structure), getdents64, *statfs64
594 Linux 2.4 で、ユーザ ID とグループ ID のサイズが 16 ビットから 32 ビットに増えた。
595 この変更に対応するため、いくつかのシステムコールが追加された (\fBchown32\fP(2), \fBgetuid32\fP(2),
596 \fBgetgroups32\fP(2), \fBsetresuid32\fP(2)  など)。 これらのシステムコールが、末尾の "32" が付かない同名の
597 古いバージョンに代わって使われるようになった。
598 .IP *
599 Linux 2.4 では、32 ビット・アーキテクチャ上のアプリケーションが 大きなファイル (つまり、32 ビットでは表現できないサイズや
600 ファイル・オフセットが必要なファイル) にアクセスできるようになった。 この変更に対応するため、ファイル・オフセットとサイズを扱う
601 システムコールの置き換えが必要となった。その結果、 \fBfcntl64\fP(2), \fBftruncate64\fP(2),
602 \fBgetdents64\fP(2), \fBstat64\fP(2), \fBstatfs64\fP(2)
603 と、ファイルディスクリプタやシンボリックリンクで同じ機能を持つ システムコールが追加された。 これらのシステムコールが、末尾の "64"
604 が付かない同名の 古いバージョンに代わって使われるようになった。 但し、"stat" 系のシステムコールはその限りではない。
605
606 64\-bit ファイルアクセスと 32\-bit UID のみを持つ 新しいプラットフォーム (alpha, ia64, s390x など) では、
607 *64 や *32 という名前のシステムコールはない。 *64 や *32 というシステムコールが存在する場合、 *64 や *32
608 がついていないシステムコールは廃止扱いである。
609 .IP *
610 リアルタイムシグナル (\fBsignal\fP(7)  参照) への対応を追加するために、 \fIrt_sig*\fP 系のシステムコールがカーネル 2.2
611 で追加された。 これらのシステムコールが、先頭に "rt_" が付かない同名の 古いバージョンに代わって使われるようになった。
612 .IP *
613 .\" (used by libc 6)
614 .\" .PP
615 .\" Two system call numbers,
616 .\" .IR __NR__llseek
617 .\" and
618 .\" .IR __NR__sysctl
619 .\" have an additional underscore absent in
620 .\" .IR sys_llseek ()
621 .\" and
622 .\" .IR sys_sysctl ().
623 .\"
624 .\" In kernel 2.1.81,
625 .\" .BR lchown (2)
626 .\" and
627 .\" .BR chown (2)
628 .\" were swapped; that is,
629 .\" .BR lchown (2)
630 .\" was added with the semantics that were then current for
631 .\" .BR chown (2),
632 .\" and the semantics of the latter call were changed to what
633 .\" they are today.
634 \fBselect\fP(2)  と \fBmmap\fP(2)  は 5つもしくはそれ以上の引き数を使用しており、 i386 では引き数の受け渡しに問題が生じる。
635 そのため、他のアーキテクチャでは \fI__NR_select\fP と \fI__NR_mmap\fP に対応する \fIsys_select\fP()  と
636 \fIsys_mmap\fP()  が存在するが、i386 では代わりに \fIold_select\fP()  と \fIold_mmap\fP()
637 というルーチンがある (これらのルーチンは引き数ブロックへのポインタを使用する)。 現在では 5つの引き数を渡すことはもはや問題ではなくなっており、
638 \fI__NR__newselect\fP は \fIsys_select\fP()  に直接対応するようになっている。 \fI__NR_mmap2\fP
639 についても同様である。
640 .SH 関連項目
641 \fBsyscall\fP(2), \fBunimplemented\fP(2), \fBlibc\fP(7)