]>
Commit | Line | Data |
---|---|---|
1c79356b | 1 | /* |
e5568f75 | 2 | * Copyright (c) 1995-2004 Apple Computer, Inc. All rights reserved. |
1c79356b A |
3 | * |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
e5568f75 A |
6 | * The contents of this file constitute Original Code as defined in and |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
1c79356b | 11 | * |
e5568f75 A |
12 | * This Original Code and all software distributed under the License are |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
e5568f75 A |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
1c79356b A |
19 | * |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
1c79356b | 22 | |
9bccf70c | 23 | #include <sys/appleapiopts.h> |
1c79356b A |
24 | #include <sys/param.h> |
25 | #include <sys/systm.h> | |
26 | #include <sys/signal.h> | |
27 | #include <sys/mount.h> | |
28 | ||
29 | /* serial or parallel system call */ | |
30 | #define syss(fn,no) {no, 0, KERNEL_FUNNEL, fn} | |
31 | #define sysp(fn,no) {no, 1, KERNEL_FUNNEL, fn} | |
32 | #define sysnets(fn,no) {no, 0, NETWORK_FUNNEL, fn} | |
33 | #define sysnetp(fn,no) {no, 1, NETWORK_FUNNEL, fn} | |
9bccf70c A |
34 | #define sysnofnl(fn,no) {no, 0, NO_FUNNEL, fn} |
35 | ||
1c79356b A |
36 | /* |
37 | * definitions | |
38 | */ | |
39 | int nosys(); | |
40 | int exit(); | |
41 | int fork(); | |
42 | int read(); | |
43 | int write(); | |
44 | int open(); | |
45 | int close(); | |
46 | int wait4(); | |
47 | int link(); | |
48 | int unlink(); | |
49 | int chdir(); | |
50 | int fchdir(); | |
51 | int mknod(); | |
52 | int chmod(); | |
53 | int chown(); | |
54 | int obreak(); | |
55 | int getfsstat(); | |
56 | #if COMPAT_GETFSSTAT | |
57 | int ogetfsstat(); | |
58 | #endif | |
59 | int getpid(); | |
60 | int mount(); | |
61 | int unmount(); | |
62 | int setuid(); | |
63 | int getuid(); | |
64 | int geteuid(); | |
65 | int ptrace(); | |
66 | int recvmsg(); | |
67 | int sendmsg(); | |
68 | int recvfrom(); | |
69 | int accept(); | |
70 | int getpeername(); | |
71 | int getsockname(); | |
72 | int access(); | |
73 | int chflags(); | |
74 | int fchflags(); | |
75 | int sync(); | |
76 | int kill(); | |
77 | int getppid(); | |
78 | int dup(); | |
79 | int pipe(); | |
80 | int getegid(); | |
81 | int profil(); | |
82 | int load_shared_file(); | |
83 | int reset_shared_file(); | |
9bccf70c | 84 | int new_system_shared_regions(); |
1c79356b | 85 | int ktrace(); |
1c79356b A |
86 | int sigaction(); |
87 | int getgid(); | |
88 | int sigprocmask(); | |
89 | int getlogin(); | |
90 | int setlogin(); | |
91 | int acct(); | |
92 | int sigpending(); | |
93 | int sigaltstack(); | |
94 | int ioctl(); | |
95 | int reboot(); | |
96 | int revoke(); | |
97 | int symlink(); | |
98 | int readlink(); | |
99 | int execve(); | |
100 | int umask(); | |
101 | int chroot(); | |
102 | int msync(); | |
103 | int vfork(); | |
104 | int sbrk(); | |
105 | int sstk(); | |
106 | int ovadvise(); | |
107 | int munmap(); | |
108 | int mprotect(); | |
109 | int madvise(); | |
110 | int mincore(); | |
111 | int getgroups(); | |
112 | int setgroups(); | |
113 | int getpgrp(); | |
114 | int setpgid(); | |
115 | int setitimer(); | |
116 | int swapon(); | |
117 | int getitimer(); | |
118 | int getdtablesize(); | |
119 | int dup2(); | |
120 | int fcntl(); | |
121 | int select(); | |
122 | int fsync(); | |
123 | int setpriority(); | |
124 | int socket(); | |
125 | int connect(); | |
126 | int getpriority(); | |
55e303ae A |
127 | #ifdef __ppc__ |
128 | int osigreturn(); | |
129 | #endif | |
1c79356b A |
130 | int sigreturn(); |
131 | int bind(); | |
132 | int setsockopt(); | |
133 | int listen(); | |
134 | int sigsuspend(); | |
135 | #if TRACE | |
136 | int vtrace(); | |
137 | #else | |
138 | #endif | |
139 | int gettimeofday(); | |
9bccf70c A |
140 | #ifdef __ppc__ |
141 | int ppc_gettimeofday(); | |
142 | #endif | |
1c79356b A |
143 | int getrusage(); |
144 | int getsockopt(); | |
145 | int readv(); | |
146 | int writev(); | |
147 | int settimeofday(); | |
148 | int fchown(); | |
149 | int fchmod(); | |
150 | int rename(); | |
151 | int flock(); | |
152 | int mkfifo(); | |
153 | int sendto(); | |
154 | int shutdown(); | |
155 | int socketpair(); | |
156 | int mkdir(); | |
157 | int rmdir(); | |
158 | int utimes(); | |
9bccf70c | 159 | int futimes(); |
1c79356b A |
160 | int adjtime(); |
161 | int setsid(); | |
162 | int quotactl(); | |
163 | int nfssvc(); | |
164 | int statfs(); | |
165 | int fstatfs(); | |
166 | int getfh(); | |
167 | int setgid(); | |
168 | int setegid(); | |
169 | int seteuid(); | |
1c79356b A |
170 | int stat(); |
171 | int fstat(); | |
172 | int lstat(); | |
173 | int pathconf(); | |
174 | int fpathconf(); | |
175 | int getrlimit(); | |
176 | int setrlimit(); | |
177 | int getdirentries(); | |
178 | int mmap(); | |
179 | int nosys(); | |
180 | int lseek(); | |
181 | int truncate(); | |
182 | int ftruncate(); | |
183 | int __sysctl(); | |
184 | int undelete(); | |
185 | int setprivexec(); | |
186 | int add_profil(); | |
1c79356b A |
187 | |
188 | int kdebug_trace(); | |
189 | ||
190 | int mlock(); | |
191 | int munlock(); | |
192 | int minherit(); | |
193 | int mlockall(); | |
194 | int munlockall(); | |
195 | #if COMPAT_43 | |
196 | #define compat(name,n) syss(__CONCAT(o,name),n) | |
197 | #define compatp(name,n) sysp(__CONCAT(o,name),n) | |
198 | #define comaptnet(name,n) sysnets(__CONCAT(o,name),n) | |
199 | #define comaptnetp(name,n) sysnetp(__CONCAT(o,name),n) | |
200 | ||
201 | int ocreat(); | |
202 | int olseek(); | |
203 | int ostat(); | |
204 | int olstat(); | |
1c79356b A |
205 | int ofstat(); |
206 | int ogetkerninfo(); | |
207 | int osmmap(); | |
208 | int ogetpagesize(); | |
209 | int ommap(); | |
210 | int owait(); | |
211 | int ogethostname(); | |
212 | int osethostname(); | |
213 | int oaccept(); | |
214 | int osend(); | |
215 | int orecv(); | |
216 | int osigvec(); | |
217 | int osigblock(); | |
218 | int osigsetmask(); | |
219 | int osigstack(); | |
220 | int orecvmsg(); | |
221 | int osendmsg(); | |
1c79356b A |
222 | int orecvfrom(); |
223 | int osetreuid(); | |
224 | int osetregid(); | |
225 | int otruncate(); | |
226 | int oftruncate(); | |
227 | int ogetpeername(); | |
228 | int ogethostid(); | |
229 | int osethostid(); | |
230 | int ogetrlimit(); | |
231 | int osetrlimit(); | |
232 | int okillpg(); | |
233 | int oquota(); | |
234 | int ogetsockname(); | |
235 | int ogetdomainname(); | |
236 | int osetdomainname(); | |
237 | int owait3(); | |
1c79356b | 238 | int ogetdirentries(); |
1c79356b A |
239 | |
240 | #if NETAT | |
241 | int ATsocket(); | |
242 | int ATgetmsg(); | |
243 | int ATputmsg(); | |
244 | int ATPsndreq(); | |
245 | int ATPsndrsp(); | |
246 | int ATPgetreq(); | |
247 | int ATPgetrsp(); | |
248 | #endif /* NETAT */ | |
249 | ||
250 | /* Calls for supporting HFS Semantics */ | |
251 | ||
252 | int mkcomplex(); | |
253 | int statv(); | |
254 | int lstatv(); | |
255 | int fstatv(); | |
256 | int getattrlist(); | |
257 | int setattrlist(); | |
258 | int getdirentriesattr(); | |
259 | int exchangedata(); | |
260 | int checkuseraccess(); | |
261 | int searchfs(); | |
262 | int delete(); | |
263 | int copyfile(); | |
9bccf70c | 264 | |
1c79356b A |
265 | /* end of HFS calls */ |
266 | ||
267 | #else /* COMPAT_43 */ | |
268 | #define compat(n, name) syss(nosys,0) | |
269 | #define compatp(n, name) sysp(nosys,0) | |
270 | #define comaptnet(n, name) sysnets(nosys,0) | |
271 | #define comaptnetp(n, name) sysnetp(nosys,0) | |
272 | #endif /* COMPAT_43 */ | |
273 | ||
274 | int watchevent(); | |
275 | int waitevent(); | |
276 | int modwatch(); | |
277 | int fsctl(); | |
278 | int semsys(); | |
279 | int msgsys(); | |
280 | int shmsys(); | |
281 | int semctl(); | |
282 | int semget(); | |
283 | int semop(); | |
284 | int semconfig(); | |
285 | int msgctl(); | |
286 | int msgget(); | |
287 | int msgsnd(); | |
288 | int msgrcv(); | |
289 | int shmat(); | |
290 | int shmctl(); | |
291 | int shmdt(); | |
292 | int shmget(); | |
293 | int shm_open(); | |
294 | int shm_unlink(); | |
295 | int sem_open(); | |
296 | int sem_close(); | |
297 | int sem_unlink(); | |
298 | int sem_wait(); | |
299 | int sem_trywait(); | |
300 | int sem_post(); | |
301 | int sem_getvalue(); | |
302 | int sem_init(); | |
303 | int sem_destroy(); | |
0b4e3aa0 | 304 | |
55e303ae A |
305 | int fmod_watch_enable(); |
306 | int fmod_watch(); | |
307 | ||
9bccf70c A |
308 | int issetugid(); |
309 | int utrace(); | |
310 | int pread(); | |
311 | int pwrite(); | |
312 | int getsid(); | |
313 | int getpgid(); | |
314 | ||
315 | int __pthread_kill(); | |
316 | int sigwait(); | |
317 | int pthread_sigmask(); | |
318 | int __disable_threadsignal(); | |
319 | ||
55e303ae A |
320 | int nfsclnt(); |
321 | int fhopen(); | |
322 | ||
323 | int aio_cancel(); | |
324 | int aio_error(); | |
325 | int aio_fsync(); | |
326 | int aio_read(); | |
327 | int aio_return(); | |
328 | int aio_suspend(); | |
329 | int aio_write(); | |
330 | int lio_listio(); | |
331 | ||
332 | int kqueue(); | |
333 | int kqueue_portset_np(); | |
334 | int kqueue_from_portset_np(); | |
335 | int kevent(); | |
336 | ||
337 | int audit(); | |
338 | int auditon(); | |
55e303ae A |
339 | int getauid(); |
340 | int setauid(); | |
341 | int getaudit(); | |
342 | int setaudit(); | |
343 | int getaudit_addr(); | |
344 | int setaudit_addr(); | |
345 | int auditctl(); | |
346 | ||
1c79356b A |
347 | /* |
348 | * System call switch table. | |
349 | */ | |
1c79356b | 350 | |
55e303ae A |
351 | /* |
352 | * N.B. | |
353 | * The argument count numbers in this table are actually | |
354 | * the number of UInt32 words that comprise the arguments | |
355 | * not the number of arguments | |
356 | * | |
357 | * This value is not currently used on PPC but Intel Darwin | |
358 | * does use it and will not work correctly if the values | |
359 | * are wrong | |
360 | */ | |
361 | ||
1c79356b A |
362 | struct sysent sysent[] = { |
363 | syss(nosys,0), /* 0 = indir */ | |
364 | syss(exit,1), /* 1 = exit */ | |
365 | syss(fork,0), /* 2 = fork */ | |
366 | sysp(read,3), /* 3 = read */ | |
367 | sysp(write,3), /* 4 = write */ | |
368 | syss(open,3), /* 5 = open */ | |
369 | syss(close,1), /* 6 = close */ | |
370 | syss(wait4, 4), /* 7 = wait4 */ | |
371 | compat(creat,2), /* 8 = old creat */ | |
372 | syss(link,2), /* 9 = link */ | |
373 | syss(unlink,1), /* 10 = unlink */ | |
374 | syss(nosys, 0), /* 11 was obsolete execv */ | |
375 | syss(chdir,1), /* 12 = chdir */ | |
376 | syss(fchdir,1), /* 13 = fchdir */ | |
377 | syss(mknod,3), /* 14 = mknod */ | |
378 | syss(chmod,2), /* 15 = chmod */ | |
379 | syss(chown,3), /* 16 = chown; now 3 args */ | |
380 | syss(obreak,1), /* 17 = old break */ | |
381 | #if COMPAT_GETFSSTAT | |
382 | syss(ogetfsstat, 3), /* 18 = ogetfsstat */ | |
383 | #else | |
384 | syss(getfsstat, 3), /* 18 = getfsstat */ | |
385 | #endif | |
386 | compat(lseek,3), /* 19 = old lseek */ | |
387 | sysp(getpid,0), /* 20 = getpid */ | |
388 | syss(nosys, 0), /* 21 was obsolete mount */ | |
389 | syss(nosys, 0), /* 22 was obsolete umount */ | |
390 | syss(setuid,1), /* 23 = setuid */ | |
391 | sysp(getuid,0), /* 24 = getuid */ | |
392 | sysp(geteuid,0), /* 25 = geteuid */ | |
393 | syss(ptrace,4), /* 26 = ptrace */ | |
394 | sysnets(recvmsg,3), /* 27 = recvmsg */ | |
395 | sysnets(sendmsg,3), /* 28 = sendmsg */ | |
396 | sysnets(recvfrom,6), /* 29 = recvfrom */ | |
397 | sysnets(accept,3), /* 30 = accept */ | |
398 | sysnets(getpeername,3), /* 31 = getpeername */ | |
399 | sysnets(getsockname,3), /* 32 = getsockname */ | |
400 | syss(access,2), /* 33 = access */ | |
401 | syss(chflags,2), /* 34 = chflags */ | |
402 | syss(fchflags,2), /* 35 = fchflags */ | |
403 | syss(sync,0), /* 36 = sync */ | |
404 | syss(kill,2), /* 37 = kill */ | |
405 | compat(stat,2), /* 38 = old stat */ | |
406 | sysp(getppid,0), /* 39 = getppid */ | |
407 | compat(lstat,2), /* 40 = old lstat */ | |
9bccf70c | 408 | syss(dup,1), /* 41 = dup */ |
1c79356b A |
409 | syss(pipe,0), /* 42 = pipe */ |
410 | sysp(getegid,0), /* 43 = getegid */ | |
411 | syss(profil,4), /* 44 = profil */ | |
1c79356b | 412 | syss(ktrace,4), /* 45 = ktrace */ |
1c79356b A |
413 | syss(sigaction,3), /* 46 = sigaction */ |
414 | sysp(getgid,0), /* 47 = getgid */ | |
9bccf70c | 415 | syss(sigprocmask,3), /* 48 = sigprocmask */ |
1c79356b A |
416 | syss(getlogin,2), /* 49 = getlogin */ |
417 | syss(setlogin,1), /* 50 = setlogin */ | |
418 | syss(acct,1), /* 51 = turn acct off/on */ | |
9bccf70c | 419 | syss(sigpending,1), /* 52 = sigpending */ |
1c79356b A |
420 | syss(sigaltstack,2), /* 53 = sigaltstack */ |
421 | syss(ioctl,3), /* 54 = ioctl */ | |
422 | syss(reboot,2), /* 55 = reboot */ | |
423 | syss(revoke,1), /* 56 = revoke */ | |
424 | syss(symlink,2), /* 57 = symlink */ | |
425 | syss(readlink,3), /* 58 = readlink */ | |
426 | syss(execve,3), /* 59 = execve */ | |
427 | syss(umask,1), /* 60 = umask */ | |
428 | syss(chroot,1), /* 61 = chroot */ | |
429 | compat(fstat,2), /* 62 = old fstat */ | |
430 | syss(nosys,0), /* 63 = used internally, reserved */ | |
431 | compat(getpagesize,0), /* 64 = old getpagesize */ | |
432 | syss(msync,3), /* 65 = msync */ | |
433 | syss(vfork,0), /* 66 = vfork */ | |
434 | syss(nosys,0), /* 67 was obsolete vread */ | |
435 | syss(nosys,0), /* 68 was obsolete vwrite */ | |
436 | syss(sbrk,1), /* 69 = sbrk */ | |
437 | syss(sstk,1), /* 70 = sstk */ | |
438 | compat(smmap,6), /* 71 = old mmap */ | |
439 | syss(ovadvise,1), /* 72 = old vadvise */ | |
55e303ae | 440 | sysnofnl(munmap,2), /* 73 = munmap */ |
1c79356b A |
441 | syss(mprotect,3), /* 74 = mprotect */ |
442 | syss(madvise,3), /* 75 = madvise */ | |
443 | syss(nosys,0), /* 76 was obsolete vhangup */ | |
444 | syss(nosys,0), /* 77 was obsolete vlimit */ | |
445 | syss(mincore,3), /* 78 = mincore */ | |
446 | sysp(getgroups,2), /* 79 = getgroups */ | |
447 | sysp(setgroups,2), /* 80 = setgroups */ | |
448 | sysp(getpgrp,0), /* 81 = getpgrp */ | |
449 | sysp(setpgid,2), /* 82 = setpgid */ | |
450 | syss(setitimer,3), /* 83 = setitimer */ | |
55e303ae | 451 | compat(wait,1), /* 84 = old wait */ |
1c79356b A |
452 | syss(swapon,1), /* 85 = swapon */ |
453 | syss(getitimer,2), /* 86 = getitimer */ | |
454 | compat(gethostname,2), /* 87 = old gethostname */ | |
455 | compat(sethostname,2), /* 88 = old sethostname */ | |
456 | sysp(getdtablesize, 0), /* 89 getdtablesize */ | |
457 | syss(dup2,2), /* 90 = dup2 */ | |
458 | syss(nosys,0), /* 91 was obsolete getdopt */ | |
459 | syss(fcntl,3), /* 92 = fcntl */ | |
460 | syss(select,5), /* 93 = select */ | |
461 | syss(nosys,0), /* 94 was obsolete setdopt */ | |
462 | syss(fsync,1), /* 95 = fsync */ | |
463 | sysp(setpriority,3), /* 96 = setpriority */ | |
9bccf70c | 464 | sysnets(socket,3), /* 97 = socket */ |
1c79356b A |
465 | sysnets(connect,3), /* 98 = connect */ |
466 | comaptnet(accept,3), /* 99 = accept */ | |
467 | sysp(getpriority,2), /* 100 = getpriority */ | |
468 | comaptnet(send,4), /* 101 = old send */ | |
469 | comaptnet(recv,4), /* 102 = old recv */ | |
55e303ae A |
470 | #ifdef __ppc__ |
471 | syss(osigreturn,1), /* 103 = sigreturn ; compat for jaguar*/ | |
472 | #else | |
473 | syss(sigreturn,1), /* 103 = sigreturn */ | |
474 | #endif | |
9bccf70c A |
475 | sysnets(bind,3), /* 104 = bind */ |
476 | sysnets(setsockopt,5), /* 105 = setsockopt */ | |
477 | sysnets(listen,2), /* 106 = listen */ | |
1c79356b A |
478 | syss(nosys,0), /* 107 was vtimes */ |
479 | compat(sigvec,3), /* 108 = sigvec */ | |
480 | compat(sigblock,1), /* 109 = sigblock */ | |
481 | compat(sigsetmask,1), /* 110 = sigsetmask */ | |
482 | syss(sigsuspend,1), /* 111 = sigpause */ | |
9bccf70c | 483 | compat(sigstack,2), /* 112 = sigstack */ |
1c79356b A |
484 | comaptnet(recvmsg,3), /* 113 = recvmsg */ |
485 | comaptnet(sendmsg,3), /* 114 = sendmsg */ | |
486 | syss(nosys,0), /* 115 = old vtrace */ | |
55e303ae A |
487 | |
488 | /* | |
489 | * N.B. | |
490 | * The argument count numbers in this table are actually | |
491 | * the number of UInt32 words that comprise the arguments | |
492 | * not the number of arguments | |
493 | * | |
494 | * This value is not currently used on PPC but Intel Darwin | |
495 | * does use it and will not work correctly if the values | |
496 | * are wrong | |
497 | */ | |
498 | ||
9bccf70c A |
499 | #ifdef __ppc__ |
500 | sysnofnl(ppc_gettimeofday,2), /* 116 = gettimeofday */ | |
501 | #else | |
502 | sysnofnl(gettimeofday,2), /* 116 = gettimeofday */ | |
503 | #endif | |
1c79356b | 504 | sysp(getrusage,2), /* 117 = getrusage */ |
9bccf70c | 505 | sysnets(getsockopt,5), /* 118 = getsockopt */ |
1c79356b A |
506 | syss(nosys,0), /* 119 = old resuba */ |
507 | sysp(readv,3), /* 120 = readv */ | |
508 | sysp(writev,3), /* 121 = writev */ | |
509 | syss(settimeofday,2), /* 122 = settimeofday */ | |
510 | syss(fchown,3), /* 123 = fchown */ | |
511 | syss(fchmod,2), /* 124 = fchmod */ | |
512 | comaptnet(recvfrom,6), /* 125 = recvfrom */ | |
9bccf70c A |
513 | compat(setreuid,2), /* 126 = setreuid */ |
514 | compat(setregid,2), /* 127 = setregid */ | |
1c79356b | 515 | syss(rename,2), /* 128 = rename */ |
9bccf70c | 516 | compat(truncate,2), /* 129 = old truncate */ |
1c79356b A |
517 | compat(ftruncate,2), /* 130 = ftruncate */ |
518 | syss(flock,2), /* 131 = flock */ | |
9bccf70c | 519 | syss(mkfifo,2), /* 132 = mkfifo */ |
1c79356b | 520 | sysnets(sendto,6), /* 133 = sendto */ |
9bccf70c A |
521 | sysnets(shutdown,2), /* 134 = shutdown */ |
522 | sysnets(socketpair,4), /* 135 = socketpair */ | |
1c79356b A |
523 | syss(mkdir,2), /* 136 = mkdir */ |
524 | syss(rmdir,1), /* 137 = rmdir */ | |
525 | syss(utimes,2), /* 138 = utimes */ | |
9bccf70c | 526 | syss(futimes,2), /* 139 = futimes */ |
1c79356b A |
527 | syss(adjtime,2), /* 140 = adjtime */ |
528 | comaptnet(getpeername,3),/* 141 = getpeername */ | |
529 | compat(gethostid,0), /* 142 = old gethostid */ | |
530 | sysp(nosys,0), /* 143 = old sethostid */ | |
531 | compat(getrlimit,2), /* 144 = old getrlimit */ | |
532 | compat(setrlimit,2), /* 145 = old setrlimit */ | |
533 | compat(killpg,2), /* 146 = old killpg */ | |
534 | syss(setsid,0), /* 147 = setsid */ | |
535 | syss(nosys,0), /* 148 was setquota */ | |
536 | syss(nosys,0), /* 149 was qquota */ | |
537 | comaptnet(getsockname,3),/* 150 = getsockname */ | |
9bccf70c | 538 | syss(getpgid,1), /* 151 = getpgid */ |
1c79356b | 539 | sysp(setprivexec,1),/* 152 = setprivexec */ |
9bccf70c | 540 | #ifdef DOUBLE_ALIGN_PARAMS |
55e303ae A |
541 | syss(pread,6), /* 153 = pread */ |
542 | syss(pwrite,6), /* 154 = pwrite */ | |
543 | #else | |
9bccf70c A |
544 | syss(pread,5), /* 153 = pread */ |
545 | syss(pwrite,5), /* 154 = pwrite */ | |
9bccf70c | 546 | #endif |
1c79356b A |
547 | syss(nfssvc,2), /* 155 = nfs_svc */ |
548 | compat(getdirentries,4), /* 156 = old getdirentries */ | |
549 | syss(statfs, 2), /* 157 = statfs */ | |
550 | syss(fstatfs, 2), /* 158 = fstatfs */ | |
551 | syss(unmount, 2), /* 159 = unmount */ | |
552 | syss(nosys,0), /* 160 was async_daemon */ | |
553 | syss(getfh,2), /* 161 = get file handle */ | |
1c79356b A |
554 | compat(getdomainname,2), /* 162 = getdomainname */ |
555 | compat(setdomainname,2), /* 163 = setdomainname */ | |
556 | syss(nosys,0), /* 164 */ | |
557 | #if QUOTA | |
558 | syss(quotactl, 4), /* 165 = quotactl */ | |
55e303ae | 559 | #else /* QUOTA */ |
1c79356b A |
560 | syss(nosys, 0), /* 165 = not configured */ |
561 | #endif /* QUOTA */ | |
562 | syss(nosys,0), /* 166 was exportfs */ | |
563 | syss(mount, 4), /* 167 = mount */ | |
564 | syss(nosys,0), /* 168 was ustat */ | |
565 | syss(nosys,0), /* 169 = nosys */ | |
566 | syss(nosys,0), /* 170 was table */ | |
567 | compat(wait3,3), /* 171 = old wait3 */ | |
568 | syss(nosys,0), /* 172 was rpause */ | |
569 | syss(nosys,0), /* 173 = nosys */ | |
570 | syss(nosys,0), /* 174 was getdents */ | |
571 | syss(nosys,0), /* 175 was gc_control */ | |
572 | syss(add_profil,4), /* 176 = add_profil */ | |
573 | syss(nosys,0), /* 177 */ | |
574 | syss(nosys,0), /* 178 */ | |
575 | syss(nosys,0), /* 179 */ | |
55e303ae | 576 | sysnofnl(kdebug_trace,6), /* 180 */ |
1c79356b A |
577 | syss(setgid,1), /* 181 */ |
578 | syss(setegid,1), /* 182 */ | |
9bccf70c | 579 | syss(seteuid,1), /* 183 */ |
55e303ae A |
580 | #ifdef __ppc__ |
581 | syss(sigreturn, 2), /* 184 = nosys */ | |
582 | #else | |
1c79356b | 583 | syss(nosys,0), /* 184 = nosys */ |
55e303ae | 584 | #endif |
1c79356b A |
585 | syss(nosys,0), /* 185 = nosys */ |
586 | syss(nosys,0), /* 186 = nosys */ | |
587 | syss(nosys,0), /* 187 = nosys */ | |
1c79356b A |
588 | syss(stat,2), /* 188 = stat */ |
589 | syss(fstat,2), /* 189 = fstat */ | |
590 | syss(lstat,2), /* 190 = lstat */ | |
591 | syss(pathconf,2), /* 191 = pathconf */ | |
592 | syss(fpathconf,2), /* 192 = fpathconf */ | |
55e303ae A |
593 | |
594 | /* | |
595 | * N.B. | |
596 | * The argument count numbers in this table are actually | |
597 | * the number of UInt32 words that comprise the arguments | |
598 | * not the number of arguments | |
599 | * | |
600 | * This value is not currently used on PPC but Intel Darwin | |
601 | * does use it and will not work correctly if the values | |
602 | * are wrong | |
603 | */ | |
604 | ||
1c79356b | 605 | #if COMPAT_GETFSSTAT |
9bccf70c | 606 | syss(getfsstat,3), /* 193 = getfsstat */ |
1c79356b A |
607 | #else |
608 | syss(nosys,0), /* 193 is unused */ | |
609 | #endif | |
610 | syss(getrlimit,2), /* 194 = getrlimit */ | |
611 | syss(setrlimit,2), /* 195 = setrlimit */ | |
612 | syss(getdirentries,4), /* 196 = getdirentries */ | |
613 | #ifdef DOUBLE_ALIGN_PARAMS | |
614 | syss(mmap,8), /* 197 = mmap */ | |
615 | #else | |
616 | syss(mmap,7), /* 197 = mmap */ | |
617 | #endif | |
618 | syss(nosys,0), /* 198 = __syscall */ | |
9bccf70c | 619 | #ifdef DOUBLE_ALIGN_PARAMS |
1c79356b | 620 | syss(lseek,5), /* 199 = lseek */ |
9bccf70c A |
621 | #else |
622 | syss(lseek,4), /* 199 = lseek */ | |
623 | #endif | |
624 | #ifdef DOUBLE_ALIGN_PARAMS | |
1c79356b A |
625 | syss(truncate,4), /* 200 = truncate */ |
626 | syss(ftruncate,4), /* 201 = ftruncate */ | |
9bccf70c A |
627 | #else |
628 | syss(truncate,3), /* 200 = truncate */ | |
629 | syss(ftruncate,3), /* 201 = ftruncate */ | |
630 | #endif | |
1c79356b A |
631 | syss(__sysctl,6), /* 202 = __sysctl */ |
632 | sysp(mlock, 2), /* 203 = mlock */ | |
633 | syss(munlock, 2), /* 204 = munlock */ | |
1c79356b | 634 | syss(undelete,1), /* 205 = undelete */ |
9bccf70c A |
635 | #if NETAT |
636 | sysnets(ATsocket,1), /* 206 = ATsocket */ | |
637 | sysnets(ATgetmsg,4), /* 207 = ATgetmsg*/ | |
638 | sysnets(ATputmsg,4), /* 208 = ATputmsg*/ | |
639 | sysnets(ATPsndreq,4), /* 209 = ATPsndreq*/ | |
640 | sysnets(ATPsndrsp,4), /* 210 = ATPsndrsp*/ | |
641 | sysnets(ATPgetreq,3), /* 211 = ATPgetreq*/ | |
642 | sysnets(ATPgetrsp,2), /* 212 = ATPgetrsp*/ | |
643 | syss(nosys,0), /* 213 = Reserved for AppleTalk */ | |
55e303ae A |
644 | syss(kqueue_from_portset_np,1), /* 214 = kqueue_from_portset_np */ |
645 | syss(kqueue_portset_np,1), /* 215 = kqueue_portset_np */ | |
1c79356b | 646 | #else |
1c79356b A |
647 | syss(nosys,0), /* 206 = Reserved for AppleTalk */ |
648 | syss(nosys,0), /* 207 = Reserved for AppleTalk */ | |
649 | syss(nosys,0), /* 208 = Reserved for AppleTalk */ | |
650 | syss(nosys,0), /* 209 = Reserved for AppleTalk */ | |
651 | syss(nosys,0), /* 210 = Reserved for AppleTalk */ | |
652 | syss(nosys,0), /* 211 = Reserved for AppleTalk */ | |
653 | syss(nosys,0), /* 212 = Reserved for AppleTalk */ | |
654 | syss(nosys,0), /* 213 = Reserved for AppleTalk */ | |
655 | syss(nosys,0), /* 214 = Reserved for AppleTalk */ | |
656 | syss(nosys,0), /* 215 = Reserved for AppleTalk */ | |
657 | #endif /* NETAT */ | |
658 | ||
659 | /* | |
660 | * System Calls 216 - 230 are reserved for calls to support HFS/HFS Plus | |
661 | * file system semantics. Currently, we only use 215-227. The rest is | |
662 | * for future expansion in anticipation of new MacOS APIs for HFS Plus. | |
663 | * These calls are not conditionalized becuase while they are specific | |
664 | * to HFS semantics, they are not specific to the HFS filesystem. | |
665 | * We expect all filesystems to recognize the call and report that it is | |
666 | * not supported or to actually implement it. | |
667 | */ | |
55e303ae A |
668 | |
669 | /* | |
670 | * N.B. | |
671 | * The argument count numbers in this table are actually | |
672 | * the number of UInt32 words that comprise the arguments | |
673 | * not the number of arguments | |
674 | * | |
675 | * This value is not currently used on PPC but Intel Darwin | |
676 | * does use it and will not work correctly if the values | |
677 | * are wrong | |
678 | */ | |
679 | ||
1c79356b A |
680 | syss(nosys,3), /* 216 = HFS make complex file call (multipel forks */ |
681 | syss(nosys,2), /* 217 = HFS statv extended stat call for HFS */ | |
682 | syss(nosys,2), /* 218 = HFS lstatv extended lstat call for HFS */ | |
683 | syss(nosys,2), /* 219 = HFS fstatv extended fstat call for HFS */ | |
684 | syss(getattrlist,5), /* 220 = HFS getarrtlist get attribute list cal */ | |
685 | syss(setattrlist,5), /* 221 = HFS setattrlist set attribute list */ | |
686 | syss(getdirentriesattr,8), /* 222 = HFS getdirentriesattr get directory attributes */ | |
687 | syss(exchangedata,3), /* 223 = HFS exchangedata exchange file contents */ | |
9bccf70c | 688 | #ifdef __APPLE_API_OBSOLETE |
1c79356b | 689 | syss(checkuseraccess,6),/* 224 = HFS checkuseraccess check access to a file */ |
9bccf70c A |
690 | #else |
691 | syss(nosys,6),/* 224 = HFS checkuseraccess check access to a file */ | |
692 | #endif /* __APPLE_API_OBSOLETE */ | |
1c79356b | 693 | syss(searchfs,6), /* 225 = HFS searchfs to implement catalog searching */ |
9bccf70c | 694 | syss(delete,1), /* 226 = private delete (Carbon semantics) */ |
55e303ae | 695 | syss(copyfile,6), /* 227 = copyfile - orignally for AFP */ |
1c79356b A |
696 | syss(nosys,0), /* 228 */ |
697 | syss(nosys,0), /* 229 */ | |
698 | syss(nosys,0), /* 230 */ | |
699 | sysnets(watchevent,2), /* 231 */ | |
700 | sysnets(waitevent,2), /* 232 */ | |
701 | sysnets(modwatch,2), /* 233 */ | |
702 | syss(nosys,0), /* 234 */ | |
703 | syss(nosys,0), /* 235 */ | |
704 | syss(nosys,0), /* 236 */ | |
705 | syss(nosys,0), /* 237 */ | |
706 | syss(nosys,0), /* 238 */ | |
707 | syss(nosys,0), /* 239 */ | |
708 | syss(nosys,0), /* 240 */ | |
709 | syss(nosys,0), /* 241 */ | |
9bccf70c | 710 | syss(fsctl,4), /* 242 = fsctl */ |
1c79356b A |
711 | syss(nosys,0), /* 243 */ |
712 | syss(nosys,0), /* 244 */ | |
713 | syss(nosys,0), /* 245 */ | |
714 | syss(nosys,0), /* 246 */ | |
55e303ae A |
715 | syss(nfsclnt,2), /* 247 = nfsclnt*/ |
716 | syss(fhopen,2), /* 248 = fhopen */ | |
1c79356b | 717 | syss(nosys,0), /* 249 */ |
9bccf70c | 718 | syss(minherit,3), /* 250 = minherit */ |
1c79356b A |
719 | syss(semsys,5), /* 251 = semsys */ |
720 | syss(msgsys,6), /* 252 = msgsys */ | |
721 | syss(shmsys,4), /* 253 = shmsys */ | |
722 | syss(semctl,4), /* 254 = semctl */ | |
723 | syss(semget,3), /* 255 = semget */ | |
724 | syss(semop,3), /* 256 = semop */ | |
725 | syss(semconfig,1), /* 257 = semconfig */ | |
726 | syss(msgctl,3), /* 258 = msgctl */ | |
727 | syss(msgget,2), /* 259 = msgget */ | |
728 | syss(msgsnd,4), /* 260 = msgsnd */ | |
729 | syss(msgrcv,5), /* 261 = msgrcv */ | |
730 | syss(shmat,3), /* 262 = shmat */ | |
731 | syss(shmctl,3), /* 263 = shmctl */ | |
732 | syss(shmdt,1), /* 264 = shmdt */ | |
733 | syss(shmget,3), /* 265 = shmget */ | |
734 | syss(shm_open,3), /* 266 = shm_open */ | |
735 | syss(shm_unlink,1), /* 267 = shm_unlink */ | |
736 | syss(sem_open,4), /* 268 = sem_open */ | |
737 | syss(sem_close,1), /* 269 = sem_close */ | |
738 | syss(sem_unlink,1), /* 270 = sem_unlink */ | |
739 | syss(sem_wait,1), /* 271 = sem_wait */ | |
740 | syss(sem_trywait,1), /* 272 = sem_trywait */ | |
741 | syss(sem_post,1), /* 273 = sem_post */ | |
742 | syss(sem_getvalue,2), /* 274 = sem_getvalue */ | |
743 | syss(sem_init,3), /* 275 = sem_init */ | |
744 | syss(sem_destroy,1), /* 276 = sem_destroy */ | |
745 | syss(nosys,0), /* 277 */ | |
746 | syss(nosys,0), /* 278 */ | |
747 | syss(nosys,0), /* 279 */ | |
748 | syss(nosys,0), /* 280 */ | |
749 | syss(nosys,0), /* 281 */ | |
750 | syss(nosys,0), /* 282 */ | |
751 | syss(nosys,0), /* 283 */ | |
752 | syss(nosys,0), /* 284 */ | |
753 | syss(nosys,0), /* 285 */ | |
754 | syss(nosys,0), /* 286 */ | |
755 | syss(nosys,0), /* 287 */ | |
756 | syss(nosys,0), /* 288 */ | |
55e303ae A |
757 | syss(fmod_watch_enable, 1), /* 289 = fmod_watching */ |
758 | syss(fmod_watch, 4), /* 290 = fmod_watch */ | |
1c79356b A |
759 | syss(nosys,0), /* 291 */ |
760 | syss(nosys,0), /* 292 */ | |
761 | syss(nosys,0), /* 293 */ | |
762 | syss(nosys,0), /* 294 */ | |
763 | syss(nosys,0), /* 295 */ | |
9bccf70c A |
764 | syss(load_shared_file,7), /* 296 = load_shared_file */ |
765 | syss(reset_shared_file,3), /* 297 = reset_shared_file */ | |
766 | syss(new_system_shared_regions,0), /* 298 = new_system_shared_regions */ | |
1c79356b A |
767 | syss(nosys,0), /* 299 */ |
768 | syss(nosys,0), /* 300 */ | |
769 | syss(nosys,0), /* 301 */ | |
770 | syss(nosys,0), /* 302 */ | |
771 | syss(nosys,0), /* 303 */ | |
772 | syss(nosys,0), /* 304 */ | |
773 | syss(nosys,0), /* 305 */ | |
774 | syss(nosys,0), /* 306 */ | |
775 | syss(nosys,0), /* 307 */ | |
776 | syss(nosys,0), /* 308 */ | |
777 | syss(nosys,0), /* 309 */ | |
9bccf70c | 778 | syss(getsid,1), /* 310 = getsid */ |
1c79356b A |
779 | syss(nosys,0), /* 311 */ |
780 | syss(nosys,0), /* 312 */ | |
55e303ae A |
781 | sysnofnl(aio_fsync,1), /* 313 = aio_fsync */ |
782 | sysnofnl(aio_return,1), /* 314 = aio_return */ | |
783 | sysnofnl(aio_suspend,3), /* 315 = aio_suspend */ | |
784 | sysnofnl(aio_cancel,2), /* 316 = aio_cancel */ | |
785 | sysnofnl(aio_error,1), /* 317 = aio_error */ | |
786 | sysnofnl(aio_read,1), /* 318 = aio_read */ | |
787 | sysnofnl(aio_write,1), /* 319 = aio_write */ | |
788 | sysnofnl(lio_listio,4), /* 320 = lio_listio */ | |
1c79356b A |
789 | syss(nosys,0), /* 321 */ |
790 | syss(nosys,0), /* 322 */ | |
791 | syss(nosys,0), /* 323 */ | |
9bccf70c A |
792 | syss(mlockall,1), /* 324 = mlockall*/ |
793 | syss(munlockall,1), /* 325 = munlockall*/ | |
1c79356b | 794 | syss(nosys,0), /* 326 */ |
0b4e3aa0 | 795 | sysp(issetugid,0), /* 327 = issetugid */ |
9bccf70c A |
796 | syss(__pthread_kill,2), /* 328 */ |
797 | syss(pthread_sigmask,3), /* 329 */ | |
798 | syss(sigwait,2), /* 330 */ | |
799 | syss(__disable_threadsignal,1), /* 331 */ | |
1c79356b A |
800 | syss(nosys,0), /* 332 */ |
801 | syss(nosys,0), /* 333 */ | |
802 | syss(nosys,0), /* 334 */ | |
9bccf70c | 803 | syss(utrace,2), /* 335 = utrace */ |
1c79356b A |
804 | syss(nosys,0), /* 336 */ |
805 | syss(nosys,0), /* 337 */ | |
806 | syss(nosys,0), /* 338 */ | |
807 | syss(nosys,0), /* 339 */ | |
808 | syss(nosys,0), /* 340 */ | |
809 | syss(nosys,0), /* 341 */ | |
810 | syss(nosys,0), /* 342 */ | |
811 | syss(nosys,0), /* 343 */ | |
812 | syss(nosys,0), /* 344 */ | |
813 | syss(nosys,0), /* 345 */ | |
814 | syss(nosys,0), /* 346 */ | |
815 | syss(nosys,0), /* 347 */ | |
816 | syss(nosys,0), /* 348 */ | |
55e303ae A |
817 | syss(nosys,0), /* 349 */ |
818 | syss(audit,2), /* 350 */ | |
819 | syss(auditon,3), /* 351 */ | |
e5568f75 | 820 | syss(nosys,0), /* 352 */ |
55e303ae A |
821 | syss(getauid,1), /* 353 */ |
822 | syss(setauid,1), /* 354 */ | |
823 | syss(getaudit,1), /* 355 */ | |
824 | syss(setaudit,1), /* 356 */ | |
825 | syss(getaudit_addr,2), /* 357 */ | |
826 | syss(setaudit_addr,2), /* 358 */ | |
827 | syss(auditctl,1), /* 359 */ | |
828 | syss(nosys,0), /* 360 */ | |
829 | syss(nosys,0), /* 361 */ | |
830 | syss(kqueue,0), /* 362 = kqueue */ | |
831 | syss(kevent,6), /* 363 = kevent */ | |
832 | syss(nosys,0), /* 364 */ | |
833 | syss(nosys,0), /* 365 */ | |
834 | syss(nosys,0), /* 366 */ | |
835 | syss(nosys,0), /* 367 */ | |
836 | syss(nosys,0), /* 368 */ | |
837 | syss(nosys,0) /* 369 */ | |
838 | ||
839 | /* | |
840 | * N.B. | |
841 | * The argument count numbers in this table are actually | |
842 | * the number of UInt32 words that comprise the arguments | |
843 | * not the number of arguments | |
844 | * | |
845 | * This value is not currently used on PPC but Intel Darwin | |
846 | * does use it and will not work correctly if the values | |
847 | * are wrong | |
848 | */ | |
849 | ||
1c79356b A |
850 | }; |
851 | int nsysent = sizeof(sysent) / sizeof(sysent[0]); |