OSDN Git Service

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