2 * Copyright (c) 1995-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 #include <sys/appleapiopts.h>
24 #include <sys/param.h>
25 #include <sys/systm.h>
26 #include <sys/signal.h>
27 #include <sys/mount.h>
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}
34 #define sysnofnl(fn,no) {no, 0, NO_FUNNEL, fn}
82 int load_shared_file();
83 int reset_shared_file();
84 int new_system_shared_regions();
141 int ppc_gettimeofday();
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)
235 int ogetdomainname();
236 int osetdomainname();
238 int ogetdirentries();
250 /* Calls for supporting HFS Semantics */
258 int getdirentriesattr();
260 int checkuseraccess();
265 /* end of HFS calls */
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 */
305 int fmod_watch_enable();
315 int __pthread_kill();
317 int pthread_sigmask();
318 int __disable_threadsignal();
333 int kqueue_portset_np();
334 int kqueue_from_portset_np();
348 * System call switch table.
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
357 * This value is not currently used on PPC but Intel Darwin
358 * does use it and will not work correctly if the values
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 */
382 syss(ogetfsstat
, 3), /* 18 = ogetfsstat */
384 syss(getfsstat
, 3), /* 18 = getfsstat */
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 */
408 syss(dup
,1), /* 41 = dup */
409 syss(pipe
,0), /* 42 = pipe */
410 sysp(getegid
,0), /* 43 = getegid */
411 syss(profil
,4), /* 44 = profil */
412 syss(ktrace
,4), /* 45 = ktrace */
413 syss(sigaction
,3), /* 46 = sigaction */
414 sysp(getgid
,0), /* 47 = getgid */
415 syss(sigprocmask
,3), /* 48 = sigprocmask */
416 syss(getlogin
,2), /* 49 = getlogin */
417 syss(setlogin
,1), /* 50 = setlogin */
418 syss(acct
,1), /* 51 = turn acct off/on */
419 syss(sigpending
,1), /* 52 = sigpending */
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 */
440 sysnofnl(munmap
,2), /* 73 = munmap */
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 */
451 compat(wait
,1), /* 84 = old wait */
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 */
464 sysnets(socket
,3), /* 97 = socket */
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 */
471 syss(osigreturn
,1), /* 103 = sigreturn ; compat for jaguar*/
473 syss(sigreturn
,1), /* 103 = sigreturn */
475 sysnets(bind
,3), /* 104 = bind */
476 sysnets(setsockopt
,5), /* 105 = setsockopt */
477 sysnets(listen
,2), /* 106 = listen */
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 */
483 compat(sigstack
,2), /* 112 = sigstack */
484 comaptnet(recvmsg
,3), /* 113 = recvmsg */
485 comaptnet(sendmsg
,3), /* 114 = sendmsg */
486 syss(nosys
,0), /* 115 = old vtrace */
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
494 * This value is not currently used on PPC but Intel Darwin
495 * does use it and will not work correctly if the values
500 sysnofnl(ppc_gettimeofday
,2), /* 116 = gettimeofday */
502 sysnofnl(gettimeofday
,2), /* 116 = gettimeofday */
504 sysp(getrusage
,2), /* 117 = getrusage */
505 sysnets(getsockopt
,5), /* 118 = getsockopt */
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 */
513 compat(setreuid
,2), /* 126 = setreuid */
514 compat(setregid
,2), /* 127 = setregid */
515 syss(rename
,2), /* 128 = rename */
516 compat(truncate
,2), /* 129 = old truncate */
517 compat(ftruncate
,2), /* 130 = ftruncate */
518 syss(flock
,2), /* 131 = flock */
519 syss(mkfifo
,2), /* 132 = mkfifo */
520 sysnets(sendto
,6), /* 133 = sendto */
521 sysnets(shutdown
,2), /* 134 = shutdown */
522 sysnets(socketpair
,4), /* 135 = socketpair */
523 syss(mkdir
,2), /* 136 = mkdir */
524 syss(rmdir
,1), /* 137 = rmdir */
525 syss(utimes
,2), /* 138 = utimes */
526 syss(futimes
,2), /* 139 = futimes */
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 */
538 syss(getpgid
,1), /* 151 = getpgid */
539 sysp(setprivexec
,1),/* 152 = setprivexec */
540 #ifdef DOUBLE_ALIGN_PARAMS
541 syss(pread
,6), /* 153 = pread */
542 syss(pwrite
,6), /* 154 = pwrite */
544 syss(pread
,5), /* 153 = pread */
545 syss(pwrite
,5), /* 154 = pwrite */
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 */
554 compat(getdomainname
,2), /* 162 = getdomainname */
555 compat(setdomainname
,2), /* 163 = setdomainname */
556 syss(nosys
,0), /* 164 */
558 syss(quotactl
, 4), /* 165 = quotactl */
560 syss(nosys
, 0), /* 165 = not configured */
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 */
576 sysnofnl(kdebug_trace
,6), /* 180 */
577 syss(setgid
,1), /* 181 */
578 syss(setegid
,1), /* 182 */
579 syss(seteuid
,1), /* 183 */
581 syss(sigreturn
, 2), /* 184 = nosys */
583 syss(nosys
,0), /* 184 = nosys */
585 syss(nosys
,0), /* 185 = nosys */
586 syss(nosys
,0), /* 186 = nosys */
587 syss(nosys
,0), /* 187 = nosys */
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 */
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
600 * This value is not currently used on PPC but Intel Darwin
601 * does use it and will not work correctly if the values
606 syss(getfsstat
,3), /* 193 = getfsstat */
608 syss(nosys
,0), /* 193 is unused */
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 */
616 syss(mmap
,7), /* 197 = mmap */
618 syss(nosys
,0), /* 198 = __syscall */
619 #ifdef DOUBLE_ALIGN_PARAMS
620 syss(lseek
,5), /* 199 = lseek */
622 syss(lseek
,4), /* 199 = lseek */
624 #ifdef DOUBLE_ALIGN_PARAMS
625 syss(truncate
,4), /* 200 = truncate */
626 syss(ftruncate
,4), /* 201 = ftruncate */
628 syss(truncate
,3), /* 200 = truncate */
629 syss(ftruncate
,3), /* 201 = ftruncate */
631 syss(__sysctl
,6), /* 202 = __sysctl */
632 sysp(mlock
, 2), /* 203 = mlock */
633 syss(munlock
, 2), /* 204 = munlock */
634 syss(undelete
,1), /* 205 = undelete */
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 */
644 syss(kqueue_from_portset_np
,1), /* 214 = kqueue_from_portset_np */
645 syss(kqueue_portset_np
,1), /* 215 = kqueue_portset_np */
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 */
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.
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
675 * This value is not currently used on PPC but Intel Darwin
676 * does use it and will not work correctly if the values
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 */
688 #ifdef __APPLE_API_OBSOLETE
689 syss(checkuseraccess
,6),/* 224 = HFS checkuseraccess check access to a file */
691 syss(nosys
,6),/* 224 = HFS checkuseraccess check access to a file */
692 #endif /* __APPLE_API_OBSOLETE */
693 syss(searchfs
,6), /* 225 = HFS searchfs to implement catalog searching */
694 syss(delete,1), /* 226 = private delete (Carbon semantics) */
695 syss(copyfile
,6), /* 227 = copyfile - orignally for AFP */
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 */
710 syss(fsctl
,4), /* 242 = fsctl */
711 syss(nosys
,0), /* 243 */
712 syss(nosys
,0), /* 244 */
713 syss(nosys
,0), /* 245 */
714 syss(nosys
,0), /* 246 */
715 syss(nfsclnt
,2), /* 247 = nfsclnt*/
716 syss(fhopen
,2), /* 248 = fhopen */
717 syss(nosys
,0), /* 249 */
718 syss(minherit
,3), /* 250 = minherit */
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 */
757 syss(fmod_watch_enable
, 1), /* 289 = fmod_watching */
758 syss(fmod_watch
, 4), /* 290 = fmod_watch */
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 */
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 */
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 */
778 syss(getsid
,1), /* 310 = getsid */
779 syss(nosys
,0), /* 311 */
780 syss(nosys
,0), /* 312 */
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 */
789 syss(nosys
,0), /* 321 */
790 syss(nosys
,0), /* 322 */
791 syss(nosys
,0), /* 323 */
792 syss(mlockall
,1), /* 324 = mlockall*/
793 syss(munlockall
,1), /* 325 = munlockall*/
794 syss(nosys
,0), /* 326 */
795 sysp(issetugid
,0), /* 327 = issetugid */
796 syss(__pthread_kill
,2), /* 328 */
797 syss(pthread_sigmask
,3), /* 329 */
798 syss(sigwait
,2), /* 330 */
799 syss(__disable_threadsignal
,1), /* 331 */
800 syss(nosys
,0), /* 332 */
801 syss(nosys
,0), /* 333 */
802 syss(nosys
,0), /* 334 */
803 syss(utrace
,2), /* 335 = utrace */
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 */
817 syss(nosys
,0), /* 349 */
818 syss(audit
,2), /* 350 */
819 syss(auditon
,3), /* 351 */
820 syss(nosys
,0), /* 352 */
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 */
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
845 * This value is not currently used on PPC but Intel Darwin
846 * does use it and will not work correctly if the values
851 int nsysent
= sizeof(sysent
) / sizeof(sysent
[0]);