OSDN Git Service

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