]> git.saurik.com Git - apple/xnu.git/blame - bsd/kern/syscalls.c
xnu-344.21.73.tar.gz
[apple/xnu.git] / bsd / kern / syscalls.c
CommitLineData
1c79356b 1/*
d7e50217 2 * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
1c79356b
A
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
d7e50217 6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
1c79356b 7 *
d7e50217
A
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1c79356b
A
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
d7e50217
A
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
1c79356b
A
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25/* Copyright (c) 1992,1995-1999 Apple Computer, Inc. All rights resereved. */
1c79356b
A
26
27char *syscallnames[] = {
28 "syscall", /* 0 = syscall */
29 "exit", /* 1 = exit */
30 "fork", /* 2 = fork */
31 "read", /* 3 = read */
32 "write", /* 4 = write */
33 "open", /* 5 = open */
34 "close", /* 6 = close */
35 "wait4", /* 7 = wait4 */
9bccf70c 36 "obs_creat", /* 8 = old creat */
1c79356b
A
37 "link", /* 9 = link */
38 "unlink", /* 10 = unlink */
39 "obs_execv", /* 11 = obsolete execv */
40 "chdir", /* 12 = chdir */
41 "fchdir", /* 13 = fchdir */
42 "mknod", /* 14 = mknod */
43 "chmod", /* 15 = chmod */
44 "chown", /* 16 = chown */
9bccf70c
A
45 "obs_break", /* 17 = obsolete break */
46 "obs_getfsstat", /* 18 = obsolete getfsstat */
1c79356b
A
47 "old_lseek", /* 19 = old lseek */
48 "getpid", /* 20 = getpid */
49 "obs_mount", /* 21 = obsolete mount */
50 "obs_unmount", /* 22 = obsolete unmount */
51 "setuid", /* 23 = setuid */
52 "getuid", /* 24 = getuid */
53 "geteuid", /* 25 = geteuid */
54 "ptrace", /* 26 = ptrace */
55 "recvmsg", /* 27 = recvmsg */
56 "sendmsg", /* 28 = sendmsg */
57 "recvfrom", /* 29 = recvfrom */
58 "accept", /* 30 = accept */
59 "getpeername", /* 31 = getpeername */
60 "getsockname", /* 32 = getsockname */
61 "access", /* 33 = access */
62 "chflags", /* 34 = chflags */
63 "fchflags", /* 35 = fchflags */
64 "sync", /* 36 = sync */
65 "kill", /* 37 = kill */
9bccf70c 66 "obs_stat", /* 38 = old stat */
1c79356b 67 "getppid", /* 39 = getppid */
9bccf70c 68 "obs_lstat", /* 40 = old lstat */
1c79356b
A
69 "dup", /* 41 = dup */
70 "pipe", /* 42 = pipe */
71 "getegid", /* 43 = getegid */
72 "profil", /* 44 = profil */
73 "ktrace", /* 45 = ktrace */
74 "sigaction", /* 46 = sigaction */
75 "getgid", /* 47 = getgid */
76 "sigprocmask", /* 48 = sigprocmask */
77 "getlogin", /* 49 = getlogin */
78 "setlogin", /* 50 = setlogin */
79 "acct", /* 51 = acct */
80 "sigpending", /* 52 = sigpending */
81 "sigaltstack", /* 53 = sigaltstack */
82 "ioctl", /* 54 = ioctl */
83 "reboot", /* 55 = reboot */
84 "revoke", /* 56 = revoke */
85 "symlink", /* 57 = symlink */
86 "readlink", /* 58 = readlink */
87 "execve", /* 59 = execve */
88 "umask", /* 60 = umask */
89 "chroot", /* 61 = chroot */
9bccf70c
A
90 "obs_fstat", /* 62 = old fstat */
91 "#63", /* 63 = reserved */
92 "obs_getpagesize", /* 64 = old getpagesize */
1c79356b
A
93 "msync", /* 65 = msync */
94 "vfork", /* 66 = vfork */
95 "obs_vread", /* 67 = obsolete vread */
96 "obs_vwrite", /* 68 = obsolete vwrite */
97 "sbrk", /* 69 = sbrk */
98 "sstk", /* 70 = sstk */
9bccf70c 99 "obs_mmap", /* 71 = old mmap */
1c79356b
A
100 "obs_vadvise", /* 72 = obsolete vadvise */
101 "munmap", /* 73 = munmap */
102 "mprotect", /* 74 = mprotect */
103 "madvise", /* 75 = madvise */
9bccf70c
A
104 "#76", /* 76 = obsolete vhangup */
105 "#77", /* 77 = obsolete vlimit */
1c79356b
A
106 "mincore", /* 78 = mincore */
107 "getgroups", /* 79 = getgroups */
108 "setgroups", /* 80 = setgroups */
109 "getpgrp", /* 81 = getpgrp */
110 "setpgid", /* 82 = setpgid */
111 "setitimer", /* 83 = setitimer */
112 "old_wait", /* 84 = old wait */
9bccf70c 113 "obs_swapon", /* 85 = swapon */
1c79356b 114 "getitimer", /* 86 = getitimer */
9bccf70c
A
115 "obs_gethostname", /* 87 = old gethostname */
116 "obs_sethostname", /* 88 = old sethostname */
1c79356b
A
117 "getdtablesize", /* 89 = getdtablesize */
118 "dup2", /* 90 = dup2 */
119 "#91", /* 91 = getdopt */
120 "fcntl", /* 92 = fcntl */
121 "select", /* 93 = select */
122 "#94", /* 94 = setdopt */
123 "fsync", /* 95 = fsync */
124 "setpriority", /* 96 = setpriority */
125 "socket", /* 97 = socket */
126 "connect", /* 98 = connect */
9bccf70c 127 "obs_accept", /* 99 = old accept */
1c79356b
A
128 "getpriority", /* 100 = getpriority */
129 "old_send", /* 101 = old send */
130 "old_recv", /* 102 = old recv */
d7e50217
A
131#ifdef __ppc__
132 "osigreturn", /* 103 = sigreturn */
133#else
1c79356b 134 "sigreturn", /* 103 = sigreturn */
d7e50217 135#endif
1c79356b
A
136 "bind", /* 104 = bind */
137 "setsockopt", /* 105 = setsockopt */
138 "listen", /* 106 = listen */
9bccf70c
A
139 "#107", /* 107 = obsolete vtimes */
140 "obs_sigvec", /* 108 = old sigvec */
141 "obs_sigblock", /* 109 = old sigblock */
142 "obs_sigsetmask", /* 110 = old sigsetmask */
1c79356b 143 "sigsuspend", /* 111 = sigsuspend */
9bccf70c
A
144 "obs_sigstack", /* 112 = old sigstack */
145 "obs_recvmsg", /* 113 = old recvmsg */
146 "obs_sendmsg", /* 114 = old sendmsg */
147 "#115", /* 115 = obsolete vtrace */
1c79356b
A
148 "gettimeofday", /* 116 = gettimeofday */
149 "getrusage", /* 117 = getrusage */
150 "getsockopt", /* 118 = getsockopt */
151 "#119", /* 119 = nosys */
152 "readv", /* 120 = readv */
153 "writev", /* 121 = writev */
154 "settimeofday", /* 122 = settimeofday */
155 "fchown", /* 123 = fchown */
156 "fchmod", /* 124 = fchmod */
9bccf70c
A
157 "obs_recvfrom", /* 125 = old recvfrom */
158 "obs_setreuid", /* 126 = old setreuid */
159 "obs_setregid", /* 127 = old setregid */
1c79356b 160 "rename", /* 128 = rename */
9bccf70c
A
161 "obs_truncate", /* 129 = old truncate */
162 "obs_ftruncate", /* 130 = old ftruncate */
1c79356b
A
163 "flock", /* 131 = flock */
164 "mkfifo", /* 132 = mkfifo */
165 "sendto", /* 133 = sendto */
166 "shutdown", /* 134 = shutdown */
167 "socketpair", /* 135 = socketpair */
168 "mkdir", /* 136 = mkdir */
169 "rmdir", /* 137 = rmdir */
170 "utimes", /* 138 = utimes */
9bccf70c 171 "futimes", /* 139 = futimes */
1c79356b 172 "adjtime", /* 140 = adjtime */
9bccf70c
A
173 "obs_getpeername", /* 141 = old getpeername */
174 "obs_gethostid", /* 142 = old gethostid */
175 "#143", /* 143 = old sethostid */
176 "obs_getrlimit", /* 144 = old getrlimit */
177 "obs_setrlimit", /* 145 = old setrlimit */
178 "obs_killpg", /* 146 = old killpg */
1c79356b 179 "setsid", /* 147 = setsid */
9bccf70c
A
180 "#148", /* 148 = obsolete setquota */
181 "#149", /* 149 = obsolete qquota */
182 "obs_getsockname", /* 150 = old getsockname */
183 "getpgid", /* 151 = getpgid */
1c79356b 184 "setprivexec", /* 152 = setprivexec */
9bccf70c
A
185 "pread", /* 153 = pread */
186 "pwrite", /* 154 = pwrite */
1c79356b
A
187 "nfssvc", /* 155 = nfssvc */
188 "getdirentries", /* 156 =getdirentries */
189 "statfs", /* 157 = statfs */
190 "fstatfs", /* 158 = fstatfs */
191 "unmount", /* 159 = unmount */
9bccf70c 192 "#160", /* 160 = obsolete async_daemon */
1c79356b 193 "getfh", /* 161 = getfh */
9bccf70c
A
194 "obs_getdomainname",/* 162 = old getdomainname */
195 "obs_setdomainname",/* 163 = old setdomainname */
196 "#164", /* 164 */
1c79356b 197 "quotactl", /* 165 = quotactl */
9bccf70c 198 "#166", /* 166 = obsolete exportfs */
1c79356b 199 "mount", /* 167 = mount */
9bccf70c 200 "#168", /* 168 = obsolete ustat */
1c79356b 201 "#169", /* 169 = nosys */
9bccf70c
A
202 "#170", /* 170 = obsolete table */
203 "obs_wait3", /* 171 = old wait3 */
204 "#172", /* 172 = obsolete rpause */
1c79356b 205 "#173", /* 173 = nosys */
9bccf70c 206 "#174", /* 174 = obsolete getdents */
1c79356b
A
207 "#175", /* 175 = nosys */
208 "add_profil", /* 176 = add_profil */ /* NeXT */
209 "#177", /* 177 = nosys */
210 "#178", /* 178 = nosys */
211 "#179", /* 179 = nosys */
9bccf70c 212 "kdebug_trace", /* 180 = kdebug_trace */
1c79356b
A
213 "setgid", /* 181 = setgid */
214 "setegid", /* 182 = setegid */
215 "seteuid", /* 183 = seteuid */
d7e50217
A
216#ifdef __ppc__
217 "sigreturn", /* 184 = sigreturn */
218#else
1c79356b 219 "#184", /* 184 = nosys */
d7e50217 220#endif
1c79356b
A
221 "#185", /* 185 = nosys */
222 "#186", /* 186 = nosys */
223 "#187", /* 187 = nosys */
1c79356b
A
224 "stat", /* 188 = stat */
225 "fstat", /* 189 = fstat */
226 "lstat", /* 190 = lstat */
227 "pathconf", /* 191 = pathconf */
228 "fpathconf", /* 192 = fpathconf */
9bccf70c 229 "obs_getfsstat", /* 193 = old getfsstat */
1c79356b
A
230 "getrlimit", /* 194 = getrlimit */
231 "setrlimit", /* 195 = setrlimit */
9bccf70c 232 "getdirentries", /* 196 = getdirentries */
1c79356b 233 "mmap", /* 197 = mmap */
9bccf70c 234 "#198", /* 198 = __syscall */
1c79356b
A
235 "lseek", /* 199 = lseek */
236 "truncate", /* 200 = truncate */
237 "ftruncate", /* 201 = ftruncate */
238 "__sysctl", /* 202 = __sysctl */
239 "mlock", /* 203 = mlock */
240 "munlock", /* 204 = munlock */
9bccf70c
A
241 "undelete", /* 205 = undelete */
242 "ATsocket", /* 206 = ATsocket */
243 "ATgetmsg", /* 207 = ATgetmsg */
244 "ATputmsg", /* 208 = ATputmsg */
245 "ATPsndreq", /* 209 = ATPsndreq */
246 "ATPsndrsp", /* 210 = ATPsndrsp */
247 "ATPgetreq", /* 211 = ATPgetreq */
248 "ATPgetrsp", /* 212 = ATPgetrsp */
249 "#213", /* 213 = Reserved for AppleTalk */
250 "#214", /* 214 = Reserved for AppleTalk */
251 "#215", /* 215 = Reserved for AppleTalk */
252 "#216", /* 216 = Reserved */
253 "#217", /* 217 = Reserved */
254 "#218", /* 218 = Reserved */
255 "#219", /* 219 = Reserved */
256 "getattrlist", /* 220 = getattrlist */
257 "setattrlist", /* 221 = setattrlist */
258 "getdirentriesattr", /* 222 = getdirentriesattr */
259 "exchangedata", /* 223 = exchangedata */
260 "checkuseraccess", /* 224 - checkuseraccess */
261 "searchfs", /* 225 = searchfs */
262 "delete", /* 226 = private delete call */
263 "copyfile", /* 227 = copyfile */
264 "#228", /* 228 = nosys */
265 "#229", /* 229 = nosys */
266 "#230", /* 230 = reserved for AFS */
1c79356b
A
267 "watchevent", /* 231 = watchevent */
268 "waitevent", /* 232 = waitevent */
9bccf70c
A
269 "modwatch", /* 233 = modwatch */
270 "#234", /* 234 = nosys */
271 "#235", /* 235 = nosys */
272 "#236", /* 236 = nosys */
273 "#237", /* 237 = nosys */
274 "#238", /* 238 = nosys */
275 "#239", /* 239 = nosys */
276 "#240", /* 240 = nosys */
277 "#241", /* 241 = nosys */
278 "fsctl", /* 242 = fsctl */
279 "#243", /* 243 = nosys */
280 "#244", /* 244 = nosys */
281 "#245", /* 245 = nosys */
282 "#246", /* 246 = nosys */
283 "#247", /* 247 = nosys */
284 "#248", /* 248 = nosys */
285 "#249", /* 249 = nosys */
286 "minherit", /* 250 = minherit */
287 "semsys", /* 251 = semsys */
288 "msgsys", /* 252 = msgsys */
289 "shmsys", /* 253 = shmsys */
290 "semctl", /* 254 = semctl */
291 "semget", /* 255 = semget */
292 "semop", /* 256 = semop */
1c79356b 293 "semconfig", /* 257 = semconfig */
9bccf70c
A
294 "msgctl", /* 258 = msgctl */
295 "msgget", /* 259 = msgget */
296 "msgsnd", /* 260 = msgsnd */
297 "msgrcv", /* 261 = msgrcv */
298 "shmat", /* 262 = shmat */
299 "shmctl", /* 263 = shmctl */
300 "shmdt", /* 264 = shmdt */
301 "shmget", /* 265 = shmget */
302 "shm_open", /* 266 = shm_open */
1c79356b 303 "shm_unlink", /* 267 = shm_unlink */
9bccf70c 304 "sem_open", /* 268 = sem_open */
1c79356b
A
305 "sem_close", /* 269 = sem_close */
306 "sem_unlink", /* 270 = sem_unlink */
9bccf70c 307 "sem_wait", /* 271 = sem_wait */
1c79356b 308 "sem_trywait", /* 272 = sem_trywait */
9bccf70c 309 "sem_post", /* 273 = sem_post */
1c79356b 310 "sem_getvalue", /* 274 = sem_getvalue */
9bccf70c 311 "sem_init", /* 275 = sem_init */
1c79356b 312 "sem_destroy", /* 276 = sem_destroy */
9bccf70c
A
313 "#277", /* 277 = nosys */
314 "#278", /* 278 = nosys */
315 "#279", /* 279 = nosys */
316 "#280", /* 280 = nosys */
317 "#281", /* 281 = nosys */
318 "#282", /* 282 = nosys */
319 "#283", /* 283 = nosys */
320 "#284", /* 284 = nosys */
321 "#285", /* 285 = nosys */
322 "#286", /* 286 = nosys */
323 "#287", /* 287 = nosys */
324 "#288", /* 288 = nosys */
325 "#289", /* 289 = nosys */
326 "#290", /* 290 = nosys */
327 "#291", /* 291 = nosys */
328 "#292", /* 292 = nosys */
329 "#293", /* 293 = nosys */
330 "#294", /* 294 = nosys */
331 "#295", /* 295 = nosys */
1c79356b
A
332 "load_shared_file", /* 296 = load_shared_file */
333 "reset_shared_file", /* 297 = reset_shared_file */
9bccf70c
A
334 "new_system_shared_regions", /* 298 = new_system_shared_regions */
335 "#299", /* 299 = nosys */
336 "#300", /* 300 = modnext */
337 "#301", /* 301 = modstat */
338 "#302", /* 302 = modfnext */
339 "#303", /* 303 = modfind */
340 "#304", /* 304 = kldload */
341 "#305", /* 305 = kldunload */
342 "#306", /* 306 = kldfind */
343 "#307", /* 307 = kldnext */
344 "#308", /* 308 = kldstat */
345 "#309", /* 309 = kldfirstmod */
346 "getsid", /* 310 = getsid */
347 "#311", /* 311 = setresuid */
348 "#312", /* 312 = setresgid */
349 "#313", /* 313 = obsolete signanosleep */
350 "#314", /* 314 = aio_return */
351 "#315", /* 315 = aio_suspend */
352 "#316", /* 316 = aio_cancel */
353 "#317", /* 317 = aio_error */
354 "#318", /* 318 = aio_read */
355 "#319", /* 319 = aio_write */
356 "#320", /* 320 = lio_listio */
357 "#321", /* 321 = yield */
358 "#322", /* 322 = thr_sleep */
359 "#323", /* 323 = thr_wakeup */
360 "mlockall", /* 324 = mlockall */
361 "munlockall", /* 325 = munlockall */
362 "#326", /* 326 */
363 "issetugid", /* 327 = issetugid */
364 "__pthread_kill", /* 328 = __pthread_kill */
365 "pthread_sigmask", /* 329 = pthread_sigmask */
366 "sigwait", /* 330 = sigwait */
367 "#331", /* 331 */
368 "#332", /* 332 */
369 "#333", /* 333 */
370 "#334", /* 334 */
371 "utrace", /* 335 = utrace */
372 "#336", /* 336 */
373 "#337", /* 337 */
374 "#338", /* 338 */
375 "#339", /* 339 */
376 "#340", /* 340 */
377 "#341", /* 341 */
378 "#342", /* 342 */
379 "#343", /* 343 */
380 "#344", /* 344 */
381 "#345", /* 345 */
382 "#346", /* 346 */
383 "#347", /* 347 */
384 "#348", /* 348 */
385 "#349" /* 349 */
1c79356b 386};