]> git.saurik.com Git - apple/xnu.git/blame - bsd/kern/init_sysent.c
xnu-517.3.7.tar.gz
[apple/xnu.git] / bsd / kern / init_sysent.c
CommitLineData
1c79356b 1/*
55e303ae 2 * Copyright (c) 1995-1999, 2000-2003 Apple Computer, Inc. All rights reserved.
1c79356b
A
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
43866e37 6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
1c79356b 7 *
43866e37
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,
43866e37
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 */
1c79356b 25
9bccf70c 26#include <sys/appleapiopts.h>
1c79356b
A
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}
9bccf70c
A
37#define sysnofnl(fn,no) {no, 0, NO_FUNNEL, fn}
38
1c79356b
A
39/*
40 * definitions
41 */
42int nosys();
43int exit();
44int fork();
45int read();
46int write();
47int open();
48int close();
49int wait4();
50int link();
51int unlink();
52int chdir();
53int fchdir();
54int mknod();
55int chmod();
56int chown();
57int obreak();
58int getfsstat();
59#if COMPAT_GETFSSTAT
60int ogetfsstat();
61#endif
62int getpid();
63int mount();
64int unmount();
65int setuid();
66int getuid();
67int geteuid();
68int ptrace();
69int recvmsg();
70int sendmsg();
71int recvfrom();
72int accept();
73int getpeername();
74int getsockname();
75int access();
76int chflags();
77int fchflags();
78int sync();
79int kill();
80int getppid();
81int dup();
82int pipe();
83int getegid();
84int profil();
85int load_shared_file();
86int reset_shared_file();
9bccf70c 87int new_system_shared_regions();
1c79356b 88int ktrace();
1c79356b
A
89int sigaction();
90int getgid();
91int sigprocmask();
92int getlogin();
93int setlogin();
94int acct();
95int sigpending();
96int sigaltstack();
97int ioctl();
98int reboot();
99int revoke();
100int symlink();
101int readlink();
102int execve();
103int umask();
104int chroot();
105int msync();
106int vfork();
107int sbrk();
108int sstk();
109int ovadvise();
110int munmap();
111int mprotect();
112int madvise();
113int mincore();
114int getgroups();
115int setgroups();
116int getpgrp();
117int setpgid();
118int setitimer();
119int swapon();
120int getitimer();
121int getdtablesize();
122int dup2();
123int fcntl();
124int select();
125int fsync();
126int setpriority();
127int socket();
128int connect();
129int getpriority();
55e303ae
A
130#ifdef __ppc__
131int osigreturn();
132#endif
1c79356b
A
133int sigreturn();
134int bind();
135int setsockopt();
136int listen();
137int sigsuspend();
138#if TRACE
139int vtrace();
140#else
141#endif
142int gettimeofday();
9bccf70c
A
143#ifdef __ppc__
144int ppc_gettimeofday();
145#endif
1c79356b
A
146int getrusage();
147int getsockopt();
148int readv();
149int writev();
150int settimeofday();
151int fchown();
152int fchmod();
153int rename();
154int flock();
155int mkfifo();
156int sendto();
157int shutdown();
158int socketpair();
159int mkdir();
160int rmdir();
161int utimes();
9bccf70c 162int futimes();
1c79356b
A
163int adjtime();
164int setsid();
165int quotactl();
166int nfssvc();
167int statfs();
168int fstatfs();
169int getfh();
170int setgid();
171int setegid();
172int seteuid();
1c79356b
A
173int stat();
174int fstat();
175int lstat();
176int pathconf();
177int fpathconf();
178int getrlimit();
179int setrlimit();
180int getdirentries();
181int mmap();
182int nosys();
183int lseek();
184int truncate();
185int ftruncate();
186int __sysctl();
187int undelete();
188int setprivexec();
189int add_profil();
1c79356b
A
190
191int kdebug_trace();
192
193int mlock();
194int munlock();
195int minherit();
196int mlockall();
197int 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
204int ocreat();
205int olseek();
206int ostat();
207int olstat();
1c79356b
A
208int ofstat();
209int ogetkerninfo();
210int osmmap();
211int ogetpagesize();
212int ommap();
213int owait();
214int ogethostname();
215int osethostname();
216int oaccept();
217int osend();
218int orecv();
219int osigvec();
220int osigblock();
221int osigsetmask();
222int osigstack();
223int orecvmsg();
224int osendmsg();
1c79356b
A
225int orecvfrom();
226int osetreuid();
227int osetregid();
228int otruncate();
229int oftruncate();
230int ogetpeername();
231int ogethostid();
232int osethostid();
233int ogetrlimit();
234int osetrlimit();
235int okillpg();
236int oquota();
237int ogetsockname();
238int ogetdomainname();
239int osetdomainname();
240int owait3();
1c79356b 241int ogetdirentries();
1c79356b
A
242
243#if NETAT
244int ATsocket();
245int ATgetmsg();
246int ATputmsg();
247int ATPsndreq();
248int ATPsndrsp();
249int ATPgetreq();
250int ATPgetrsp();
251#endif /* NETAT */
252
253/* Calls for supporting HFS Semantics */
254
255int mkcomplex();
256int statv();
257int lstatv();
258int fstatv();
259int getattrlist();
260int setattrlist();
261int getdirentriesattr();
262int exchangedata();
263int checkuseraccess();
264int searchfs();
265int delete();
266int copyfile();
9bccf70c 267
1c79356b
A
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
277int watchevent();
278int waitevent();
279int modwatch();
280int fsctl();
281int semsys();
282int msgsys();
283int shmsys();
284int semctl();
285int semget();
286int semop();
287int semconfig();
288int msgctl();
289int msgget();
290int msgsnd();
291int msgrcv();
292int shmat();
293int shmctl();
294int shmdt();
295int shmget();
296int shm_open();
297int shm_unlink();
298int sem_open();
299int sem_close();
300int sem_unlink();
301int sem_wait();
302int sem_trywait();
303int sem_post();
304int sem_getvalue();
305int sem_init();
306int sem_destroy();
0b4e3aa0 307
55e303ae
A
308int fmod_watch_enable();
309int fmod_watch();
310
9bccf70c
A
311int issetugid();
312int utrace();
313int pread();
314int pwrite();
315int getsid();
316int getpgid();
317
318int __pthread_kill();
319int sigwait();
320int pthread_sigmask();
321int __disable_threadsignal();
322
55e303ae
A
323int nfsclnt();
324int fhopen();
325
326int aio_cancel();
327int aio_error();
328int aio_fsync();
329int aio_read();
330int aio_return();
331int aio_suspend();
332int aio_write();
333int lio_listio();
334
335int kqueue();
336int kqueue_portset_np();
337int kqueue_from_portset_np();
338int kevent();
339
340int audit();
341int auditon();
342int auditsvc();
343int getauid();
344int setauid();
345int getaudit();
346int setaudit();
347int getaudit_addr();
348int setaudit_addr();
349int auditctl();
350
1c79356b
A
351/*
352 * System call switch table.
353 */
1c79356b 354
55e303ae
A
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
1c79356b
A
366struct 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 */
9bccf70c 412 syss(dup,1), /* 41 = dup */
1c79356b
A
413 syss(pipe,0), /* 42 = pipe */
414 sysp(getegid,0), /* 43 = getegid */
415 syss(profil,4), /* 44 = profil */
1c79356b 416 syss(ktrace,4), /* 45 = ktrace */
1c79356b
A
417 syss(sigaction,3), /* 46 = sigaction */
418 sysp(getgid,0), /* 47 = getgid */
9bccf70c 419 syss(sigprocmask,3), /* 48 = sigprocmask */
1c79356b
A
420 syss(getlogin,2), /* 49 = getlogin */
421 syss(setlogin,1), /* 50 = setlogin */
422 syss(acct,1), /* 51 = turn acct off/on */
9bccf70c 423 syss(sigpending,1), /* 52 = sigpending */
1c79356b
A
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 */
55e303ae 444 sysnofnl(munmap,2), /* 73 = munmap */
1c79356b
A
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 */
55e303ae 455 compat(wait,1), /* 84 = old wait */
1c79356b
A
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 */
9bccf70c 468 sysnets(socket,3), /* 97 = socket */
1c79356b
A
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 */
55e303ae
A
474#ifdef __ppc__
475 syss(osigreturn,1), /* 103 = sigreturn ; compat for jaguar*/
476#else
477 syss(sigreturn,1), /* 103 = sigreturn */
478#endif
9bccf70c
A
479 sysnets(bind,3), /* 104 = bind */
480 sysnets(setsockopt,5), /* 105 = setsockopt */
481 sysnets(listen,2), /* 106 = listen */
1c79356b
A
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 */
9bccf70c 487 compat(sigstack,2), /* 112 = sigstack */
1c79356b
A
488 comaptnet(recvmsg,3), /* 113 = recvmsg */
489 comaptnet(sendmsg,3), /* 114 = sendmsg */
490 syss(nosys,0), /* 115 = old vtrace */
55e303ae
A
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
9bccf70c
A
503#ifdef __ppc__
504 sysnofnl(ppc_gettimeofday,2), /* 116 = gettimeofday */
505#else
506 sysnofnl(gettimeofday,2), /* 116 = gettimeofday */
507#endif
1c79356b 508 sysp(getrusage,2), /* 117 = getrusage */
9bccf70c 509 sysnets(getsockopt,5), /* 118 = getsockopt */
1c79356b
A
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 */
9bccf70c
A
517 compat(setreuid,2), /* 126 = setreuid */
518 compat(setregid,2), /* 127 = setregid */
1c79356b 519 syss(rename,2), /* 128 = rename */
9bccf70c 520 compat(truncate,2), /* 129 = old truncate */
1c79356b
A
521 compat(ftruncate,2), /* 130 = ftruncate */
522 syss(flock,2), /* 131 = flock */
9bccf70c 523 syss(mkfifo,2), /* 132 = mkfifo */
1c79356b 524 sysnets(sendto,6), /* 133 = sendto */
9bccf70c
A
525 sysnets(shutdown,2), /* 134 = shutdown */
526 sysnets(socketpair,4), /* 135 = socketpair */
1c79356b
A
527 syss(mkdir,2), /* 136 = mkdir */
528 syss(rmdir,1), /* 137 = rmdir */
529 syss(utimes,2), /* 138 = utimes */
9bccf70c 530 syss(futimes,2), /* 139 = futimes */
1c79356b
A
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 */
9bccf70c 542 syss(getpgid,1), /* 151 = getpgid */
1c79356b 543 sysp(setprivexec,1),/* 152 = setprivexec */
9bccf70c 544#ifdef DOUBLE_ALIGN_PARAMS
55e303ae
A
545 syss(pread,6), /* 153 = pread */
546 syss(pwrite,6), /* 154 = pwrite */
547#else
9bccf70c
A
548 syss(pread,5), /* 153 = pread */
549 syss(pwrite,5), /* 154 = pwrite */
9bccf70c 550#endif
1c79356b
A
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 */
1c79356b
A
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 */
55e303ae 563#else /* QUOTA */
1c79356b
A
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 */
55e303ae 580 sysnofnl(kdebug_trace,6), /* 180 */
1c79356b
A
581 syss(setgid,1), /* 181 */
582 syss(setegid,1), /* 182 */
9bccf70c 583 syss(seteuid,1), /* 183 */
55e303ae
A
584#ifdef __ppc__
585 syss(sigreturn, 2), /* 184 = nosys */
586#else
1c79356b 587 syss(nosys,0), /* 184 = nosys */
55e303ae 588#endif
1c79356b
A
589 syss(nosys,0), /* 185 = nosys */
590 syss(nosys,0), /* 186 = nosys */
591 syss(nosys,0), /* 187 = nosys */
1c79356b
A
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 */
55e303ae
A
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
1c79356b 609#if COMPAT_GETFSSTAT
9bccf70c 610 syss(getfsstat,3), /* 193 = getfsstat */
1c79356b
A
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 */
9bccf70c 623#ifdef DOUBLE_ALIGN_PARAMS
1c79356b 624 syss(lseek,5), /* 199 = lseek */
9bccf70c
A
625#else
626 syss(lseek,4), /* 199 = lseek */
627#endif
628#ifdef DOUBLE_ALIGN_PARAMS
1c79356b
A
629 syss(truncate,4), /* 200 = truncate */
630 syss(ftruncate,4), /* 201 = ftruncate */
9bccf70c
A
631#else
632 syss(truncate,3), /* 200 = truncate */
633 syss(ftruncate,3), /* 201 = ftruncate */
634#endif
1c79356b
A
635 syss(__sysctl,6), /* 202 = __sysctl */
636 sysp(mlock, 2), /* 203 = mlock */
637 syss(munlock, 2), /* 204 = munlock */
1c79356b 638 syss(undelete,1), /* 205 = undelete */
9bccf70c
A
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 */
55e303ae
A
648 syss(kqueue_from_portset_np,1), /* 214 = kqueue_from_portset_np */
649 syss(kqueue_portset_np,1), /* 215 = kqueue_portset_np */
1c79356b 650#else
1c79356b
A
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 */
55e303ae
A
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
1c79356b
A
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 */
9bccf70c 692#ifdef __APPLE_API_OBSOLETE
1c79356b 693 syss(checkuseraccess,6),/* 224 = HFS checkuseraccess check access to a file */
9bccf70c
A
694#else
695 syss(nosys,6),/* 224 = HFS checkuseraccess check access to a file */
696#endif /* __APPLE_API_OBSOLETE */
1c79356b 697 syss(searchfs,6), /* 225 = HFS searchfs to implement catalog searching */
9bccf70c 698 syss(delete,1), /* 226 = private delete (Carbon semantics) */
55e303ae 699 syss(copyfile,6), /* 227 = copyfile - orignally for AFP */
1c79356b
A
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 */
9bccf70c 714 syss(fsctl,4), /* 242 = fsctl */
1c79356b
A
715 syss(nosys,0), /* 243 */
716 syss(nosys,0), /* 244 */
717 syss(nosys,0), /* 245 */
718 syss(nosys,0), /* 246 */
55e303ae
A
719 syss(nfsclnt,2), /* 247 = nfsclnt*/
720 syss(fhopen,2), /* 248 = fhopen */
1c79356b 721 syss(nosys,0), /* 249 */
9bccf70c 722 syss(minherit,3), /* 250 = minherit */
1c79356b
A
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 */
55e303ae
A
761 syss(fmod_watch_enable, 1), /* 289 = fmod_watching */
762 syss(fmod_watch, 4), /* 290 = fmod_watch */
1c79356b
A
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 */
9bccf70c
A
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 */
1c79356b
A
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 */
9bccf70c 782 syss(getsid,1), /* 310 = getsid */
1c79356b
A
783 syss(nosys,0), /* 311 */
784 syss(nosys,0), /* 312 */
55e303ae
A
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 */
1c79356b
A
793 syss(nosys,0), /* 321 */
794 syss(nosys,0), /* 322 */
795 syss(nosys,0), /* 323 */
9bccf70c
A
796 syss(mlockall,1), /* 324 = mlockall*/
797 syss(munlockall,1), /* 325 = munlockall*/
1c79356b 798 syss(nosys,0), /* 326 */
0b4e3aa0 799 sysp(issetugid,0), /* 327 = issetugid */
9bccf70c
A
800 syss(__pthread_kill,2), /* 328 */
801 syss(pthread_sigmask,3), /* 329 */
802 syss(sigwait,2), /* 330 */
803 syss(__disable_threadsignal,1), /* 331 */
1c79356b
A
804 syss(nosys,0), /* 332 */
805 syss(nosys,0), /* 333 */
806 syss(nosys,0), /* 334 */
9bccf70c 807 syss(utrace,2), /* 335 = utrace */
1c79356b
A
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 */
55e303ae
A
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
1c79356b
A
854};
855int nsysent = sizeof(sysent) / sizeof(sysent[0]);