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
|
.\" Copyright (c) 1983, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)a.t 8.1 (Berkeley) 6/8/93
.\"
.ds RH Summary of facilities
.bp
.SH
\s+2I. Summary of facilities\s0
.PP
.de h
.br
.if n .ne 8
\fB\\$1 \\$2\fP
.br
..
.nr H1 0
.NH
Kernel primitives
.LP
.h 1.1. "Process naming and protection
.in +5
.TS
lw(1.6i) aw(3i).
sethostid set UNIX host id
gethostid get UNIX host id
sethostname set UNIX host name
gethostname get UNIX host name
getpid get process id
fork create new process
exit terminate a process
execve execute a different process
getuid get user id
geteuid get effective user id
setreuid set real and effective user id's
getgid get accounting group id
getegid get effective accounting group id
getgroups get access group set
setregid set real and effective group id's
setgroups set access group set
getpgrp get process group
setpgrp set process group
.TE
.in -5
.h 1.2 "Memory management
.in +5
.TS
lw(1.6i) aw(3i).
<sys/mman.h> memory management definitions
sbrk change data section size
sstk\(dg change stack section size
.FS
\(dg Not supported in 4.3BSD.
.FE
getpagesize get memory page size
mmap\(dg map pages of memory
msync\(dg flush modified mapped pages to filesystem
munmap\(dg unmap memory
mprotect\(dg change protection of pages
madvise\(dg give memory management advice
mincore\(dg determine core residency of pages
msleep\(dg sleep on a lock
mwakeup\(dg wakeup process sleeping on a lock
.TE
.in -5
.h 1.3 "Signals
.in +5
.TS
lw(1.6i) aw(3i).
<signal.h> signal definitions
sigvec set handler for signal
kill send signal to process
killpgrp send signal to process group
sigblock block set of signals
sigsetmask restore set of blocked signals
sigpause wait for signals
sigstack set software stack for signals
.TE
.in -5
.h 1.4 "Timing and statistics
.in +5
.TS
lw(1.6i) aw(3i).
<sys/time.h> time-related definitions
gettimeofday get current time and timezone
settimeofday set current time and timezone
getitimer read an interval timer
setitimer get and set an interval timer
profil profile process
.TE
.in -5
.h 1.5 "Descriptors
.in +5
.TS
lw(1.6i) aw(3i).
getdtablesize descriptor reference table size
dup duplicate descriptor
dup2 duplicate to specified index
close close descriptor
select multiplex input/output
fcntl control descriptor options
wrap\(dg wrap descriptor with protocol
.FS
\(dg Not supported in 4.3BSD.
.FE
.TE
.in -5
.h 1.6 "Resource controls
.in +5
.TS
lw(1.6i) aw(3i).
<sys/resource.h> resource-related definitions
getpriority get process priority
setpriority set process priority
getrusage get resource usage
getrlimit get resource limitations
setrlimit set resource limitations
.TE
.in -5
.h 1.7 "System operation support
.in +5
.TS
lw(1.6i) aw(3i).
mount mount a device file system
swapon add a swap device
umount umount a file system
sync flush system caches
reboot reboot a machine
acct specify accounting file
.TE
.in -5
.NH
System facilities
.LP
.h 2.1 "Generic operations
.in +5
.TS
lw(1.6i) aw(3i).
read read data
write write data
<sys/uio.h> scatter-gather related definitions
readv scattered data input
writev gathered data output
<sys/ioctl.h> standard control operations
ioctl device control operation
.TE
.in -5
.h 2.2 "File system
.PP
Operations marked with a * exist in two forms: as shown,
operating on a file name, and operating on a file descriptor,
when the name is preceded with a ``f''.
.in +5
.TS
lw(1.6i) aw(3i).
<sys/file.h> file system definitions
chdir change directory
chroot change root directory
mkdir make a directory
rmdir remove a directory
open open a new or existing file
mknod make a special file
portal\(dg make a portal entry
unlink remove a link
stat* return status for a file
lstat returned status of link
chown* change owner
chmod* change mode
utimes change access/modify times
link make a hard link
symlink make a symbolic link
readlink read contents of symbolic link
rename change name of file
lseek reposition within file
truncate* truncate file
access determine accessibility
flock lock a file
.TE
.in -5
.h 2.3 "Communications
.in +5
.TS
lw(1.6i) aw(3i).
<sys/socket.h> standard definitions
socket create socket
bind bind socket to name
getsockname get socket name
listen allow queuing of connections
accept accept a connection
connect connect to peer socket
socketpair create pair of connected sockets
sendto send data to named socket
send send data to connected socket
recvfrom receive data on unconnected socket
recv receive data on connected socket
sendmsg send gathered data and/or rights
recvmsg receive scattered data and/or rights
shutdown partially close full-duplex connection
getsockopt get socket option
setsockopt set socket option
.TE
.in -5
.h 2.4 "Terminals, block and character devices
.in +5
.in -5
.h 2.5 "Processes and kernel hooks
.in -5
|