OSDN Git Service

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