File: syscalls.2

package info (click to toggle)
manpages-ja 0.5.0.0.20221215%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 29,304 kB
  • sloc: perl: 161; makefile: 61
file content (962 lines) | stat: -rw-r--r-- 37,432 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
.\" Copyright (C) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
.\" with some input from Stepan Kasal <kasal@ucw.cz>
.\"
.\" Some content retained from an earlier version of this page:
.\" Copyright (C) 1998 Andries Brouwer (aeb@cwi.nl)
.\" Modifications for 2.2 and 2.4 Copyright (C) 2002 Ian Redfern
.\" <redferni@logica.com>
.\"
.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\" %%%LICENSE_END
.\"
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.\"
.\" Japanese Version Copyright (c) 1998 HANATAKA Shinya
.\"         all rights reserved.
.\" Translated 1998-07-22, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\" Updated 2003-02-06, Kentaro Shirakata <argrath@ub32.org>
.\" Modified 2005-04-05, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\" Updated 2007-09-08, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.64
.\" Updated 2008-11-09, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.13
.\" Updated 2012-04-30, Akihiro MOTOKI <amotoki@gmail.com>
.\" Updated 2012-05-29, Akihiro MOTOKI <amotoki@gmail.com>
.\" Updated 2013-05-01, Akihiro MOTOKI <amotoki@gmail.com>
.\"
.TH SYSCALLS 2 2020\-12\-21 Linux "Linux Programmer's Manual"
.SH 名前
syscalls \- Linux のシステムコール
.SH 書式
Linux のシステムコール。
.SH 説明
システムコールは、アプリケーションと Linux カーネルとの間の 基本的なインターフェースである。
.SS システムコールとライブラリのラッパー関数
システムコールは一般には直接起動されず、 glibc (や他の何らかのライブラリ)  経由で起動される。 システムコールの直接起動については、詳細は
\fBintro\fP(2)  を参照のこと。 いつもという訳ではないが、普通は、ラッパー関数の名前はその関数が起動する システムコールの名前と同じである。
例えば、glibc には \fBchdir\fP()  という関数があり、この関数は "chdir" システムコールを起動する。
.PP
Often the glibc wrapper function is quite thin, doing little work other than
copying arguments to the right registers before invoking the system call,
and then setting \fIerrno\fP appropriately after the system call has returned.
(These are the same steps that are performed by \fBsyscall\fP(2), which can be
used to invoke system calls for which no wrapper function is provided.)
Note: system calls indicate a failure by returning a negative error number
to the caller on architectures without a separate error register/flag, as
noted in \fBsyscall\fP(2); when this happens, the wrapper function negates the
returned error number (to make it positive), copies it to \fIerrno\fP, and
returns \-1 to the caller of the wrapper.
.PP
しかしながら、時には、ラッパー関数がシステムコールを起動する前に 何らかの追加の処理を行う場合がある。 例えば、現在、 二つの関連するシステムコール
\fBtruncate\fP(2)  と \fBtruncate64\fP(2)  があり、glibc のラッパー関数 \fBtruncate\fP()
は、カーネルがこれらのシステムコールのうちどちらを提供しているかをチェックし、 どちらを採用するかを決定する。
.SS システムコールのリスト
以下は Linux のシステムコールのリストである。 このリストで、 \fIKernel\fP の列は、Linux 2.2 以降で登場したシステムコールが
登場したカーネルバージョンを示す。 以下に詳細な説明を記す。
.IP * 3
カーネルバージョンがない場合、そのシステムコールは カーネル 1.0 もしくはそれ以前に登場した。
.IP *
システムコールに "1.2" と書かれている場合、 そのシステムコールがおそらくバージョン 1.1.x のカーネルで登場し、 安定版のカーネルでは
1.2 で初めて登場したことを意味する。 (バージョン 1.2 のカーネルは、カーネル 1.0.6 から分岐し、 バージョン 1.1.x
の不安定版のカーネル系列として開発された。)
.IP *
.\" Was kernel 2.0 started from a branch of 1.2.10?
.\" At least from the timestamps of the tarballs of
.\" of 1.2.10 and 1.3.0, that's how it looks, but in
.\" fact the diff doesn't seem very clear, the
.\" 1.3.0 .tar.bz is much bigger (2.0 MB) than the
.\" 1.2.10 .tar.bz2 (1.8 MB), and AEB points out the
.\" timestamps of some files in 1.3.0 seem to be older
.\" than those in 1.2.10.  All of this suggests
.\" that there might not have been a clean branch point.
システムコールに "2.0" と書かれている場合、 そのシステムコールがおそらくバージョン 1.3.x のカーネルで登場し、 安定版のカーネルでは
2.0 で初めて登場したことを意味する。 (バージョン 2.0 のカーネルは、バージョン 1.2.10 あたりのカーネル 1.2.x
から分岐し、バージョン 1.3.x の不安定版のカーネル系列として開発された。)
.IP *
システムコールに "2.2" と書かれている場合、 そのシステムコールがおそらくバージョン 2.1.x のカーネルで登場し、 安定版のカーネルでは
2.2.0 で初めて登場したことを意味する。 (バージョン 2.2 のカーネルは、カーネル 2.0.21 から分岐し、 バージョン 2.1.x
の不安定版のカーネル系列として開発された。)
.IP *
システムコールに "2.4" と書かれている場合、 そのシステムコールがおそらくバージョン 2.3.x のカーネルで登場し、 安定版のカーネルでは
2.4.0 で初めて登場したことを意味する。 (バージョン 2.4 のカーネルは、カーネル 2.2.8 から分岐し、 バージョン 2.3.x
の不安定版のカーネル系列として開発された。)
.IP *
システムコールに "2.6" と書かれている場合、 そのシステムコールがおそらくバージョン 2.5.x のカーネルで登場し、 安定版のカーネルでは
2.6.0 で初めて登場したことを意味する。 (バージョン 2.6 のカーネルは、カーネル 2.4.15 から分岐し、 バージョン 2.5.x
の不安定版のカーネル系列として開発された。)
.IP *
Starting with kernel 2.6.0, the development model changed, and new system
calls may appear in each 2.6.x release.  In this case, the exact version
number where the system call appeared is shown.  This convention continues
with the 3.x kernel series, which followed on from kernel 2.6.39; and the
4.x kernel series, which followed on from kernel 3.19; and the 5.x kernel
series, which followed on from kernel 4.20.
.IP *
前の安定版カーネル系列から分岐した後に安定版カーネル系列にシステムコール が追加された場合、以前の安定版カーネル系列にそのシステムコールが 移植
(backport) されることがある。 例えば、2.6.x で登場したシステムコールのいくつかは、 2.4.15 以降の 2.4.x リリースにも
backport された。 この場合、システムコールが登場したバージョンとして、 両方の安定版系列のバージョンが記載されている。
.PP
.\"
.\" Looking at scripts/checksyscalls.sh in the kernel source is
.\" instructive about x86 specifics.
.\"
カーネル 5.10 で利用可能なシステムコールのリストを以下に示す (それ以前のカーネルでだけ利用可能なものも少数だが含まれる):
.ad l
.TS
l2 le l
---
l l l.
\fBSystem call\fP	\fBKernel\fP	\fBNotes\fP

\fB_llseek\fP(2)	1.2
\fB_newselect\fP(2)	2.0
\fB_sysctl\fP(2)	2.0	Removed in 5.5
\fBaccept\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBaccept4\fP(2)	2.6.28
\fBaccess\fP(2)	1.0
\fBacct\fP(2)	1.0
\fBadd_key\fP(2)	2.6.10
\fBadjtimex\fP(2)	1.0
\fBalarm\fP(2)	1.0
\fBalloc_hugepages\fP(2)	2.5.36	2.5.44 で削除
.\" 4adeefe161a74369e44cc8e663f240ece0470dc3
 \fBarc_gettls\fP(2)	 3.9	ARC のみ
 \fBarc_settls\fP(2)	 3.9	ARC のみ
.\" 91e040a79df73d371f70792f30380d4e44805250
 \fBarc_usr_cmpxchg\fP(2)	4.9	ARC のみ
.\" x86: 79170fda313ed5be2394f87aa2a00d597f8ed4a1
 \fBarch_prctl\fP(2)	2.6	x86_64, x86 since 4.12
.\" 9674cdc74d63f346870943ef966a034f8c71ee57
 \fBatomic_barrier\fP(2)	 2.6.34	m68k のみ
\fBatomic_cmpxchg_32\fP(2)	 2.6.34	m68k のみ
\fBbdflush\fP(2)	1.2	T{
2.6 以降で非推奨
.br
(何もしない)
T}
\fBbind\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBbpf\fP(2)	3.18
\fBbrk\fP(2)	1.0
 \fBbreakpoint\fP(2)	2.2	T{
ARM OABI only, defined with
.br
\fB__ARM_NR\fP prefix
T}
\fBcacheflush\fP(2)	1.2	x86 にはない
\fBcapget\fP(2)	2.2
\fBcapset\fP(2)	2.2
\fBchdir\fP(2)	1.0
\fBchmod\fP(2)	1.0
\fBchown\fP(2)	2.2	T{
バージョン毎の詳細は
.br
\fBchown\fP(2) を参照。
T}
\fBchown32\fP(2)	2.4
\fBchroot\fP(2)	1.0
\fBclock_adjtime\fP(2)	2.6.39
\fBclock_getres\fP(2)	2.6
\fBclock_gettime\fP(2)	2.6
\fBclock_nanosleep\fP(2)	2.6
\fBclock_settime\fP(2)	2.6
 \fBclone2\fP(2)	2.4	IA\-64 のみ
\fBclone\fP(2)	1.0
 \fBclone3\fP(2)	 5.3
\fBclose\fP(2)	1.0
 \fBclose_range\fP(2)	5.9
.\" .\" dcef1f634657dabe7905af3ccda12cf7f0b6fcc1
.\" .\" cc20d42986d5807cbe4f5c7c8e3dab2e59ea0db3
.\" .\" db695c0509d6ec9046ee5e4c520a19fa17d9fce2
.\" \fBcmpxchg\fP(2)	2.6.12	T{
.\" ARM, syscall constant never was
.\" .br
.\" exposed to userspace, in-kernel
.\" .br
.\" definition had \fB__ARM_NR\fP prefix,
.\" .br
.\" removed in 4.4
.\" T}
.\" 867e359b97c970a60626d5d76bbe2a8fadbf38fb
.\" bb9d812643d8a121df7d614a2b9c60193a92deb0
\fBconnect\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
 \fBcopy_file_range\fP(2)	 4.5
\fBcreat\fP(2)	1.0
\fBcreate_module\fP(2)	1.0	2.6 で削除
\fBdelete_module\fP(2)	1.0
.\" 1394f03221790a988afc3e4b3cb79f2e477246a9
.\" 4ba66a9760722ccbb691b8f7116cad2f791cca7b
\fBdup\fP(2)	1.0
\fBdup2\fP(2)	1.0
\fBdup3\fP(2)	2.6.27
\fBepoll_create\fP(2)	2.6
\fBepoll_create1\fP(2)	2.6.27
\fBepoll_ctl\fP(2)	2.6
\fBepoll_pwait\fP(2)	2.6.19
\fBepoll_wait\fP(2)	2.6
\fBeventfd\fP(2)	2.6.22
\fBeventfd2\fP(2)	2.6.27
 \fBexecv\fP(2)	2.0	T{
SPARC/SPARC64 のみ、
.br
SunOS との互換性のため
T}
\fBexecve\fP(2)	1.0
\fBexecveat\fP(2)	3.19
\fBexit\fP(2)	1.0
\fBexit_group\fP(2)	2.6
\fBfaccessat\fP(2)	2.6.16
 \fBfaccessat2\fP(2)	 5.8
\fBfadvise64\fP(2)	2.6
.\" Implements \fBposix_fadvise\fP(2)
\fBfadvise64_64\fP(2)	2.6
\fBfallocate\fP(2)	2.6.23
\fBfanotify_init\fP(2)	2.6.37
\fBfanotify_mark\fP(2)	2.6.37
.\" The fanotify calls were added in Linux 2.6.36,
.\" but disabled while the API was finalized.
\fBfchdir\fP(2)	1.0
\fBfchmod\fP(2)	1.0
\fBfchmodat\fP(2)	2.6.16
\fBfchown\fP(2)	1.0
\fBfchown32\fP(2)	2.4
\fBfchownat\fP(2)	2.6.16
\fBfcntl\fP(2)	1.0
\fBfcntl64\fP(2)	2.4
\fBfdatasync\fP(2)	2.0
\fBfgetxattr\fP(2)	2.6; 2.4.18
\fBfinit_module\fP(2)	3.8
\fBflistxattr\fP(2)	2.6; 2.4.18
\fBflock\fP(2)	2.0
\fBfork\fP(2)	1.0
\fBfree_hugepages\fP(2)	2.5.36	2.5.44 で削除
\fBfremovexattr\fP(2)	2.6; 2.4.18
 \fBfsconfig\fP(2)	 5.2
\fBfsetxattr\fP(2)	2.6; 2.4.18
 \fBfsmount\fP(2)	 5.2
 \fBfsopen\fP(2)	 5.2
 \fBfspick\fP(2)	 5.2
\fBfstat\fP(2)	1.0
\fBfstat64\fP(2)	2.4
\fBfstatat64\fP(2)	2.6.16
\fBfstatfs\fP(2)	1.0
\fBfstatfs64\fP(2)	2.6
\fBfsync\fP(2)	1.0
\fBftruncate\fP(2)	1.0
\fBftruncate64\fP(2)	2.4
\fBfutex\fP(2)	2.6
\fBfutimesat\fP(2)	2.6.16
\fBget_kernel_syms\fP(2)	1.0	2.6 で削除
\fBget_mempolicy\fP(2)	2.6.6
\fBget_robust_list\fP(2)	2.6.17
\fBget_thread_area\fP(2)	2.6
.\" 8fcd6c45f5a65621ec809b7866a3623e9a01d4ed
 \fBget_tls\fP(2)	4.15	T{
ARM OABI only, has
.br
\fB__ARM_NR\fP prefix
T}
\fBgetcpu\fP(2)	2.6.19
\fBgetcwd\fP(2)	2.2
\fBgetdents\fP(2)	2.0
\fBgetdents64\fP(2)	2.4
.\" parisc: 863722e856e64dae0e252b6bb546737c6c5626ce
 \fBgetdomainname\fP(2)	2.2	T{
SPARC, SPARC64; available
.br
as \fBosf_getdomainname\fP(2)
.br
on Alpha since Linux 2.0
T}
.\" ec98c6b9b47df6df1c1fa6cf3d427414f8c2cf16
 \fBgetdtablesize\fP(2)	2.0	T{
SPARC (2.6.26 で削除),
.br
available on Alpha as
.br
 \fBosf_getdtablesize\fP(2)
T}
\fBgetegid\fP(2)	1.0
\fBgetegid32\fP(2)	2.4
\fBgeteuid\fP(2)	1.0
\fBgeteuid32\fP(2)	2.4
\fBgetgid\fP(2)	1.0
\fBgetgid32\fP(2)	2.4
\fBgetgroups\fP(2)	1.0
\fBgetgroups32\fP(2)	2.4
.\" SPARC removal: ec98c6b9b47df6df1c1fa6cf3d427414f8c2cf16
 \fBgethostname\fP(2)	2.0	T{
Alpha, was available on
.br
SPARC up to Linux 2.6.26
T}
\fBgetitimer\fP(2)	1.0
\fBgetpeername\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBgetpagesize\fP(2)	2.0	x86 にはない
\fBgetpgid\fP(2)	1.0
\fBgetpgrp\fP(2)	1.0
\fBgetpid\fP(2)	1.0
\fBgetppid\fP(2)	1.0
\fBgetpriority\fP(2)	1.0
\fBgetrandom\fP(2)	3.17
\fBgetresgid\fP(2)	2.2
\fBgetresgid32\fP(2)	2.4
\fBgetresuid\fP(2)	2.2
\fBgetresuid32\fP(2)	2.4
\fBgetrlimit\fP(2)	1.0
\fBgetrusage\fP(2)	1.0
\fBgetsid\fP(2)	2.0
\fBgetsockname\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBgetsockopt\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBgettid\fP(2)	2.4.11
\fBgettimeofday\fP(2)	1.0
\fBgetuid\fP(2)	1.0
\fBgetuid32\fP(2)	2.4
 \fBgetunwind\fP(2)	 2.4.8	IA\-64 only; deprecated
\fBgetxattr\fP(2)	2.6; 2.4.18
 \fBgetxgid\fP(2)	2.0	Alpha のみ; 「注意」を参照
 \fBgetxpid\fP(2)	2.0	Alpha のみ; 「注意」を参照
 \fBgetxuid\fP(2)	2.0	Alpha のみ; 「注意」を参照
\fBinit_module\fP(2)	1.0
\fBinotify_add_watch\fP(2)	2.6.13
\fBinotify_init\fP(2)	2.6.13
\fBinotify_init1\fP(2)	2.6.27
\fBinotify_rm_watch\fP(2)	2.6.13
\fBio_cancel\fP(2)	2.6
\fBio_destroy\fP(2)	2.6
\fBio_getevents\fP(2)	2.6
 \fBio_pgetevents\fP(2)	4.18
\fBio_setup\fP(2)	2.6
\fBio_submit\fP(2)	2.6
 \fBio_uring_enter\fP(2)	5.1
 \fBio_uring_register\fP(2)	5.1
 \fBio_uring_setup\fP(2)	5.1
\fBioctl\fP(2)	1.0
\fBioperm\fP(2)	1.0
\fBiopl\fP(2)	1.0
\fBioprio_get\fP(2)	2.6.13
\fBioprio_set\fP(2)	2.6.13
\fBipc\fP(2)	1.0
.\" Implements System V IPC calls
\fBkcmp\fP(2)	3.5
\fBkern_features\fP(2)	3.7	SPARC64 のみ
.\" FIXME . document kern_features():
.\" commit 517ffce4e1a03aea979fe3a18a3dd1761a24fafb
\fBkexec_file_load\fP(2)	3.17
\fBkexec_load\fP(2)	2.6.13
.\" The entry in the syscall table was reserved starting in 2.6.7
.\" Was named sys_kexec_load() from 2.6.7 to 2.6.16
\fBkeyctl\fP(2)	2.6.10
\fBkill\fP(2)	1.0
\fBlchown\fP(2)	1.0	T{
バージョン毎の詳細は
.br
\fBchown\fP(2) を参照。
T}
\fBlchown32\fP(2)	2.4
\fBlgetxattr\fP(2)	2.6; 2.4.18
\fBlink\fP(2)	1.0
\fBlinkat\fP(2)	2.6.16
\fBlisten\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBlistxattr\fP(2)	2.6; 2.4.18
\fBllistxattr\fP(2)	2.6; 2.4.18
\fBlookup_dcookie\fP(2)	2.6
\fBlremovexattr\fP(2)	2.6; 2.4.18
\fBlseek\fP(2)	1.0
\fBlsetxattr\fP(2)	2.6; 2.4.18
\fBlstat\fP(2)	1.0
\fBlstat64\fP(2)	2.4
\fBmadvise\fP(2)	2.4
\fBmbind\fP(2)	2.6.6
 \fBmemory_ordering\fP(2)	2.2	SPARC64 のみ
.\" 26025bbfbba33a9425be1b89eccb4664ea4c17b6
.\" bb6fb6dfcc17cddac11ac295861f7608194447a7
 \fBmembarrier\fP(2)	3.17
\fBmemfd_create\fP(2)	3.17
\fBmigrate_pages\fP(2)	2.6.16
\fBmincore\fP(2)	2.4
\fBmkdir\fP(2)	1.0
\fBmkdirat\fP(2)	2.6.16
\fBmknod\fP(2)	1.0
\fBmknodat\fP(2)	2.6.16
\fBmlock\fP(2)	2.0
 \fBmlock2\fP(2)	 4.4
\fBmlockall\fP(2)	2.0
\fBmmap\fP(2)	1.0
\fBmmap2\fP(2)	2.4
\fBmodify_ldt\fP(2)	1.0
\fBmount\fP(2)	1.0
 \fBmove_mount\fP(2)	 5.2
\fBmove_pages\fP(2)	2.6.18
\fBmprotect\fP(2)	1.0
\fBmq_getsetattr\fP(2)	2.6.6
.\" Implements \fBmq_getattr\fP(3) and \fBmq_setattr\fP(3)
\fBmq_notify\fP(2)	2.6.6
\fBmq_open\fP(2)	2.6.6
\fBmq_timedreceive\fP(2)	2.6.6
\fBmq_timedsend\fP(2)	2.6.6
\fBmq_unlink\fP(2)	2.6.6
\fBmremap\fP(2)	2.0
\fBmsgctl\fP(2)	2.0	\fBipc\fP(2) の「注意」の節を参照
\fBmsgget\fP(2)	2.0	\fBipc\fP(2) の「注意」の節を参照
\fBmsgrcv\fP(2)	2.0	\fBipc\fP(2) の「注意」の節を参照
\fBmsgsnd\fP(2)	2.0	\fBipc\fP(2) の「注意」の節を参照
\fBmsync\fP(2)	2.0
.\" \fBmultiplexer\fP(2)	??	__NR_multiplexer reserved on
.\"		PowerPC, but unimplemented?
\fBmunlock\fP(2)	2.0
\fBmunlockall\fP(2)	2.0
\fBmunmap\fP(2)	1.0
\fBname_to_handle_at\fP(2)	2.6.39
\fBnanosleep\fP(2)	2.0
.\" 5590ff0d5528b60153c0b4e7b771472b5a95e297
 \fBnewfstatat\fP(2)	2.6.16	 See \fBstat\fP(2)
\fBnfsservctl\fP(2)	2.2	3.1 で削除
\fBnice\fP(2)	1.0
 \fBold_adjtimex\fP(2)	2.0	Alpha のみ; 「注意」を参照
 \fBold_getrlimit\fP(2)	2.4	T{
Old variant of \fBgetrlimit\fP(2)
.br
that used a different value
.br
for \fBRLIM_INFINITY\fP
T}
\fBoldfstat\fP(2)	1.0
\fBoldlstat\fP(2)	1.0
\fBoldolduname\fP(2)	1.0
\fBoldstat\fP(2)	1.0
 \fBoldumount\fP(2)	 2.4.116	T{
Name of the old \fBumount\fP(2)
.br
syscall on Alpha
T}
\fBolduname\fP(2)	1.0
\fBopen\fP(2)	1.0
\fBopen_by_handle_at\fP(2)	2.6.39
 \fBopen_tree\fP(2)	 5.2
\fBopenat\fP(2)	2.6.16
 \fBopenat2\fP(2)	 5.6
.\" 9d02a4283e9ce4e9ca11ff00615bdacdb0515a1a
 \fBor1k_atomic\fP(2)	 3.1	OpenRISC 1000 のみ
\fBpause\fP(2)	1.0
\fBpciconfig_iobase\fP(2)	2.2.15; 2.4	x86 にはない
.\" Alpha, PowerPC, ARM; not x86
\fBpciconfig_read\fP(2)	2.0.26; 2.2	x86 にはない
.\" , PowerPC, ARM; not x86
\fBpciconfig_write\fP(2)	2.0.26; 2.2	x86 にはない
.\" , PowerPC, ARM; not x86
\fBperf_event_open\fP(2)	2.6.31	T{
2.6.31 では perf_counter_open() であった;
.br
2.6.32 で名称変更
T}
\fBpersonality\fP(2)	1.2
\fBperfctr\fP(2)	2.2	SPARC のみ; 2.6.34 で削除
.\"	commit c7d5a0050773e98d1094eaa9f2a1a793fafac300 removed perfctr()
\fBperfmonctl\fP(2)	2.4	IA\-64 のみ
 \fBpidfd_getfd\fP(2)	 5.6
 \fBpidfd_send_signal\fP(2)	5.1
 \fBpidfd_open\fP(2)	 5.3
\fBpipe\fP(2)	1.0
\fBpipe2\fP(2)	2.6.27
\fBpivot_root\fP(2)	2.4
 \fBpkey_alloc\fP(2)	 4.8
 \fBpkey_free\fP(2)	 4.8
 \fBpkey_mprotect\fP(2)	 4.8
\fBpoll\fP(2)	2.0.36; 2.2
\fBppoll\fP(2)	2.6.16
\fBprctl\fP(2)	2.2
\fBpread64\fP(2)		T{
2.2 で "pread" として追加;
.br
2.6 で "pread64" に名称変更
T}
\fBpreadv\fP(2)	2.6.30
 \fBpreadv2\fP(2)	 4.6
\fBprlimit64\fP(2)	2.6.36
 \fBprocess_madvise\fP(2)	5.10
\fBprocess_vm_readv\fP(2)	3.2
\fBprocess_vm_writev\fP(2)	3.2
\fBpselect6\fP(2)	2.6.16
.\" Implements \fBpselect\fP(2)
\fBptrace\fP(2)	1.0
\fBpwrite64\fP(2)		T{
2.2 で "pwrite" として追加;
.br
2.6 で "pwrite64" に名称変更
T}
\fBpwritev\fP(2)	2.6.30
 \fBpwritev2\fP(2)	 4.6
\fBquery_module\fP(2)	2.2	2.6 で削除
\fBquotactl\fP(2)	1.0
\fBread\fP(2)	1.0
\fBreadahead\fP(2)	2.4.13
\fBreaddir\fP(2)	1.0
.\" Supersedes \fBgetdents\fP(2)
\fBreadlink\fP(2)	1.0
\fBreadlinkat\fP(2)	2.6.16
\fBreadv\fP(2)	2.0
\fBreboot\fP(2)	1.0
\fBrecv\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBrecvfrom\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBrecvmsg\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBrecvmmsg\fP(2)	2.6.33
\fBremap_file_pages\fP(2)	2.6	3.16 以降では非推奨
\fBremovexattr\fP(2)	2.6; 2.4.18
\fBrename\fP(2)	1.0
\fBrenameat\fP(2)	2.6.16
\fBrenameat2\fP(2)	3.15
\fBrequest_key\fP(2)	2.6.10
\fBrestart_syscall\fP(2)	2.6
.\" 921ebd8f2c081b3cf6c3b29ef4103eef3ff26054
 \fBriscv_flush_icache\fP(2)	4.15	RISC\-V のみ
\fBrmdir\fP(2)	1.0
 \fBrseq\fP(2)	4.18
\fBrt_sigaction\fP(2)	2.2
\fBrt_sigpending\fP(2)	2.2
\fBrt_sigprocmask\fP(2)	2.2
\fBrt_sigqueueinfo\fP(2)	2.2
\fBrt_sigreturn\fP(2)	2.2
\fBrt_sigsuspend\fP(2)	2.2
\fBrt_sigtimedwait\fP(2)	2.2
\fBrt_tgsigqueueinfo\fP(2)	2.6.31
 \fBrtas\fP(2)	2.6.2	PowerPC/PowerPC64 のみ
\fBs390_runtime_instr\fP(2)	3.7	s390 のみ
\fBs390_pci_mmio_read\fP(2)	3.19	s390 のみ
\fBs390_pci_mmio_write\fP(2)	3.19	s390 のみ
 \fBs390_sthyi\fP(2)	4.15	s390 のみ
 \fBs390_guarded_storage\fP(2)	4.12	s390 のみ
 \fBsched_get_affinity\fP(2)	2.6	T{
Name of \fBsched_getaffinity\fP(2)
.br
on SPARC and SPARC64
T}
\fBsched_get_priority_max\fP(2)	2.0
\fBsched_get_priority_min\fP(2)	2.0
\fBsched_getaffinity\fP(2)	2.6
\fBsched_getattr\fP(2)	3.14
\fBsched_getparam\fP(2)	2.0
\fBsched_getscheduler\fP(2)	2.0
\fBsched_rr_get_interval\fP(2)	2.0
 \fBsched_set_affinity\fP(2)	2.6	T{
Name of \fBsched_setaffinity\fP(2)
.br
on SPARC and SPARC64
T}
\fBsched_setaffinity\fP(2)	2.6
\fBsched_setattr\fP(2)	3.14
\fBsched_setparam\fP(2)	2.0
\fBsched_setscheduler\fP(2)	2.0
\fBsched_yield\fP(2)	2.0
\fBseccomp\fP(2)	3.17
\fBselect\fP(2)	1.0
\fBsemctl\fP(2)	2.0	\fBipc\fP(2) の「注意」の節を参照
\fBsemget\fP(2)	2.0	\fBipc\fP(2) の「注意」の節を参照
\fBsemop\fP(2)	2.0	\fBipc\fP(2) の「注意」の節を参照
\fBsemtimedop\fP(2)	2.6; 2.4.22
\fBsend\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBsendfile\fP(2)	2.2
\fBsendfile64\fP(2)	2.6; 2.4.19
\fBsendmmsg\fP(2)	3.0
\fBsendmsg\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBsendto\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBset_mempolicy\fP(2)	2.6.6
\fBset_robust_list\fP(2)	2.6.17
\fBset_thread_area\fP(2)	2.6
\fBset_tid_address\fP(2)	2.6
 \fBset_tls\fP(2)	2.6.11	T{
ARM OABI/EABI only (constant
.br
has \fB__ARM_NR\fP prefix)
T}
.\" \fBsetaltroot\fP(2)	2.6.10	T{
.\" Removed in 2.6.11, exposed one
.\" of implementation details of
.\" \fBpersonality\fP(2) (creating an
.\" alternative root, precursor of
.\" mount namespaces) to user space.
.\" T}
.\" See http://lkml.org/lkml/2005/8/1/83
.\" "[PATCH] remove sys_set_zone_reclaim()"
\fBsetdomainname\fP(2)	1.0
\fBsetfsgid\fP(2)	1.2
\fBsetfsgid32\fP(2)	2.4
\fBsetfsuid\fP(2)	1.2
\fBsetfsuid32\fP(2)	2.4
\fBsetgid\fP(2)	1.0
\fBsetgid32\fP(2)	2.4
\fBsetgroups\fP(2)	1.0
\fBsetgroups32\fP(2)	2.4
.\" arch/alpha/include/asm/core_lca.h
 \fBsethae\fP(2)	2.0	Alpha のみ; 「注意」を参照
\fBsethostname\fP(2)	1.0
\fBsetitimer\fP(2)	1.0
\fBsetns\fP(2)	3.0
\fBsetpgid\fP(2)	1.0
 \fBsetpgrp\fP(2)	2.0	T{
Alternative name for
.br
\fBsetpgid\fP(2) on Alpha
T}
\fBsetpriority\fP(2)	1.0
\fBsetregid\fP(2)	1.0
\fBsetregid32\fP(2)	2.4
\fBsetresgid\fP(2)	2.2
\fBsetresgid32\fP(2)	2.4
\fBsetresuid\fP(2)	2.2
\fBsetresuid32\fP(2)	2.4
\fBsetreuid\fP(2)	1.0
\fBsetreuid32\fP(2)	2.4
\fBsetrlimit\fP(2)	1.0
\fBsetsid\fP(2)	1.0
\fBsetsockopt\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBsettimeofday\fP(2)	1.0
\fBsetuid\fP(2)	1.0
\fBsetuid32\fP(2)	2.4
\fBsetup\fP(2)	1.0	2.2 で削除
\fBsetxattr\fP(2)	2.6; 2.4.18
\fBsgetmask\fP(2)	1.0
\fBshmat\fP(2)	2.0	\fBipc\fP(2) の「注意」の節を参照
\fBshmctl\fP(2)	2.0	\fBipc\fP(2) の「注意」の節を参照
\fBshmdt\fP(2)	2.0	\fBipc\fP(2) の「注意」の節を参照
\fBshmget\fP(2)	2.0	\fBipc\fP(2) の「注意」の節を参照
\fBshutdown\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBsigaction\fP(2)	1.0
\fBsigaltstack\fP(2)	2.2
\fBsignal\fP(2)	1.0
\fBsignalfd\fP(2)	2.6.22
\fBsignalfd4\fP(2)	2.6.27
\fBsigpending\fP(2)	1.0
\fBsigprocmask\fP(2)	1.0
\fBsigreturn\fP(2)	1.0
\fBsigsuspend\fP(2)	1.0
\fBsocket\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
\fBsocketcall\fP(2)	1.0
.\" Implements BSD socket calls
\fBsocketpair\fP(2)	2.0	\fBsocketcall\fP(2) の「注意」の節を参照
.\" 5a0015d62668e64c8b6e02e360fbbea121bfd5e6
 \fBspill\fP(2)	2.6.13	Xtensa のみ
\fBsplice\fP(2)	2.6.17
\fBspu_create\fP(2)	2.6.16	PowerPC/PowerPC64 のみ
\fBspu_run\fP(2)	2.6.16	PowerPC/PowerPC64 のみ
\fBssetmask\fP(2)	1.0
\fBstat\fP(2)	1.0
\fBstat64\fP(2)	2.4
\fBstatfs\fP(2)	1.0
\fBstatfs64\fP(2)	2.6
 \fBstatx\fP(2)	 4.11
\fBstime\fP(2)	1.0
\fBsubpage_prot\fP(2)	2.6.25	PowerPC/PowerPC64 のみ
 \fBswapcontext\fP(2)	 2.6.3	PowerPC/PowerPC64 のみ
.\" 529d235a0e190ded1d21ccc80a73e625ebcad09b
 \fBswitch_endian\fP(2)	 4.1	PowerPC64 のみ
\fBswapoff\fP(2)	1.0
\fBswapon\fP(2)	1.0
\fBsymlink\fP(2)	1.0
\fBsymlinkat\fP(2)	2.6.16
\fBsync\fP(2)	1.0
\fBsync_file_range\fP(2)	2.6.17
\fBsync_file_range2\fP(2)	2.6.22
.\" PowerPC, ARM, tile
.\" First appeared on ARM, as arm_sync_file_range(), but later renamed
.\" \fBsys_debug_setcontext\fP(2)	???	PowerPC if CONFIG_PPC32
\fBsyncfs\fP(2)	2.6.39
 \fBsys_debug_setcontext\fP(2)	2.6.11	PowerPC のみ
 \fBsyscall\fP(2)	1.0	T{
Still available on ARM OABI
.br
and MIPS O32 ABI
T}
\fBsysfs\fP(2)	1.2
\fBsysinfo\fP(2)	1.0
\fBsyslog\fP(2)	1.0
.\" glibc interface is \fBklogctl\fP(3)
 \fBsysmips\fP(2)	 2.6.0	MIPS のみ
\fBtee\fP(2)	2.6.17
\fBtgkill\fP(2)	2.6
\fBtime\fP(2)	1.0
\fBtimer_create\fP(2)	2.6
\fBtimer_delete\fP(2)	2.6
\fBtimer_getoverrun\fP(2)	2.6
\fBtimer_gettime\fP(2)	2.6
\fBtimer_settime\fP(2)	2.6
.\" .\" b215e283992899650c4271e7385c79e26fb9a88e
.\" .\" 4d672e7ac79b5ec5cdc90e450823441e20464691
.\" \fBtimerfd\fP(2)	2.6.22	T{
.\" Old timerfd interface,
.\" removed in 2.6.25
.\" T}
\fBtimerfd_create\fP(2)	2.6.25
\fBtimerfd_gettime\fP(2)	2.6.25
\fBtimerfd_settime\fP(2)	2.6.25
\fBtimes\fP(2)	1.0
\fBtkill\fP(2)	2.6; 2.4.22
\fBtruncate\fP(2)	1.0
\fBtruncate64\fP(2)	2.4
\fBugetrlimit\fP(2)	2.4
\fBumask\fP(2)	1.0
\fBumount\fP(2)	1.0
.\" sys_oldumount() -- __NR_umount
\fBumount2\fP(2)	2.2
.\" sys_umount() -- __NR_umount2
\fBuname\fP(2)	1.0
\fBunlink\fP(2)	1.0
\fBunlinkat\fP(2)	2.6.16
\fBunshare\fP(2)	2.6.16
\fBuselib\fP(2)	1.0
\fBustat\fP(2)	1.0
 \fBuserfaultfd\fP(2)	 4.3
 \fBusr26\fP(2)	 2.4.8.1	ARM OABI のみ
 \fBusr32\fP(2)	 2.4.8.1	ARM OABI のみ
\fButime\fP(2)	1.0
\fButimensat\fP(2)	2.6.22
\fButimes\fP(2)	2.2
\fButrap_install\fP(2)	2.2	SPARC64 のみ
.\" FIXME . document utrap_install()
.\" There's a man page for Solaris 5.11
\fBvfork\fP(2)	2.2
\fBvhangup\fP(2)	1.0
\fBvm86old\fP(2)	1.0	T{
Was "vm86"; renamed in
.br
 2.0.28/2.2
T}
\fBvm86\fP(2)	2.0.28; 2.2
\fBvmsplice\fP(2)	2.6.17
\fBwait4\fP(2)	1.0
\fBwaitid\fP(2)	2.6.10
\fBwaitpid\fP(2)	1.0
\fBwrite\fP(2)	1.0
\fBwritev\fP(2)	2.0
.\" 5a0015d62668e64c8b6e02e360fbbea121bfd5e6
 \fBxtensa\fP(2)	2.6.13	Xtensa のみ
.TE
.ad
.PP
x86\-32 を含む多くのプラットフォームでは、ソケット関連のシステムコールは (glibc のラッパー関数を介してだが) すべて
\fBsocketcall\fP(2) 経由に多重されている。 同様に、System\ V IPC 関連のシステムコールは \fBipc\fP(2)
経由に多重されている。
.PP
.\" __NR_afs_syscall is 53 on Linux 2.6.22/i386
.\" __NR_break is 17 on Linux 2.6.22/i386
.\" __NR_ftime is 35 on Linux 2.6.22/i386
.\" __NR_getpmsg is 188 on Linux 2.6.22/i386
.\" __NR_gtty is 32 on Linux 2.6.22/i386
.\" __NR_idle is 112 on Linux 2.6.22/i386
.\" __NR_lock is 53 on Linux 2.6.22/i386
.\" __NR_madvise1 is 219 on Linux 2.6.22/i386
.\" __NR_mpx is 66 on Linux 2.6.22/i386
.\" Slot has been reused
.\" __NR_prof is 44 on Linux 2.6.22/i386
.\" __NR_profil is 98 on Linux 2.6.22/i386
.\" __NR_putpmsg is 189 on Linux 2.6.22/i386
.\" __NR_security is 223 on Linux 2.4/i386
.\" __NR_security is 223 on Linux 2.4/i386; absent on 2.6/i386, present
.\" on a couple of 2.6 architectures
.\" __NR_stty is 31 on Linux 2.6.22/i386
.\" The security call is for future use.
.\" __NR_tuxcall is 184 on x86_64, also on PPC and alpha
.\" __NR_ulimit is 58 on Linux 2.6.22/i386
.\" __NR_vserver is 273 on Linux 2.6.22/i386
以下のシステムコールは、システムコールテーブルにスロットが予約されているが、
標準のカーネルには実装されていない:
\fBafs_syscall\fP(2), \fBbreak\fP(2), \fBftime\fP(2), \fBgetpmsg\fP(2), \fBgtty\fP(2),
\fBidle\fP(2), \fBlock\fP(2), \fBmadvise1\fP(2), \fBmpx\fP(2), \fBphys\fP(2), \fBprof\fP(2),
\fBprofil\fP(2), \fBputpmsg\fP(2), \fBsecurity\fP(2), \fBstty\fP(2), \fBtuxcall\fP(2),
\fBulimit\fP(2), \fBvserver\fP(2) (\fBunimplemented\fP(2) も参照)。
しかし、\fBftime\fP(3), \fBprofil\fP(3), \fBulimit\fP(3) はライブラリルーチンとして
実装されている。 \fBphys\fP(2) 用の場所は 2.1.116 以降では \fBumount\fP(2) 用に
使用されている; 将来においても \fBphys\fP(2) は実装されない。
\fBgetpmsg\fP(2) と \fBputpmsg\fP(2) は STREAMS 対応のパッチが適用された
カーネル用であり、標準のカーネルに登場することはないかもしれない。
.PP
.\"
\fBset_zone_reclaim\fP(2) は少しの間だけ存在した。 Linux 2.6.13 で追加され、2.6.16
で削除された。このシステムコールがユーザー空間から使える状態になったことはない。
.SS "System calls on removed ports"
Some system calls only ever existed on Linux architectures that have since
been removed from the kernel:
.TP 
AVR32 (port removed in Linux 4.12)
.RS
.PD 0
.IP * 2
 \fBpread\fP(2)
.IP *
 \fBpwrite\fP(2)
.PD
.RE
.TP 
Blackfin (port removed in Linux 4.17)
.RS
.PD 0
.IP * 2
\fBbfin_spinlock\fP(2)  (added in Linux 2.6.22)
.IP *
\fBdma_memcpy\fP(2)  (added in Linux 2.6.22)
.IP *
\fBpread\fP(2)  (added in Linux 2.6.22)
.IP *
\fBpwrite\fP(2)  (added in Linux 2.6.22)
.IP *
\fBsram_alloc\fP(2)  (added in Linux 2.6.22)
.IP *
\fBsram_free\fP(2)  (added in Linux 2.6.22)
.PD
.RE
.TP 
Metag (port removed in Linux 4.17)
.RS
.PD 0
.IP * 2
\fBmetag_get_tls\fP(2)  (add in Linux 3.9)
.IP *
\fBmetag_set_fpu_flags\fP(2)  (add in Linux 3.9)
.IP *
\fBmetag_set_tls\fP(2)  (add in Linux 3.9)
.IP *
\fBmetag_setglobalbit\fP(2)  (add in Linux 3.9)
.PD
.RE
.TP 
Tile (port removed in Linux 4.17)
.RS
.PD 0
.IP * 2
\fBcmpxchg_badaddr\fP(2)  (added in Linux 2.6.36)
.PD
.RE
.SH 注意
たいていは、 \fI/usr/include/asm/unistd.h\fP で定義されている番号 __NR_xxx のシステムコールのコードは、 Linux
カーネルソースの \fIsys_xxx\fP() というルーチンに書かれている。 しかしこれには多くの例外がある。古いシステムコールは新版に置き換えられて
きたが、この置き換えはあまり体系立てて行われて来なかったからである。 sparc, sparc64, alpha
といったプロプリエタリなオペレーティングシステムのエミュレーション機能があるプラットフォームでは、多くの追加システムコールがある。 mips64
には、32 ビットシステムコールのフルセットも含まれている。
.PP
Over time, changes to the interfaces of some system calls have been
necessary.  One reason for such changes was the need to increase the size of
structures or scalar values passed to the system call.  Because of these
changes, certain architectures (notably, longstanding 32\-bit architectures
such as i386)  now have various groups of related system calls (e.g.,
\fBtruncate\fP(2)  and \fBtruncate64\fP(2))  which perform similar tasks, but
which vary in details such as the size of their arguments.  (As noted
earlier, applications are generally unaware of this: the glibc wrapper
functions do some work to ensure that the right system call is invoked, and
that ABI compatibility is preserved for old binaries.)  Examples of systems
calls that exist in multiple versions are the following:
.IP * 3
.\" e.g., on 2.6.22/i386: __NR_oldstat 18, __NR_stat 106, __NR_stat64 195
.\" The stat system calls deal with three different data structures,
.\" defined in include/asm-i386/stat.h: __old_kernel_stat, stat, stat64
これまでに、 \fBstat\fP(2)  には 3 種類の異なるバージョンが存在する。 \fIsys_stat\fP()  (スロットは
\fI__NR_oldstat\fP)、 \fIsys_newstat\fP()  (スロットは \fI__NR_stat\fP)、 \fIsys_stat64\fP()
(カーネル 2.4 で導入; スロットは \fI__NR_stat64\fP)。 3つのうち最後のものが最新である。 \fBlstat\fP(2)  と
\fBfstat\fP(2)  についても同様である。
.IP *
また、 \fI__NR_oldolduname\fP, \fI__NR_olduname\fP, \fI__NR_uname\fP という定義は、それぞれ
\fIsys_olduname\fP(), \fIsys_uname\fP(), \fIsys_newuname\fP()  というルーチンを参照している。
.IP *
Linux 2.0 では、 \fBvm86\fP(2)  の新バージョンが登場した。カーネルルーチンの 古いバージョン、新しいバージョンはそれぞれ
\fIsys_vm86old\fP(), \fIsys_vm86\fP()  という名前である。
.IP *
Linux 2.4 では、 \fBgetrlimit\fP(2)  の新バージョンが登場した。カーネルルーチンの 古いバージョン、新しいバージョンはそれぞれ
\fIsys_old_getrlimit\fP()  (スロットは \fI__NR_getrlimit\fP), \fIsys_getrlimit\fP()
(スロットは \fI__NR_ugetrlimit\fP)  という名前である。
.IP *
.\" 64-bit off_t changes: ftruncate64, *stat64,
.\" fcntl64 (because of the flock structure), getdents64, *statfs64
Linux 2.4 で、ユーザー ID とグループ ID のサイズが 16 ビットから 32 ビットに増えた。
この変更に対応するため、いくつかのシステムコールが追加された (\fBchown32\fP(2), \fBgetuid32\fP(2),
\fBgetgroups32\fP(2), \fBsetresuid32\fP(2)  など)。 これらのシステムコールが、末尾の "32" が付かない同名の
古いバージョンに代わって使われるようになった。
.IP *
Linux 2.4 では、32 ビットアーキテクチャー上のアプリケーションが 大きなファイル (つまり、32 ビットでは表現できないサイズや
ファイルオフセットが必要なファイル) にアクセスできるようになった。 この変更に対応するため、ファイルオフセットとサイズを扱う
システムコールの置き換えが必要となった。その結果、 \fBfcntl64\fP(2), \fBgetdents64\fP(2), \fBstat64\fP(2),
\fBstatfs64\fP(2), \fBtruncate64\fP(2) と、ファイルディスクリプターやシンボリックリンクで同じ機能を持つ
システムコールが追加された。 これらのシステムコールが、末尾の "64" が付かない同名の 古いバージョンに代わって使われるようになった。
但し、"stat" 系のシステムコールはその限りではない。
.IP
On newer platforms that only have 64\-bit file access and 32\-bit UIDs/GIDs
(e.g., alpha, ia64, s390x, x86\-64), there is just a single version of the
UID/GID and file access system calls.  On platforms (typically, 32\-bit
platforms) where the *64 and *32 calls exist, the other versions are
obsolete.
.IP *
リアルタイムシグナル (\fBsignal\fP(7)  参照) への対応を追加するために、 \fIrt_sig*\fP 系のシステムコールがカーネル 2.2
で追加された。 これらのシステムコールが、先頭に "rt_" が付かない同名の 古いバージョンに代わって使われるようになった。
.IP *
.\" (used by libc 6)
.\" .PP
.\" Two system call numbers,
.\" .IR __NR__llseek
.\" and
.\" .IR __NR__sysctl
.\" have an additional underscore absent in
.\" .IR sys_llseek ()
.\" and
.\" .IR sys_sysctl ().
.\"
.\" In kernel 2.1.81,
.\" .BR lchown (2)
.\" and
.\" .BR chown (2)
.\" were swapped; that is,
.\" .BR lchown (2)
.\" was added with the semantics that were then current for
.\" .BR chown (2),
.\" and the semantics of the latter call were changed to what
.\" they are today.
.\"
.\"
The \fBselect\fP(2)  and \fBmmap\fP(2)  system calls use five or more arguments,
which caused problems in the way argument passing on the i386 used to be set
up.  Thus, while other architectures have \fIsys_select\fP()  and \fIsys_mmap\fP()
corresponding to \fI__NR_select\fP and \fI__NR_mmap\fP, on i386 one finds
\fIold_select\fP()  and \fIold_mmap\fP()  (routines that use a pointer to an
argument block) instead.  These days passing five arguments is not a problem
any more, and there is a \fI__NR__newselect\fP that corresponds directly to
\fIsys_select\fP()  and similarly \fI__NR_mmap2\fP.  s390x is the only 64\-bit
architecture that has \fIold_mmap\fP().
.SS "アーキテクチャー固有の詳細: Alpha"
.IP * 3
\fBgetxgid\fP(2)  returns a pair of GID and effective GID via registers \fBr0\fP
and \fBr20\fP; it is provided instead of \fBgetgid\fP(2) and \fBgetegid\fP(2).
.IP *
\fBgetxpid\fP(2)  returns a pair of PID and parent PID via registers \fBr0\fP and
\fBr20\fP; it is provided instead of \fBgetpid\fP(2) and \fBgetppid\fP(2).
.IP *
\fBold_adjtimex\fP(2)  is a variant of \fBadjtimex\fP(2) that uses \fIstruct
timeval32\fP, for compatibility with OSF/1.
.IP *
\fBgetxuid\fP(2)  returns a pair of GID and effective GID via registers \fBr0\fP
and \fBr20\fP; it is provided instead of \fBgetuid\fP(2) and \fBgeteuid\fP(2).
.IP *
\fBsethae\fP(2)  is used for configuring the Host Address Extension register on
low\-cost Alphas in order to access address space beyond first 27 bits.
.SH 関連項目
\fBintro\fP(2), \fBsyscall\fP(2), \fBunimplemented\fP(2), \fBerrno\fP(3), \fBlibc\fP(7),
\fBvdso\fP(7)
.SH この文書について
この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
\%https://www.kernel.org/doc/man\-pages/ に書かれている。