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