File: syscalls.2

package info (click to toggle)
manpages-es 1.55-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,472 kB
  • ctags: 6
  • sloc: sh: 1,349; makefile: 63
file content (325 lines) | stat: -rw-r--r-- 8,576 bytes parent folder | download | duplicates (4)
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
.\" Copyright (C) 1998 Andries Brouwer (aeb@cwi.nl)
.\" Modifications for 2.2 and 2.4 Copyright (C) 2002 Ian Redfern
.\" <redferni@logica.com>
.\"
.\" 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.
.\"
.\" Translated 23 Jul 1998 by Juan José López Mellado (laveneno@hotmail.com)
.\" Translation revised Fri Oct 2 1998 by Juan Piernas <piernas@ditec.um.es>
.\"
.TH SYSCALLS 2 "7 enero 2002" "Linux 2.4" "Manual del Programador de Linux"
.SH NOMBRE
nada \- lista de todas las llamadas al sistema
.SH SINOPSIS
Llamadas al sistema de Linux 2.4.
.SH DESCRIPCIÓN
La llamada al sistema es la interfaz fundamental entre una aplicación
y el núcleo de Linux. A partir de la versión 2.4.17 de Linux, hay 1100
llamadas al sistemas listadas en
.IR /usr/src/linux/include/asm-*/unistd.h .
Esta página de manual lista aquellas que son comunes a la mayoría de plataformas
(incorporando hipervínculos si lee esto con un navegador).

_llseek(2),
_newselect(2),
_sysctl(2),
accept(2),
access(2),
acct(2),
adjtimex(2),
afs_syscall,
alarm(2),
bdflush(2),
bind(2),
break,
brk(2),
cacheflush(2),
capget(2),
capset(2),
chdir(2),
chmod(2),
chown(2), chown32,
chroot(2),
clone(2),
close(2),
connect(2),
creat(2),
create_module(2),
delete_module(2),
dup(2),
dup2(2),
execve(2),
exit(2),
fchdir(2),
fchmod(2),
fchown(2), fchown32,
fcntl(2), fcntl64,
fdatasync(2),
flock(2),
fork(2),
fstat(2), fstat64,
fstatfs(2),
fsync(2),
ftime,
ftruncate(2), ftruncate64,
get\%_kernel\%_syms(2),
get\%cwd(2),
get\%dents(2), get\%dents64,
get\%egid(2), get\%egid32,
get\%euid(2), get\%euid32,
get\%gid(2), get\%gid32,
get\%groups(2), get\%groups32,
get\%itimer(2),
get\%pagesize(2),
get\%peername(2),
get\%pmsg,
get\%pgid(2),
get\%pgrp(2),
get\%pid(2),
get\%ppid(2),
get\%priority(2),
get\%resgid(2), get\%resgid32,
get\%resuid(2), get\%resuid32,
get\%rlimit(2),
get\%rusage(2),
get\%sid(2),
get\%sockname(2),
get\%sockopt(2),
get\%tid,
get\%timeofday(2),
get\%uid(2), get\%uid32,
gtty,
idle,
init_module(2),
ioctl(2),
io\%perm(2),
iopl(2),
ipc(2),
kill(2),
lchown(2), lchown32,
link(2),
listen(2),
lock,
lseek(2),
lstat(2), lstat64,
madvise(2),
mincore(2),
mkdir(2),
mknod(2),
mlock(2),
mlockall(2),
mmap(2),
modify_ldt(2),
mount(2),
mprotect(2),
mpx,
mremap(2),
msync(2),
munlock(2),
munlockall(2),
munmap(2),
nanosleep(2),
nfsservctl(2),
nice(2),
oldfstat, oldlstat, oldolduname, oldstat, oldumount, olduname,
open(2),
pause(2),
personality(2),
phys,
pipe(2),
pivot_root(2),
poll(2),
prctl(2),
pread(2),
prof, profil,
ptrace(2),
putpmsg,
pwrite(2),
query_module(2),
quotactl(2),
read(2),
readahead,
readdir(2),
readlink(2),
readv(2),
reboot(2),
recv(2), recvfrom(2), recvmsg(2),
rename(2),
rmdir(2),
rt_sigaction,
rt_sigpending,
rt_sigprocmask,
rt_sigqueueinfo,
rt_sigreturn,
rt_sigsuspend,
rt_sigtimedwait,
sched_\%get_\%priority_max(2),
sched_\%get_\%priority_min(2),
sched_\%get\%param(2),
sched_\%get\%scheduler(2),
sched_\%rr_\%get_\%interval(2),
sched_\%set\%param(2),
sched_\%set\%scheduler(2),
sched_\%yield(2),
security,
select(2),
sendfile(2),
send(2), sendmsg(2), sendto(2),
set\%domainname(2),
set\%fsgid(2), set\%fsgid32,
set\%fsuid(2), set\%fsuid32,
set\%gid(2), set\%gid32,
set\%groups(2), set\%groups32,
set\%hostname(2),
set\%itimer(2),
set\%pgid(2),
set\%priority(2),
set\%regid(2), set\%regid32,
set\%resgid(2), set\%resgid32,
set\%resuid(2), set\%resuid32,
set\%reuid(2), set\%reuid32,
set\%rlimit(2),
set\%sid(2),
set\%sockopt(2),
set\%timeofday(2),
set\%uid(2), set\%uid32,
setup(2),
sgetmask(2),
shutdown(2),
sigaction(2),
sigaltstack(2),
signal(2),
sigpending(2),
sigprocmask(2),
sigreturn(2),
sigsuspend(2),
socket(2),
socketcall(2),
socketpair(2),
ssetmask(2),
stat(2), stat64,
statfs(2),
stime(2),
stty,
swapoff(2),
swapon(2),
symlink(2),
sync(2),
sysfs(2),
sysinfo(2),
syslog(2),
time(2),
times(2),
truncate(2), truncate64,
ulimit,
umask(2),
umount(2),
uname(2),
unlink(2),
uselib(2),
ustat(2),
utime(2),
vfork(2),
vhangup(2),
vm86(2),
vm86old,
wait4(2),
waitpid(2),
write(2),
writev(2).

De todas estas, 9 están obsoletas, que son 
getrlimit, oldfstat, oldlstat, oldolduname, oldstat, olduname,
readdir, select y vm86old
(véase también obsolete(2)),
y 15 de ellas no están implementadas en el núcleo estándar, que son
afs_syscall, break, ftime, getpmsg, gtty, idle, lock, mpx, phys,
prof, profil, putpmsg, security, stty and ulimit 
(véase también unimplemented(2)).
No obstante, 
.BR ftime (3), 
.BR profil (3) 
y 
.BR ulimit (3)
existen como rutinas de biblioteca.
La entrada para phys la utiliza umount desde la versión 2.1.116; phys nunca
se implementará. Las llamadas getpmsg y putpmsg están disponibles en núcleos
parcheados para soportar flujos, y pueden no estar nunca en el núcleo estándar.
La llamada security es para uso futuro.

Hablando más en detalle, el código que pertenece a la llamada al sistema
con número __NR_xxx definido en
.I /usr/include/asm/unistd.h
puede encontrarse en los fuentes del núcleo como la rutina
.IR sys_xxx() .
(La tabla de llamadas para el i386 puede encontrarse en
.IR /usr/src/linux/arch/i386/kernel/entry.S .)
De todas maneras, hay algunas excepciones, la mayoría como consecuencia
de actualizaciones de viejas llamadas que hayan sido introducidas
de forma poco sistemática. En plataformas con emulación de SO
propietario, como parisc, sparc, sparc64 y alpha,
hay otras muchas llamadas al sistema adicionales; mips64 contiene también
un conjunto completo de llamadas al sistema de 32 bits.

A continuación los detalles de Linux 2.4.17.

Las definiciones __NR_oldstat y __NR_stat se refieren a las rutinas
sys_stat() y sys_newstat() respectivamente, y de igual forma para
.I fstat
y
.IR lstat .
Igualmente, las definiciones __NR_oldolduname, __NR_olduname y __NR_uname
se refieren a las rutinas sys_olduname(), sys_uname() y sys_newuname().
De esta manera, __NR_stat y __NR_uname siempre hacen referencia a la última
versión de cada llamada al sistema, y las otras más antiguas son para
mantener la compatibilidad.

Es diferente con
.I select
y
.IR mmap .
Estas usan cinco o más parámetros, y causan problemas con la manera en la
que los parámetros se pasaban en el i386. De esta manera, mientras que
otras arquitecturas tienen sys_select() y sys_mmap() correspondiendo con
__NR_select y __NR_mmap, en el i386 nos encontramos con old_select() y
old_mmap() (rutinas que usan un puntero a un bloque de parámetros). Actualmente
el pasar cinco parámetros no es un problema, y existe una __NR_newselect
(usada por libc 6) que se corresponde directamente con sys_select()
y de manera similar una  __NR_mmap2.

Para otros números de llamadas al sistema, __NR__llseek y __NR__sysctl
tienen un subrayado adicional que no aparece en sys_llseek() y sys_sysctl().

Además existe __NR_readdir que se corresponde con old_readdir(),
la cual leerá como mucho una entrada de directorio al mismo tiempo, y
que ha sido mejorada por sys_getdents().

En muchas plataformas, incluyendo i386, todas las llamadas de conectores son 
multiplexadas a través de socketcall() y las llamadas IPC de System V a través de ipc().

En plataformas más recientes que sólo disponen de acceso a fichero de 64 bits y
uids de 32 bits (p.e. alpha, ia64, s390x) no hay llamadas *64 o *32 calls. Donde existen las
llamadas *64 y *32, las otras versiones están obsoletas.

Las llamadas al sistema chown y lchown fueron intercambiadas en la versión 2.1.81. 
Las llamadas *64 y *32 fueron añadidas en el núcleo 2.4, así como las nuevas versiones de
getrlimit y mmap, y las nuevas llamadas pivot_root, mincore, madvise,
security, gettid y readahead.