]> git.saurik.com Git - apple/xnu.git/blame - bsd/kern/init_sysent.c
xnu-517.12.7.tar.gz
[apple/xnu.git] / bsd / kern / init_sysent.c
CommitLineData
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 */
39int nosys();
40int exit();
41int fork();
42int read();
43int write();
44int open();
45int close();
46int wait4();
47int link();
48int unlink();
49int chdir();
50int fchdir();
51int mknod();
52int chmod();
53int chown();
54int obreak();
55int getfsstat();
56#if COMPAT_GETFSSTAT
57int ogetfsstat();
58#endif
59int getpid();
60int mount();
61int unmount();
62int setuid();
63int getuid();
64int geteuid();
65int ptrace();
66int recvmsg();
67int sendmsg();
68int recvfrom();
69int accept();
70int getpeername();
71int getsockname();
72int access();
73int chflags();
74int fchflags();
75int sync();
76int kill();
77int getppid();
78int dup();
79int pipe();
80int getegid();
81int profil();
82int load_shared_file();
83int reset_shared_file();
9bccf70c 84int new_system_shared_regions();
1c79356b 85int ktrace();
1c79356b
A
86int sigaction();
87int getgid();
88int sigprocmask();
89int getlogin();
90int setlogin();
91int acct();
92int sigpending();
93int sigaltstack();
94int ioctl();
95int reboot();
96int revoke();
97int symlink();
98int readlink();
99int execve();
100int umask();
101int chroot();
102int msync();
103int vfork();
104int sbrk();
105int sstk();
106int ovadvise();
107int munmap();
108int mprotect();
109int madvise();
110int mincore();
111int getgroups();
112int setgroups();
113int getpgrp();
114int setpgid();
115int setitimer();
116int swapon();
117int getitimer();
118int getdtablesize();
119int dup2();
120int fcntl();
121int select();
122int fsync();
123int setpriority();
124int socket();
125int connect();
126int getpriority();
55e303ae
A
127#ifdef __ppc__
128int osigreturn();
129#endif
1c79356b
A
130int sigreturn();
131int bind();
132int setsockopt();
133int listen();
134int sigsuspend();
135#if TRACE
136int vtrace();
137#else
138#endif
139int gettimeofday();
9bccf70c
A
140#ifdef __ppc__
141int ppc_gettimeofday();
142#endif
1c79356b
A
143int getrusage();
144int getsockopt();
145int readv();
146int writev();
147int settimeofday();
148int fchown();
149int fchmod();
150int rename();
151int flock();
152int mkfifo();
153int sendto();
154int shutdown();
155int socketpair();
156int mkdir();
157int rmdir();
158int utimes();
9bccf70c 159int futimes();
1c79356b
A
160int adjtime();
161int setsid();
162int quotactl();
163int nfssvc();
164int statfs();
165int fstatfs();
166int getfh();
167int setgid();
168int setegid();
169int seteuid();
1c79356b
A
170int stat();
171int fstat();
172int lstat();
173int pathconf();
174int fpathconf();
175int getrlimit();
176int setrlimit();
177int getdirentries();
178int mmap();
179int nosys();
180int lseek();
181int truncate();
182int ftruncate();
183int __sysctl();
184int undelete();
185int setprivexec();
186int add_profil();
1c79356b
A
187
188int kdebug_trace();
189
190int mlock();
191int munlock();
192int minherit();
193int mlockall();
194int 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
201int ocreat();
202int olseek();
203int ostat();
204int olstat();
1c79356b
A
205int ofstat();
206int ogetkerninfo();
207int osmmap();
208int ogetpagesize();
209int ommap();
210int owait();
211int ogethostname();
212int osethostname();
213int oaccept();
214int osend();
215int orecv();
216int osigvec();
217int osigblock();
218int osigsetmask();
219int osigstack();
220int orecvmsg();
221int osendmsg();
1c79356b
A
222int orecvfrom();
223int osetreuid();
224int osetregid();
225int otruncate();
226int oftruncate();
227int ogetpeername();
228int ogethostid();
229int osethostid();
230int ogetrlimit();
231int osetrlimit();
232int okillpg();
233int oquota();
234int ogetsockname();
235int ogetdomainname();
236int osetdomainname();
237int owait3();
1c79356b 238int ogetdirentries();
1c79356b
A
239
240#if NETAT
241int ATsocket();
242int ATgetmsg();
243int ATputmsg();
244int ATPsndreq();
245int ATPsndrsp();
246int ATPgetreq();
247int ATPgetrsp();
248#endif /* NETAT */
249
250/* Calls for supporting HFS Semantics */
251
252int mkcomplex();
253int statv();
254int lstatv();
255int fstatv();
256int getattrlist();
257int setattrlist();
258int getdirentriesattr();
259int exchangedata();
260int checkuseraccess();
261int searchfs();
262int delete();
263int 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
274int watchevent();
275int waitevent();
276int modwatch();
277int fsctl();
278int semsys();
279int msgsys();
280int shmsys();
281int semctl();
282int semget();
283int semop();
284int semconfig();
285int msgctl();
286int msgget();
287int msgsnd();
288int msgrcv();
289int shmat();
290int shmctl();
291int shmdt();
292int shmget();
293int shm_open();
294int shm_unlink();
295int sem_open();
296int sem_close();
297int sem_unlink();
298int sem_wait();
299int sem_trywait();
300int sem_post();
301int sem_getvalue();
302int sem_init();
303int sem_destroy();
0b4e3aa0 304
55e303ae
A
305int fmod_watch_enable();
306int fmod_watch();
307
9bccf70c
A
308int issetugid();
309int utrace();
310int pread();
311int pwrite();
312int getsid();
313int getpgid();
314
315int __pthread_kill();
316int sigwait();
317int pthread_sigmask();
318int __disable_threadsignal();
319
55e303ae
A
320int nfsclnt();
321int fhopen();
322
323int aio_cancel();
324int aio_error();
325int aio_fsync();
326int aio_read();
327int aio_return();
328int aio_suspend();
329int aio_write();
330int lio_listio();
331
332int kqueue();
333int kqueue_portset_np();
334int kqueue_from_portset_np();
335int kevent();
336
337int audit();
338int auditon();
55e303ae
A
339int getauid();
340int setauid();
341int getaudit();
342int setaudit();
343int getaudit_addr();
344int setaudit_addr();
345int 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
362struct 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};
851int nsysent = sizeof(sysent) / sizeof(sysent[0]);