10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 51676Sjpk * Common Development and Distribution License (the "License"). 61676Sjpk * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 212248Sraf 220Sstevel@tonic-gate /* ONC_PLUS EXTRACT START */ 230Sstevel@tonic-gate /* 24*11798SRoger.Faulkner@Sun.COM * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 250Sstevel@tonic-gate * Use is subject to license terms. 260Sstevel@tonic-gate */ 270Sstevel@tonic-gate 280Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 290Sstevel@tonic-gate /* All Rights Reserved */ 300Sstevel@tonic-gate 310Sstevel@tonic-gate /* ONC_PLUS EXTRACT END */ 320Sstevel@tonic-gate 330Sstevel@tonic-gate #include <sys/param.h> 340Sstevel@tonic-gate #include <sys/types.h> 350Sstevel@tonic-gate #include <sys/systm.h> 360Sstevel@tonic-gate #include <sys/systrace.h> 370Sstevel@tonic-gate #include <sys/procfs.h> 380Sstevel@tonic-gate 390Sstevel@tonic-gate /* ONC_PLUS EXTRACT START */ 400Sstevel@tonic-gate /* 410Sstevel@tonic-gate * This table is the switch used to transfer to the appropriate 420Sstevel@tonic-gate * routine for processing a system call. Each row contains the 430Sstevel@tonic-gate * number of arguments expected, a switch that tells systrap() 440Sstevel@tonic-gate * in trap.c whether a setjmp() is not necessary, and a pointer 450Sstevel@tonic-gate * to the routine. 460Sstevel@tonic-gate */ 470Sstevel@tonic-gate /* ONC_PLUS EXTRACT END */ 480Sstevel@tonic-gate 490Sstevel@tonic-gate int access(); 500Sstevel@tonic-gate int alarm(); 510Sstevel@tonic-gate int auditsys(); 522712Snn35248 int64_t brandsys(); 530Sstevel@tonic-gate int brk(); 540Sstevel@tonic-gate int chdir(); 550Sstevel@tonic-gate int chmod(); 560Sstevel@tonic-gate int chown(); 570Sstevel@tonic-gate int chroot(); 580Sstevel@tonic-gate int cladm(); 590Sstevel@tonic-gate int close(); 600Sstevel@tonic-gate int exece(); 61*11798SRoger.Faulkner@Sun.COM int faccessat(); 62*11798SRoger.Faulkner@Sun.COM int fchownat(); 630Sstevel@tonic-gate int fcntl(); 643235Sraf int64_t vfork(); 653235Sraf int64_t forksys(); 660Sstevel@tonic-gate int fstat(); 670Sstevel@tonic-gate int fdsync(); 680Sstevel@tonic-gate int64_t getgid(); 690Sstevel@tonic-gate int ucredsys(); 700Sstevel@tonic-gate int64_t getpid(); 710Sstevel@tonic-gate int64_t getuid(); 720Sstevel@tonic-gate time_t gtime(); 730Sstevel@tonic-gate int getloadavg(); 740Sstevel@tonic-gate int rusagesys(); 750Sstevel@tonic-gate int getpagesizes(); 760Sstevel@tonic-gate int gtty(); 770Sstevel@tonic-gate #if defined(__i386) || defined(__amd64) 780Sstevel@tonic-gate int hrtsys(); 790Sstevel@tonic-gate #endif /* __i386 || __amd64 */ 800Sstevel@tonic-gate int ioctl(); 810Sstevel@tonic-gate int kill(); 821676Sjpk int labelsys(); 830Sstevel@tonic-gate int link(); 840Sstevel@tonic-gate off32_t lseek32(); 850Sstevel@tonic-gate off_t lseek64(); 860Sstevel@tonic-gate int lgrpsys(); 878212SMichael.Corcoran@Sun.COM int mmapobjsys(); 880Sstevel@tonic-gate int mknod(); 890Sstevel@tonic-gate int mount(); 900Sstevel@tonic-gate int nice(); 910Sstevel@tonic-gate int nullsys(); 920Sstevel@tonic-gate int open(); 93*11798SRoger.Faulkner@Sun.COM int openat(); 940Sstevel@tonic-gate int pause(); 950Sstevel@tonic-gate long pcsample(); 960Sstevel@tonic-gate int privsys(); 970Sstevel@tonic-gate int profil(); 980Sstevel@tonic-gate ssize_t pread(); 990Sstevel@tonic-gate ssize_t pwrite(); 1000Sstevel@tonic-gate ssize_t read(); 1010Sstevel@tonic-gate int rename(); 102*11798SRoger.Faulkner@Sun.COM int renameat(); 1030Sstevel@tonic-gate void rexit(); 1040Sstevel@tonic-gate int semsys(); 1050Sstevel@tonic-gate int setgid(); 1060Sstevel@tonic-gate int setpgrp(); 1070Sstevel@tonic-gate int setuid(); 1080Sstevel@tonic-gate uintptr_t shmsys(); 1094321Scasper uint64_t sidsys(); 1100Sstevel@tonic-gate int sigprocmask(); 1110Sstevel@tonic-gate int sigsuspend(); 1120Sstevel@tonic-gate int sigaltstack(); 1130Sstevel@tonic-gate int sigaction(); 1140Sstevel@tonic-gate int sigpending(); 1154806Sraf int sigresend(); 1160Sstevel@tonic-gate int sigtimedwait(); 1170Sstevel@tonic-gate int getsetcontext(); 1180Sstevel@tonic-gate int stat(); 119*11798SRoger.Faulkner@Sun.COM int fstatat(); 1200Sstevel@tonic-gate int stime(); 1210Sstevel@tonic-gate int stty(); 1220Sstevel@tonic-gate int syssync(); 1230Sstevel@tonic-gate int sysacct(); 1240Sstevel@tonic-gate clock_t times(); 1250Sstevel@tonic-gate long ulimit(); 1260Sstevel@tonic-gate int getrlimit32(); 1270Sstevel@tonic-gate int setrlimit32(); 1280Sstevel@tonic-gate int umask(); 1290Sstevel@tonic-gate int umount2(); 1300Sstevel@tonic-gate int unlink(); 131*11798SRoger.Faulkner@Sun.COM int unlinkat(); 13210440SRoger.Faulkner@Sun.COM int utimesys(); 1330Sstevel@tonic-gate int64_t utssys32(); 1340Sstevel@tonic-gate int64_t utssys64(); 1352712Snn35248 int uucopy(); 1362712Snn35248 ssize_t uucopystr(); 1370Sstevel@tonic-gate ssize_t write(); 1380Sstevel@tonic-gate ssize_t readv(); 1390Sstevel@tonic-gate ssize_t writev(); 1400Sstevel@tonic-gate int syslwp_park(); 1410Sstevel@tonic-gate int rmdir(); 1420Sstevel@tonic-gate int mkdir(); 1430Sstevel@tonic-gate int getdents32(); 1440Sstevel@tonic-gate int statfs32(); 1450Sstevel@tonic-gate int fstatfs32(); 1460Sstevel@tonic-gate int sysfs(); 1470Sstevel@tonic-gate int getmsg(); 1480Sstevel@tonic-gate int pollsys(); 1490Sstevel@tonic-gate int putmsg(); 1500Sstevel@tonic-gate int uadmin(); 1510Sstevel@tonic-gate int lstat(); 1520Sstevel@tonic-gate int symlink(); 1530Sstevel@tonic-gate ssize_t readlink(); 1540Sstevel@tonic-gate int resolvepath(); 1550Sstevel@tonic-gate int setgroups(); 1560Sstevel@tonic-gate int getgroups(); 1570Sstevel@tonic-gate int fchdir(); 1580Sstevel@tonic-gate int fchown(); 1590Sstevel@tonic-gate int fchmod(); 1600Sstevel@tonic-gate int getcwd(); 1610Sstevel@tonic-gate int statvfs(); 1620Sstevel@tonic-gate int fstatvfs(); 1630Sstevel@tonic-gate offset_t llseek32(); 1640Sstevel@tonic-gate 1650Sstevel@tonic-gate #if (defined(__i386) && !defined(__amd64)) || defined(__i386_COMPAT) 1660Sstevel@tonic-gate int sysi86(); 1670Sstevel@tonic-gate #endif 1680Sstevel@tonic-gate 1690Sstevel@tonic-gate int acl(); 1700Sstevel@tonic-gate int facl(); 1710Sstevel@tonic-gate long priocntlsys(); 1720Sstevel@tonic-gate int waitsys(); 1730Sstevel@tonic-gate int sigsendsys(); 1740Sstevel@tonic-gate int mincore(); 1750Sstevel@tonic-gate caddr_t smmap64(); 1760Sstevel@tonic-gate caddr_t smmap32(); 1770Sstevel@tonic-gate int smmaplf32(); 1780Sstevel@tonic-gate int mprotect(); 1790Sstevel@tonic-gate int munmap(); 1800Sstevel@tonic-gate int uname(); 1810Sstevel@tonic-gate int lchown(); 1820Sstevel@tonic-gate int getpmsg(); 1830Sstevel@tonic-gate int putpmsg(); 1840Sstevel@tonic-gate int memcntl(); 1850Sstevel@tonic-gate long sysconfig(); 1860Sstevel@tonic-gate int adjtime(); 1870Sstevel@tonic-gate long systeminfo(); 1880Sstevel@tonic-gate int setegid(); 1890Sstevel@tonic-gate int seteuid(); 1900Sstevel@tonic-gate 1910Sstevel@tonic-gate int setreuid(); 1920Sstevel@tonic-gate int setregid(); 1930Sstevel@tonic-gate int install_utrap(); 1940Sstevel@tonic-gate #ifdef __sparc 1950Sstevel@tonic-gate int sparc_utrap_install(); 1960Sstevel@tonic-gate #endif 1970Sstevel@tonic-gate 1980Sstevel@tonic-gate int syslwp_create(); 1990Sstevel@tonic-gate void syslwp_exit(); 2000Sstevel@tonic-gate int syslwp_suspend(); 2010Sstevel@tonic-gate int syslwp_continue(); 2020Sstevel@tonic-gate int syslwp_private(); 2030Sstevel@tonic-gate int lwp_detach(); 2040Sstevel@tonic-gate int lwp_info(); 2050Sstevel@tonic-gate int lwp_kill(); 2060Sstevel@tonic-gate int lwp_self(); 2070Sstevel@tonic-gate int64_t lwp_sigmask(); 2080Sstevel@tonic-gate int yield(); 2090Sstevel@tonic-gate int lwp_wait(); 2100Sstevel@tonic-gate int lwp_mutex_timedlock(); 2110Sstevel@tonic-gate int lwp_mutex_wakeup(); 2120Sstevel@tonic-gate int lwp_mutex_unlock(); 2130Sstevel@tonic-gate int lwp_mutex_trylock(); 2144574Sraf int lwp_mutex_register(); 2150Sstevel@tonic-gate int lwp_rwlock_sys(); 2160Sstevel@tonic-gate int lwp_sema_post(); 2170Sstevel@tonic-gate int lwp_sema_timedwait(); 2180Sstevel@tonic-gate int lwp_sema_trywait(); 2190Sstevel@tonic-gate int lwp_cond_wait(); 2200Sstevel@tonic-gate int lwp_cond_signal(); 2210Sstevel@tonic-gate int lwp_cond_broadcast(); 2220Sstevel@tonic-gate caddr_t schedctl(); 2230Sstevel@tonic-gate 2240Sstevel@tonic-gate long pathconf(); 2250Sstevel@tonic-gate long fpathconf(); 2260Sstevel@tonic-gate int processor_bind(); 2270Sstevel@tonic-gate int processor_info(); 2280Sstevel@tonic-gate int p_online(); 2290Sstevel@tonic-gate 2300Sstevel@tonic-gate /* 2310Sstevel@tonic-gate * POSIX .4 system calls * 2320Sstevel@tonic-gate */ 2330Sstevel@tonic-gate int clock_gettime(); 2340Sstevel@tonic-gate int clock_settime(); 2350Sstevel@tonic-gate int clock_getres(); 2360Sstevel@tonic-gate int timer_create(); 2370Sstevel@tonic-gate int timer_delete(); 2380Sstevel@tonic-gate int timer_settime(); 2390Sstevel@tonic-gate int timer_gettime(); 2400Sstevel@tonic-gate int timer_getoverrun(); 2410Sstevel@tonic-gate int nanosleep(); 2420Sstevel@tonic-gate int sigqueue(); 2430Sstevel@tonic-gate int signotify(); 2440Sstevel@tonic-gate 2450Sstevel@tonic-gate int getdents64(); 2460Sstevel@tonic-gate int stat64(); 2470Sstevel@tonic-gate int lstat64(); 2480Sstevel@tonic-gate int fstatat64(); 2490Sstevel@tonic-gate int fstat64(); 2500Sstevel@tonic-gate int statvfs64(); 2510Sstevel@tonic-gate int fstatvfs64(); 2520Sstevel@tonic-gate int setrlimit64(); 2530Sstevel@tonic-gate int getrlimit64(); 2540Sstevel@tonic-gate int pread64(); 2550Sstevel@tonic-gate int pwrite64(); 2560Sstevel@tonic-gate int open64(); 257*11798SRoger.Faulkner@Sun.COM int openat64(); 2580Sstevel@tonic-gate 2590Sstevel@tonic-gate /* 2600Sstevel@tonic-gate * NTP syscalls 2610Sstevel@tonic-gate */ 2620Sstevel@tonic-gate 2630Sstevel@tonic-gate int ntp_gettime(); 2640Sstevel@tonic-gate int ntp_adjtime(); 2650Sstevel@tonic-gate 2660Sstevel@tonic-gate /* 2670Sstevel@tonic-gate * ++++++++++++++++++++++++ 2680Sstevel@tonic-gate * ++ SunOS4.1 Buyback ++ 2690Sstevel@tonic-gate * ++++++++++++++++++++++++ 2700Sstevel@tonic-gate * 271*11798SRoger.Faulkner@Sun.COM * fchroot, vhangup, gettimeofday 2720Sstevel@tonic-gate */ 2730Sstevel@tonic-gate 2740Sstevel@tonic-gate int fchroot(); 2750Sstevel@tonic-gate int vhangup(); 2760Sstevel@tonic-gate int gettimeofday(); 2770Sstevel@tonic-gate int getitimer(); 2780Sstevel@tonic-gate int setitimer(); 2790Sstevel@tonic-gate 2800Sstevel@tonic-gate int corectl(); 2810Sstevel@tonic-gate int modctl(); 2820Sstevel@tonic-gate int64_t loadable_syscall(); 2830Sstevel@tonic-gate int64_t indir(); 2840Sstevel@tonic-gate 2850Sstevel@tonic-gate long tasksys(); 2860Sstevel@tonic-gate long rctlsys(); 2870Sstevel@tonic-gate 2880Sstevel@tonic-gate long zone(); 2890Sstevel@tonic-gate 2900Sstevel@tonic-gate int so_socket(); 2910Sstevel@tonic-gate int so_socketpair(); 2920Sstevel@tonic-gate int bind(); 2930Sstevel@tonic-gate int listen(); 2940Sstevel@tonic-gate int accept(); 2950Sstevel@tonic-gate int connect(); 2960Sstevel@tonic-gate int shutdown(); 2970Sstevel@tonic-gate ssize_t recv(); 2980Sstevel@tonic-gate ssize_t recvfrom(); 2990Sstevel@tonic-gate ssize_t recvmsg(); 3000Sstevel@tonic-gate ssize_t send(); 3010Sstevel@tonic-gate ssize_t sendmsg(); 3020Sstevel@tonic-gate ssize_t sendto(); 3030Sstevel@tonic-gate int getpeername(); 3040Sstevel@tonic-gate int getsockname(); 3050Sstevel@tonic-gate int getsockopt(); 3060Sstevel@tonic-gate int setsockopt(); 3070Sstevel@tonic-gate int sockconfig(); 3080Sstevel@tonic-gate ssize_t sendfilev(); 3090Sstevel@tonic-gate 3100Sstevel@tonic-gate typedef int64_t (*llfcn_t)(); /* for casting one-word returns */ 3110Sstevel@tonic-gate 3120Sstevel@tonic-gate /* 3130Sstevel@tonic-gate * Sysent initialization macros. 3140Sstevel@tonic-gate * These take the name string of the system call even though that isn't 3150Sstevel@tonic-gate * currently used in the sysent entry. This might be useful someday. 3160Sstevel@tonic-gate * 3170Sstevel@tonic-gate * Initialization macro for system calls which take their args in the C style. 3180Sstevel@tonic-gate * These system calls return the longlong_t return value and must call 3190Sstevel@tonic-gate * set_errno() to return an error. For SPARC, narg must be at most six. 3200Sstevel@tonic-gate * For more args, use the SYSENT_AP() routine. 3210Sstevel@tonic-gate * 3220Sstevel@tonic-gate * We are able to return two distinct values to userland via the rval_t. 3230Sstevel@tonic-gate * At this time, that corresponds to one 64-bit quantity, or two 32-bit 3240Sstevel@tonic-gate * quantities. The kernel does not currently need to return two 64-bit 3250Sstevel@tonic-gate * values, or one 128 bit value(!), but we may do one day, so the calling 3260Sstevel@tonic-gate * sequence between userland and the kernel should permit it. 3270Sstevel@tonic-gate * 3280Sstevel@tonic-gate * The interpretation of rval_t is provided by the sy_flags field 3290Sstevel@tonic-gate * which is used to determine how to arrange the results in registers 3300Sstevel@tonic-gate * (or on the stack) for return userland. 3310Sstevel@tonic-gate */ 3320Sstevel@tonic-gate /* returns a 64-bit quantity for both ABIs */ 3330Sstevel@tonic-gate #define SYSENT_C(name, call, narg) \ 3340Sstevel@tonic-gate { (narg), SE_64RVAL, NULL, NULL, (llfcn_t)(call) } 3350Sstevel@tonic-gate 3360Sstevel@tonic-gate /* returns one 32-bit value for both ABIs: r_val1 */ 3370Sstevel@tonic-gate #define SYSENT_CI(name, call, narg) \ 3380Sstevel@tonic-gate { (narg), SE_32RVAL1, NULL, NULL, (llfcn_t)(call) } 3390Sstevel@tonic-gate 3400Sstevel@tonic-gate /* returns 2 32-bit values: r_val1 & r_val2 */ 3410Sstevel@tonic-gate #define SYSENT_2CI(name, call, narg) \ 3420Sstevel@tonic-gate { (narg), SE_32RVAL1|SE_32RVAL2, NULL, NULL, (llfcn_t)(call) } 3430Sstevel@tonic-gate 3440Sstevel@tonic-gate /* 3450Sstevel@tonic-gate * Initialization macro for system calls which take their args in the standard 3460Sstevel@tonic-gate * Unix style of a pointer to the arg structure and a pointer to the rval_t. 3470Sstevel@tonic-gate * 3480Sstevel@tonic-gate * Deprecated wherever possible (slower on some architectures, and trickier 3490Sstevel@tonic-gate * to maintain two flavours). 3500Sstevel@tonic-gate */ 3510Sstevel@tonic-gate #define SYSENT_AP(name, call, narg) \ 3520Sstevel@tonic-gate { (narg), SE_64RVAL, (call), NULL, syscall_ap } 3530Sstevel@tonic-gate 3540Sstevel@tonic-gate /* 3550Sstevel@tonic-gate * Conditional constructors to build the tables without #ifdef clutter 3560Sstevel@tonic-gate */ 3570Sstevel@tonic-gate #if defined(_LP64) 3580Sstevel@tonic-gate #define IF_LP64(true, false) true 3590Sstevel@tonic-gate #else 3600Sstevel@tonic-gate #define IF_LP64(true, false) false 3610Sstevel@tonic-gate #endif 3620Sstevel@tonic-gate 3630Sstevel@tonic-gate #if defined(__sparc) 3640Sstevel@tonic-gate #define IF_sparc(true, false) true 3650Sstevel@tonic-gate #else 3660Sstevel@tonic-gate #define IF_sparc(true, false) false 3670Sstevel@tonic-gate #endif 3680Sstevel@tonic-gate 3690Sstevel@tonic-gate #if defined(__i386) && !defined(__amd64) 3700Sstevel@tonic-gate #define IF_i386(true, false) true 3710Sstevel@tonic-gate #else 3720Sstevel@tonic-gate #define IF_i386(true, false) false 3730Sstevel@tonic-gate #endif 3740Sstevel@tonic-gate 375641Skalai #if defined(__i386) || defined(__amd64) 3760Sstevel@tonic-gate #define IF_x86(true, false) true 3770Sstevel@tonic-gate #else 3780Sstevel@tonic-gate #define IF_x86(true, false) false 3790Sstevel@tonic-gate #endif 3800Sstevel@tonic-gate 3810Sstevel@tonic-gate #if (defined(__i386) && !defined(__amd64)) || defined(__i386_COMPAT) 3820Sstevel@tonic-gate #define IF_386_ABI(true, false) true 3830Sstevel@tonic-gate #else 3840Sstevel@tonic-gate #define IF_386_ABI(true, false) false 3850Sstevel@tonic-gate #endif 3860Sstevel@tonic-gate 3870Sstevel@tonic-gate /* 3880Sstevel@tonic-gate * Define system calls that return a native 'long' quantity i.e. a 32-bit 3890Sstevel@tonic-gate * or 64-bit integer - depending on how the kernel is itself compiled 3900Sstevel@tonic-gate * e.g. read(2) returns 'ssize_t' in the kernel and in userland. 3910Sstevel@tonic-gate */ 3920Sstevel@tonic-gate #define SYSENT_CL(name, call, narg) \ 3930Sstevel@tonic-gate IF_LP64(SYSENT_C(name, call, narg), SYSENT_CI(name, call, narg)) 3940Sstevel@tonic-gate 3950Sstevel@tonic-gate /* 3960Sstevel@tonic-gate * Initialization macro for loadable native system calls. 3970Sstevel@tonic-gate */ 3980Sstevel@tonic-gate #define SYSENT_LOADABLE() \ 3990Sstevel@tonic-gate { 0, SE_LOADABLE, (int (*)())nosys, NULL, loadable_syscall } 4000Sstevel@tonic-gate /* ONC_PLUS EXTRACT END */ 4010Sstevel@tonic-gate 4020Sstevel@tonic-gate /* 4030Sstevel@tonic-gate * Initialization macro for loadable 32-bit compatibility system calls. 4040Sstevel@tonic-gate */ 4050Sstevel@tonic-gate #define SYSENT_LOADABLE32() SYSENT_LOADABLE() 4060Sstevel@tonic-gate 4070Sstevel@tonic-gate #define SYSENT_NOSYS() SYSENT_C("nosys", nosys, 0) 4080Sstevel@tonic-gate 4090Sstevel@tonic-gate struct sysent nosys_ent = SYSENT_NOSYS(); 4100Sstevel@tonic-gate 4110Sstevel@tonic-gate /* ONC_PLUS EXTRACT START */ 4120Sstevel@tonic-gate /* 4130Sstevel@tonic-gate * Native sysent table. 4140Sstevel@tonic-gate */ 4150Sstevel@tonic-gate struct sysent sysent[NSYSCALL] = 4160Sstevel@tonic-gate { 4170Sstevel@tonic-gate /* ONC_PLUS EXTRACT END */ 4180Sstevel@tonic-gate /* 0 */ IF_LP64( 4190Sstevel@tonic-gate SYSENT_NOSYS(), 4200Sstevel@tonic-gate SYSENT_C("indir", indir, 1)), 4210Sstevel@tonic-gate /* 1 */ SYSENT_CI("exit", rexit, 1), 422*11798SRoger.Faulkner@Sun.COM /* 2 */ SYSENT_LOADABLE(), /* (was forkall) */ 4230Sstevel@tonic-gate /* 3 */ SYSENT_CL("read", read, 3), 4240Sstevel@tonic-gate /* 4 */ SYSENT_CL("write", write, 3), 4250Sstevel@tonic-gate /* 5 */ SYSENT_CI("open", open, 3), 4260Sstevel@tonic-gate /* 6 */ SYSENT_CI("close", close, 1), 427*11798SRoger.Faulkner@Sun.COM /* 7 */ SYSENT_LOADABLE(), /* (was wait) */ 428*11798SRoger.Faulkner@Sun.COM /* 8 */ SYSENT_LOADABLE(), /* (was creat) */ 4290Sstevel@tonic-gate /* 9 */ SYSENT_CI("link", link, 2), 4300Sstevel@tonic-gate /* 10 */ SYSENT_CI("unlink", unlink, 1), 431*11798SRoger.Faulkner@Sun.COM /* 11 */ SYSENT_LOADABLE(), /* (was exec) */ 4320Sstevel@tonic-gate /* 12 */ SYSENT_CI("chdir", chdir, 1), 4330Sstevel@tonic-gate /* 13 */ SYSENT_CL("time", gtime, 0), 4340Sstevel@tonic-gate /* 14 */ SYSENT_CI("mknod", mknod, 3), 4350Sstevel@tonic-gate /* 15 */ SYSENT_CI("chmod", chmod, 2), 4360Sstevel@tonic-gate /* 16 */ SYSENT_CI("chown", chown, 3), 4370Sstevel@tonic-gate /* 17 */ SYSENT_CI("brk", brk, 1), 4380Sstevel@tonic-gate /* 18 */ SYSENT_CI("stat", stat, 2), 4390Sstevel@tonic-gate /* 19 */ IF_LP64( 4400Sstevel@tonic-gate SYSENT_CL("lseek", lseek64, 3), 4410Sstevel@tonic-gate SYSENT_CL("lseek", lseek32, 3)), 4420Sstevel@tonic-gate /* 20 */ SYSENT_2CI("getpid", getpid, 0), 4430Sstevel@tonic-gate /* 21 */ SYSENT_AP("mount", mount, 8), 444*11798SRoger.Faulkner@Sun.COM /* 22 */ SYSENT_LOADABLE(), /* (was umount) */ 4450Sstevel@tonic-gate /* 23 */ SYSENT_CI("setuid", setuid, 1), 4460Sstevel@tonic-gate /* 24 */ SYSENT_2CI("getuid", getuid, 0), 4470Sstevel@tonic-gate /* 25 */ SYSENT_CI("stime", stime, 1), 4480Sstevel@tonic-gate /* 26 */ SYSENT_CL("pcsample", pcsample, 2), 4490Sstevel@tonic-gate /* 27 */ SYSENT_CI("alarm", alarm, 1), 4500Sstevel@tonic-gate /* 28 */ SYSENT_CI("fstat", fstat, 2), 4510Sstevel@tonic-gate /* 29 */ SYSENT_CI("pause", pause, 0), 452*11798SRoger.Faulkner@Sun.COM /* 30 */ SYSENT_LOADABLE(), /* (was utime) */ 4530Sstevel@tonic-gate /* 31 */ SYSENT_CI("stty", stty, 2), 4540Sstevel@tonic-gate /* 32 */ SYSENT_CI("gtty", gtty, 2), 4550Sstevel@tonic-gate /* 33 */ SYSENT_CI("access", access, 2), 4560Sstevel@tonic-gate /* 34 */ SYSENT_CI("nice", nice, 1), 4570Sstevel@tonic-gate /* 35 */ IF_LP64( 4580Sstevel@tonic-gate SYSENT_NOSYS(), 4590Sstevel@tonic-gate SYSENT_CI("statfs", statfs32, 4)), 4600Sstevel@tonic-gate /* 36 */ SYSENT_CI("sync", syssync, 0), 4610Sstevel@tonic-gate /* 37 */ SYSENT_CI("kill", kill, 2), 4620Sstevel@tonic-gate /* 38 */ IF_LP64( 4630Sstevel@tonic-gate SYSENT_NOSYS(), 4640Sstevel@tonic-gate SYSENT_CI("fstatfs", fstatfs32, 4)), 4650Sstevel@tonic-gate /* 39 */ SYSENT_CI("setpgrp", setpgrp, 3), 4662712Snn35248 /* 40 */ SYSENT_CI("uucopystr", uucopystr, 3), 467*11798SRoger.Faulkner@Sun.COM /* 41 */ SYSENT_LOADABLE(), /* (was dup) */ 4683235Sraf /* 42 */ SYSENT_LOADABLE(), /* pipe */ 4690Sstevel@tonic-gate /* 43 */ SYSENT_CL("times", times, 1), 4700Sstevel@tonic-gate /* 44 */ SYSENT_CI("prof", profil, 4), 471*11798SRoger.Faulkner@Sun.COM /* 45 */ SYSENT_CI("faccessat", faccessat, 4), 4720Sstevel@tonic-gate /* 46 */ SYSENT_CI("setgid", setgid, 1), 4730Sstevel@tonic-gate /* 47 */ SYSENT_2CI("getgid", getgid, 0), 47410927SRoger.Faulkner@Sun.COM /* 48 */ SYSENT_LOADABLE(), /* (was ssig) */ 4753235Sraf /* 49 */ SYSENT_LOADABLE(), /* msgsys */ 4760Sstevel@tonic-gate /* 50 */ IF_x86( 4770Sstevel@tonic-gate SYSENT_CI("sysi86", sysi86, 4), 4780Sstevel@tonic-gate SYSENT_LOADABLE()), /* (was sys3b) */ 4790Sstevel@tonic-gate /* 51 */ SYSENT_LOADABLE(), /* sysacct */ 4800Sstevel@tonic-gate /* 52 */ SYSENT_LOADABLE(), /* shmsys */ 4810Sstevel@tonic-gate /* 53 */ SYSENT_LOADABLE(), /* semsys */ 4820Sstevel@tonic-gate /* 54 */ SYSENT_CI("ioctl", ioctl, 3), 4830Sstevel@tonic-gate /* 55 */ SYSENT_CI("uadmin", uadmin, 3), 484*11798SRoger.Faulkner@Sun.COM /* 56 */ SYSENT_CI("fchownat", fchownat, 5), 4850Sstevel@tonic-gate /* 57 */ IF_LP64( 4860Sstevel@tonic-gate SYSENT_2CI("utssys", utssys64, 4), 4870Sstevel@tonic-gate SYSENT_2CI("utssys", utssys32, 4)), 4880Sstevel@tonic-gate /* 58 */ SYSENT_CI("fdsync", fdsync, 2), 4890Sstevel@tonic-gate /* 59 */ SYSENT_CI("exece", exece, 3), 4900Sstevel@tonic-gate /* 60 */ SYSENT_CI("umask", umask, 1), 4910Sstevel@tonic-gate /* 61 */ SYSENT_CI("chroot", chroot, 1), 4920Sstevel@tonic-gate /* 62 */ SYSENT_CI("fcntl", fcntl, 3), 4930Sstevel@tonic-gate /* 63 */ SYSENT_CI("ulimit", ulimit, 2), 494*11798SRoger.Faulkner@Sun.COM /* 64 */ SYSENT_CI("renameat", renameat, 4), 495*11798SRoger.Faulkner@Sun.COM /* 65 */ SYSENT_CI("unlinkat", unlinkat, 3), 496*11798SRoger.Faulkner@Sun.COM /* 66 */ SYSENT_CI("fstatat", fstatat, 4), 497*11798SRoger.Faulkner@Sun.COM /* 67 */ IF_LP64( 498*11798SRoger.Faulkner@Sun.COM SYSENT_NOSYS(), 499*11798SRoger.Faulkner@Sun.COM SYSENT_CI("fstatat64", fstatat64, 4)), 500*11798SRoger.Faulkner@Sun.COM /* 68 */ SYSENT_CI("openat", openat, 4), 501*11798SRoger.Faulkner@Sun.COM /* 69 */ IF_LP64( 502*11798SRoger.Faulkner@Sun.COM SYSENT_NOSYS(), 503*11798SRoger.Faulkner@Sun.COM SYSENT_CI("openat64", openat64, 4)), 5040Sstevel@tonic-gate /* 70 */ SYSENT_CI("tasksys", tasksys, 5), 5050Sstevel@tonic-gate /* 71 */ SYSENT_LOADABLE(), /* acctctl */ 5060Sstevel@tonic-gate /* 72 */ SYSENT_LOADABLE(), /* exacct */ 5075349Skchow /* 73 */ SYSENT_CI("getpagesizes", getpagesizes, 3), 5080Sstevel@tonic-gate /* 74 */ SYSENT_CI("rctlsys", rctlsys, 6), 5094321Scasper /* 75 */ SYSENT_2CI("sidsys", sidsys, 4), 510*11798SRoger.Faulkner@Sun.COM /* 76 */ SYSENT_LOADABLE(), /* (was fsat) */ 5110Sstevel@tonic-gate /* 77 */ SYSENT_CI("lwp_park", syslwp_park, 3), 5120Sstevel@tonic-gate /* 78 */ SYSENT_CL("sendfilev", sendfilev, 5), 5130Sstevel@tonic-gate /* 79 */ SYSENT_CI("rmdir", rmdir, 1), 5140Sstevel@tonic-gate /* 80 */ SYSENT_CI("mkdir", mkdir, 2), 5150Sstevel@tonic-gate /* 81 */ IF_LP64( 5160Sstevel@tonic-gate SYSENT_CI("getdents", getdents64, 3), 5170Sstevel@tonic-gate SYSENT_CI("getdents", getdents32, 3)), 5186134Scasper /* 82 */ SYSENT_CI("privsys", privsys, 6), 5190Sstevel@tonic-gate /* 83 */ SYSENT_CI("ucredsys", ucredsys, 3), 5200Sstevel@tonic-gate /* 84 */ SYSENT_CI("sysfs", sysfs, 3), 5210Sstevel@tonic-gate /* 85 */ SYSENT_CI("getmsg", getmsg, 4), 5220Sstevel@tonic-gate /* 86 */ SYSENT_CI("putmsg", putmsg, 4), 523*11798SRoger.Faulkner@Sun.COM /* 87 */ SYSENT_LOADABLE(), /* (was poll) */ 5240Sstevel@tonic-gate /* 88 */ SYSENT_CI("lstat", lstat, 2), 5250Sstevel@tonic-gate /* 89 */ SYSENT_CI("symlink", symlink, 2), 5260Sstevel@tonic-gate /* 90 */ SYSENT_CL("readlink", readlink, 3), 5270Sstevel@tonic-gate /* 91 */ SYSENT_CI("setgroups", setgroups, 2), 5280Sstevel@tonic-gate /* 92 */ SYSENT_CI("getgroups", getgroups, 2), 5290Sstevel@tonic-gate /* 93 */ SYSENT_CI("fchmod", fchmod, 2), 5300Sstevel@tonic-gate /* 94 */ SYSENT_CI("fchown", fchown, 3), 5310Sstevel@tonic-gate /* 95 */ SYSENT_CI("sigprocmask", sigprocmask, 3), 5320Sstevel@tonic-gate /* 96 */ SYSENT_CI("sigsuspend", sigsuspend, 1), 5330Sstevel@tonic-gate /* 97 */ SYSENT_CI("sigaltstack", sigaltstack, 2), 5340Sstevel@tonic-gate /* 98 */ SYSENT_CI("sigaction", sigaction, 3), 5350Sstevel@tonic-gate /* 99 */ SYSENT_CI("sigpending", sigpending, 2), 5360Sstevel@tonic-gate /* 100 */ SYSENT_CI("getsetcontext", getsetcontext, 2), 537*11798SRoger.Faulkner@Sun.COM /* 101 */ SYSENT_LOADABLE(), 538*11798SRoger.Faulkner@Sun.COM /* 102 */ SYSENT_LOADABLE(), 5390Sstevel@tonic-gate /* 103 */ SYSENT_CI("statvfs", statvfs, 2), 5400Sstevel@tonic-gate /* 104 */ SYSENT_CI("fstatvfs", fstatvfs, 2), 5410Sstevel@tonic-gate /* 105 */ SYSENT_CI("getloadavg", getloadavg, 2), 5420Sstevel@tonic-gate /* ONC_PLUS EXTRACT START */ 5430Sstevel@tonic-gate /* 106 */ SYSENT_LOADABLE(), /* nfssys */ 5440Sstevel@tonic-gate /* ONC_PLUS EXTRACT END */ 5450Sstevel@tonic-gate /* 107 */ SYSENT_CI("waitsys", waitsys, 4), 5460Sstevel@tonic-gate /* 108 */ SYSENT_CI("sigsendset", sigsendsys, 2), 5470Sstevel@tonic-gate /* 109 */ IF_x86( 5480Sstevel@tonic-gate SYSENT_AP("hrtsys", hrtsys, 5), 5490Sstevel@tonic-gate SYSENT_LOADABLE()), 55010440SRoger.Faulkner@Sun.COM /* 110 */ SYSENT_CI("utimesys", utimesys, 5), 5514806Sraf /* 111 */ SYSENT_CI("sigresend", sigresend, 3), 5520Sstevel@tonic-gate /* 112 */ SYSENT_CL("priocntlsys", priocntlsys, 5), 5530Sstevel@tonic-gate /* 113 */ SYSENT_CL("pathconf", pathconf, 2), 5540Sstevel@tonic-gate /* 114 */ SYSENT_CI("mincore", mincore, 3), 5550Sstevel@tonic-gate /* 115 */ IF_LP64( 5560Sstevel@tonic-gate SYSENT_CL("mmap", smmap64, 6), 5570Sstevel@tonic-gate SYSENT_CL("mmap", smmap32, 6)), 5580Sstevel@tonic-gate /* 116 */ SYSENT_CI("mprotect", mprotect, 3), 5590Sstevel@tonic-gate /* 117 */ SYSENT_CI("munmap", munmap, 2), 5600Sstevel@tonic-gate /* 118 */ SYSENT_CL("fpathconf", fpathconf, 2), 5610Sstevel@tonic-gate /* 119 */ SYSENT_2CI("vfork", vfork, 0), 5620Sstevel@tonic-gate /* 120 */ SYSENT_CI("fchdir", fchdir, 1), 5630Sstevel@tonic-gate /* 121 */ SYSENT_CL("readv", readv, 3), 5640Sstevel@tonic-gate /* 122 */ SYSENT_CL("writev", writev, 3), 565*11798SRoger.Faulkner@Sun.COM /* 123 */ SYSENT_LOADABLE(), /* (was xstat) */ 566*11798SRoger.Faulkner@Sun.COM /* 124 */ SYSENT_LOADABLE(), /* (was lxstat) */ 567*11798SRoger.Faulkner@Sun.COM /* 125 */ SYSENT_LOADABLE(), /* (was fxstat) */ 568*11798SRoger.Faulkner@Sun.COM /* 126 */ SYSENT_LOADABLE(), /* (was xmknod) */ 5698212SMichael.Corcoran@Sun.COM /* 127 */ SYSENT_CI("mmapobj", mmapobjsys, 5), 5700Sstevel@tonic-gate /* 128 */ IF_LP64( 5710Sstevel@tonic-gate SYSENT_CI("setrlimit", setrlimit64, 2), 5720Sstevel@tonic-gate SYSENT_CI("setrlimit", setrlimit32, 2)), 5730Sstevel@tonic-gate /* 129 */ IF_LP64( 5740Sstevel@tonic-gate SYSENT_CI("getrlimit", getrlimit64, 2), 5750Sstevel@tonic-gate SYSENT_CI("getrlimit", getrlimit32, 2)), 5760Sstevel@tonic-gate /* 130 */ SYSENT_CI("lchown", lchown, 3), 5770Sstevel@tonic-gate /* 131 */ SYSENT_CI("memcntl", memcntl, 6), 5780Sstevel@tonic-gate /* 132 */ SYSENT_CI("getpmsg", getpmsg, 5), 5790Sstevel@tonic-gate /* 133 */ SYSENT_CI("putpmsg", putpmsg, 5), 5800Sstevel@tonic-gate /* 134 */ SYSENT_CI("rename", rename, 2), 5810Sstevel@tonic-gate /* 135 */ SYSENT_CI("uname", uname, 1), 5820Sstevel@tonic-gate /* 136 */ SYSENT_CI("setegid", setegid, 1), 5830Sstevel@tonic-gate /* 137 */ SYSENT_CL("sysconfig", sysconfig, 1), 5840Sstevel@tonic-gate /* 138 */ SYSENT_CI("adjtime", adjtime, 2), 5850Sstevel@tonic-gate /* 139 */ SYSENT_CL("systeminfo", systeminfo, 3), 5863957Sth199096 /* 140 */ SYSENT_LOADABLE(), /* sharefs */ 5870Sstevel@tonic-gate /* 141 */ SYSENT_CI("seteuid", seteuid, 1), 5883235Sraf /* 142 */ SYSENT_2CI("forksys", forksys, 2), 589*11798SRoger.Faulkner@Sun.COM /* 143 */ SYSENT_LOADABLE(), /* (was fork1) */ 5900Sstevel@tonic-gate /* 144 */ SYSENT_CI("sigtimedwait", sigtimedwait, 3), 5910Sstevel@tonic-gate /* 145 */ SYSENT_CI("lwp_info", lwp_info, 1), 5920Sstevel@tonic-gate /* 146 */ SYSENT_CI("yield", yield, 0), 593*11798SRoger.Faulkner@Sun.COM /* 147 */ SYSENT_LOADABLE(), /* (was lwp_sema_wait) */ 5940Sstevel@tonic-gate /* 148 */ SYSENT_CI("lwp_sema_post", lwp_sema_post, 1), 5950Sstevel@tonic-gate /* 149 */ SYSENT_CI("lwp_sema_trywait", lwp_sema_trywait, 1), 5960Sstevel@tonic-gate /* 150 */ SYSENT_CI("lwp_detach", lwp_detach, 1), 5970Sstevel@tonic-gate /* 151 */ SYSENT_CI("corectl", corectl, 4), 5980Sstevel@tonic-gate /* 152 */ SYSENT_CI("modctl", modctl, 6), 5990Sstevel@tonic-gate /* 153 */ SYSENT_CI("fchroot", fchroot, 1), 600*11798SRoger.Faulkner@Sun.COM /* 154 */ SYSENT_LOADABLE(), /* (was utimes) */ 6010Sstevel@tonic-gate /* 155 */ SYSENT_CI("vhangup", vhangup, 0), 6020Sstevel@tonic-gate /* 156 */ SYSENT_CI("gettimeofday", gettimeofday, 1), 6030Sstevel@tonic-gate /* 157 */ SYSENT_CI("getitimer", getitimer, 2), 6040Sstevel@tonic-gate /* 158 */ SYSENT_CI("setitimer", setitimer, 3), 6050Sstevel@tonic-gate /* 159 */ SYSENT_CI("lwp_create", syslwp_create, 3), 6060Sstevel@tonic-gate /* 160 */ SYSENT_CI("lwp_exit", (int (*)())syslwp_exit, 0), 6070Sstevel@tonic-gate /* 161 */ SYSENT_CI("lwp_suspend", syslwp_suspend, 1), 6080Sstevel@tonic-gate /* 162 */ SYSENT_CI("lwp_continue", syslwp_continue, 1), 6090Sstevel@tonic-gate /* 163 */ SYSENT_CI("lwp_kill", lwp_kill, 2), 6100Sstevel@tonic-gate /* 164 */ SYSENT_CI("lwp_self", lwp_self, 0), 6110Sstevel@tonic-gate /* 165 */ SYSENT_2CI("lwp_sigmask", lwp_sigmask, 3), 6120Sstevel@tonic-gate /* 166 */ IF_x86( 6130Sstevel@tonic-gate SYSENT_CI("lwp_private", syslwp_private, 3), 6140Sstevel@tonic-gate SYSENT_NOSYS()), 6150Sstevel@tonic-gate /* 167 */ SYSENT_CI("lwp_wait", lwp_wait, 2), 6164574Sraf /* 168 */ SYSENT_CI("lwp_mutex_wakeup", lwp_mutex_wakeup, 2), 617*11798SRoger.Faulkner@Sun.COM /* 169 */ SYSENT_LOADABLE(), /* (was lwp_mutex_lock) */ 6180Sstevel@tonic-gate /* 170 */ SYSENT_CI("lwp_cond_wait", lwp_cond_wait, 4), 6190Sstevel@tonic-gate /* 171 */ SYSENT_CI("lwp_cond_signal", lwp_cond_signal, 1), 6200Sstevel@tonic-gate /* 172 */ SYSENT_CI("lwp_cond_broadcast", lwp_cond_broadcast, 1), 6210Sstevel@tonic-gate /* 173 */ SYSENT_CL("pread", pread, 4), 6220Sstevel@tonic-gate /* 174 */ SYSENT_CL("pwrite ", pwrite, 4), 6230Sstevel@tonic-gate /* 6240Sstevel@tonic-gate * The 64-bit C library maps llseek() to lseek(), so this 6250Sstevel@tonic-gate * is needed as a native syscall only on the 32-bit kernel. 6260Sstevel@tonic-gate */ 6270Sstevel@tonic-gate /* 175 */ IF_LP64( 6280Sstevel@tonic-gate SYSENT_NOSYS(), 6290Sstevel@tonic-gate SYSENT_C("llseek", llseek32, 4)), 6300Sstevel@tonic-gate /* 176 */ SYSENT_LOADABLE(), /* inst_sync */ 6312712Snn35248 /* 177 */ SYSENT_CI("brandsys", brandsys, 6), 6320Sstevel@tonic-gate /* 178 */ SYSENT_LOADABLE(), /* kaio */ 6330Sstevel@tonic-gate /* 179 */ SYSENT_LOADABLE(), /* cpc */ 6340Sstevel@tonic-gate /* 180 */ SYSENT_CI("lgrpsys", lgrpsys, 3), 6353247Sgjelinek /* 181 */ SYSENT_CI("rusagesys", rusagesys, 5), 6360Sstevel@tonic-gate /* 182 */ SYSENT_LOADABLE(), /* portfs */ 6370Sstevel@tonic-gate /* 183 */ SYSENT_CI("pollsys", pollsys, 4), 6381676Sjpk /* 184 */ SYSENT_CI("labelsys", labelsys, 5), 6390Sstevel@tonic-gate /* 185 */ SYSENT_CI("acl", acl, 4), 6400Sstevel@tonic-gate /* 186 */ SYSENT_AP("auditsys", auditsys, 2), 6410Sstevel@tonic-gate /* 187 */ SYSENT_CI("processor_bind", processor_bind, 4), 6420Sstevel@tonic-gate /* 188 */ SYSENT_CI("processor_info", processor_info, 2), 6430Sstevel@tonic-gate /* 189 */ SYSENT_CI("p_online", p_online, 2), 6442248Sraf /* 190 */ SYSENT_CI("sigqueue", sigqueue, 5), 6450Sstevel@tonic-gate /* 191 */ SYSENT_CI("clock_gettime", clock_gettime, 2), 6460Sstevel@tonic-gate /* 192 */ SYSENT_CI("clock_settime", clock_settime, 2), 6470Sstevel@tonic-gate /* 193 */ SYSENT_CI("clock_getres", clock_getres, 2), 6480Sstevel@tonic-gate /* 194 */ SYSENT_CI("timer_create", timer_create, 3), 6490Sstevel@tonic-gate /* 195 */ SYSENT_CI("timer_delete", timer_delete, 1), 6500Sstevel@tonic-gate /* 196 */ SYSENT_CI("timer_settime", timer_settime, 4), 6510Sstevel@tonic-gate /* 197 */ SYSENT_CI("timer_gettime", timer_gettime, 2), 6520Sstevel@tonic-gate /* 198 */ SYSENT_CI("timer_getoverrun", timer_getoverrun, 1), 6530Sstevel@tonic-gate /* 199 */ SYSENT_CI("nanosleep", nanosleep, 2), 6540Sstevel@tonic-gate /* 200 */ SYSENT_CI("facl", facl, 4), 6550Sstevel@tonic-gate /* 201 */ SYSENT_LOADABLE(), /* door */ 6560Sstevel@tonic-gate /* 202 */ SYSENT_CI("setreuid", setreuid, 2), 6570Sstevel@tonic-gate /* 203 */ SYSENT_CI("setregid", setregid, 2), 6580Sstevel@tonic-gate /* 204 */ SYSENT_CI("install_utrap", install_utrap, 3), 6590Sstevel@tonic-gate /* 205 */ SYSENT_CI("signotify", signotify, 3), 6600Sstevel@tonic-gate /* 206 */ SYSENT_CL("schedctl", schedctl, 0), 6610Sstevel@tonic-gate /* 207 */ SYSENT_LOADABLE(), /* pset */ 6620Sstevel@tonic-gate /* 208 */ IF_sparc( 6630Sstevel@tonic-gate SYSENT_CI("sparc_utrap_install", sparc_utrap_install, 5), 6640Sstevel@tonic-gate SYSENT_NOSYS()), 6650Sstevel@tonic-gate /* 209 */ SYSENT_CI("resolvepath", resolvepath, 3), 66610887SRoger.Faulkner@Sun.COM /* 210 */ SYSENT_CI("lwp_mutex_timedlock", lwp_mutex_timedlock, 3), 6670Sstevel@tonic-gate /* 211 */ SYSENT_CI("lwp_sema_timedwait", lwp_sema_timedwait, 3), 6680Sstevel@tonic-gate /* 212 */ SYSENT_CI("lwp_rwlock_sys", lwp_rwlock_sys, 3), 6690Sstevel@tonic-gate /* 6700Sstevel@tonic-gate * Syscalls 213-225: 32-bit system call support for large files. 6710Sstevel@tonic-gate * 6720Sstevel@tonic-gate * (The 64-bit C library transparently maps these system calls 6730Sstevel@tonic-gate * back to their native versions, so almost all of them are only 6740Sstevel@tonic-gate * needed as native syscalls on the 32-bit kernel). 6750Sstevel@tonic-gate */ 6760Sstevel@tonic-gate /* 213 */ IF_LP64( 6770Sstevel@tonic-gate SYSENT_NOSYS(), 6780Sstevel@tonic-gate SYSENT_CI("getdents64", getdents64, 3)), 6790Sstevel@tonic-gate /* 214 */ IF_LP64( 6800Sstevel@tonic-gate SYSENT_NOSYS(), 6810Sstevel@tonic-gate SYSENT_AP("smmaplf32", smmaplf32, 7)), 6820Sstevel@tonic-gate /* 215 */ IF_LP64( 6830Sstevel@tonic-gate SYSENT_NOSYS(), 6840Sstevel@tonic-gate SYSENT_CI("stat64", stat64, 2)), 6850Sstevel@tonic-gate /* 216 */ IF_LP64( 6860Sstevel@tonic-gate SYSENT_NOSYS(), 6870Sstevel@tonic-gate SYSENT_CI("lstat64", lstat64, 2)), 6880Sstevel@tonic-gate /* 217 */ IF_LP64( 6890Sstevel@tonic-gate SYSENT_NOSYS(), 6900Sstevel@tonic-gate SYSENT_CI("fstat64", fstat64, 2)), 6910Sstevel@tonic-gate /* 218 */ IF_LP64( 6920Sstevel@tonic-gate SYSENT_NOSYS(), 6930Sstevel@tonic-gate SYSENT_CI("statvfs64", statvfs64, 2)), 6940Sstevel@tonic-gate /* 219 */ IF_LP64( 6950Sstevel@tonic-gate SYSENT_NOSYS(), 6960Sstevel@tonic-gate SYSENT_CI("fstatvfs64", fstatvfs64, 2)), 6970Sstevel@tonic-gate /* 220 */ IF_LP64( 6980Sstevel@tonic-gate SYSENT_NOSYS(), 6990Sstevel@tonic-gate SYSENT_CI("setrlimit64", setrlimit64, 2)), 7000Sstevel@tonic-gate /* 221 */ IF_LP64( 7010Sstevel@tonic-gate SYSENT_NOSYS(), 7020Sstevel@tonic-gate SYSENT_CI("getrlimit64", getrlimit64, 2)), 7030Sstevel@tonic-gate /* 222 */ IF_LP64( 7040Sstevel@tonic-gate SYSENT_NOSYS(), 7050Sstevel@tonic-gate SYSENT_CI("pread64", pread64, 5)), 7060Sstevel@tonic-gate /* 223 */ IF_LP64( 7070Sstevel@tonic-gate SYSENT_NOSYS(), 7080Sstevel@tonic-gate SYSENT_CI("pwrite64", pwrite64, 5)), 709*11798SRoger.Faulkner@Sun.COM /* 224 */ SYSENT_LOADABLE(), /* (was creat64) */ 7100Sstevel@tonic-gate /* 225 */ IF_LP64( 7110Sstevel@tonic-gate SYSENT_NOSYS(), 7120Sstevel@tonic-gate SYSENT_CI("open64", open64, 3)), 7130Sstevel@tonic-gate /* 226 */ SYSENT_LOADABLE(), /* rpcsys */ 7141676Sjpk /* 227 */ SYSENT_CL("zone", zone, 5), 7150Sstevel@tonic-gate /* 228 */ SYSENT_LOADABLE(), /* autofssys */ 7160Sstevel@tonic-gate /* 229 */ SYSENT_CI("getcwd", getcwd, 2), 7170Sstevel@tonic-gate /* 230 */ SYSENT_CI("so_socket", so_socket, 5), 7180Sstevel@tonic-gate /* 231 */ SYSENT_CI("so_socketpair", so_socketpair, 1), 7190Sstevel@tonic-gate /* 232 */ SYSENT_CI("bind", bind, 4), 7200Sstevel@tonic-gate /* 233 */ SYSENT_CI("listen", listen, 3), 7210Sstevel@tonic-gate /* 234 */ SYSENT_CI("accept", accept, 4), 7220Sstevel@tonic-gate /* 235 */ SYSENT_CI("connect", connect, 4), 7230Sstevel@tonic-gate /* 236 */ SYSENT_CI("shutdown", shutdown, 3), 7240Sstevel@tonic-gate /* 237 */ SYSENT_CL("recv", recv, 4), 7250Sstevel@tonic-gate /* 238 */ SYSENT_CL("recvfrom", recvfrom, 6), 7260Sstevel@tonic-gate /* 239 */ SYSENT_CL("recvmsg", recvmsg, 3), 7270Sstevel@tonic-gate /* 240 */ SYSENT_CL("send", send, 4), 7280Sstevel@tonic-gate /* 241 */ SYSENT_CL("sendmsg", sendmsg, 3), 7290Sstevel@tonic-gate /* 242 */ SYSENT_CL("sendto", sendto, 6), 7300Sstevel@tonic-gate /* 243 */ SYSENT_CI("getpeername", getpeername, 4), 7310Sstevel@tonic-gate /* 244 */ SYSENT_CI("getsockname", getsockname, 4), 7320Sstevel@tonic-gate /* 245 */ SYSENT_CI("getsockopt", getsockopt, 6), 7330Sstevel@tonic-gate /* 246 */ SYSENT_CI("setsockopt", setsockopt, 6), 7340Sstevel@tonic-gate /* 247 */ SYSENT_CI("sockconfig", sockconfig, 4), 7350Sstevel@tonic-gate /* 248 */ SYSENT_CI("ntp_gettime", ntp_gettime, 1), 7360Sstevel@tonic-gate /* 249 */ SYSENT_CI("ntp_adjtime", ntp_adjtime, 1), 7370Sstevel@tonic-gate /* 250 */ SYSENT_CI("lwp_mutex_unlock", lwp_mutex_unlock, 1), 73810887SRoger.Faulkner@Sun.COM /* 251 */ SYSENT_CI("lwp_mutex_trylock", lwp_mutex_trylock, 2), 7399264SRoger.Faulkner@Sun.COM /* 252 */ SYSENT_CI("lwp_mutex_register", lwp_mutex_register, 2), 7400Sstevel@tonic-gate /* 253 */ SYSENT_CI("cladm", cladm, 3), 7412712Snn35248 /* 254 */ SYSENT_CI("uucopy", uucopy, 3), 7420Sstevel@tonic-gate /* 255 */ SYSENT_CI("umount2", umount2, 2) 7430Sstevel@tonic-gate /* ONC_PLUS EXTRACT START */ 7440Sstevel@tonic-gate }; 7450Sstevel@tonic-gate /* ONC_PLUS EXTRACT END */ 7460Sstevel@tonic-gate 7470Sstevel@tonic-gate 7480Sstevel@tonic-gate #ifdef _SYSCALL32_IMPL 7490Sstevel@tonic-gate 7500Sstevel@tonic-gate extern int ulimit32(); 7510Sstevel@tonic-gate extern ssize_t read32(); 7520Sstevel@tonic-gate extern ssize_t write32(); 7530Sstevel@tonic-gate extern ssize_t pread32(); 7540Sstevel@tonic-gate extern ssize_t pwrite32(); 7550Sstevel@tonic-gate extern ssize_t readv32(); 7560Sstevel@tonic-gate extern ssize_t writev32(); 7570Sstevel@tonic-gate extern ssize_t readlink32(); 7580Sstevel@tonic-gate extern int open32(); 759*11798SRoger.Faulkner@Sun.COM extern int openat32(); 7600Sstevel@tonic-gate extern int stat32(); 7610Sstevel@tonic-gate extern int fstatat32(); 7620Sstevel@tonic-gate extern int lstat32(); 7630Sstevel@tonic-gate extern int fstat32(); 7640Sstevel@tonic-gate extern int fstatat64_32(); 7650Sstevel@tonic-gate extern int stat64_32(); 7660Sstevel@tonic-gate extern int lstat64_32(); 7670Sstevel@tonic-gate extern int fstat64_32(); 7680Sstevel@tonic-gate extern int getmsg32(); 7690Sstevel@tonic-gate extern int putmsg32(); 7700Sstevel@tonic-gate extern int getpmsg32(); 7710Sstevel@tonic-gate extern int putpmsg32(); 7720Sstevel@tonic-gate extern int getsetcontext32(); 7730Sstevel@tonic-gate extern int statvfs32(); 7740Sstevel@tonic-gate extern int fstatvfs32(); 7750Sstevel@tonic-gate extern int statvfs64_32(); 7760Sstevel@tonic-gate extern int fstatvfs64_32(); 7770Sstevel@tonic-gate extern int sigaction32(); 7780Sstevel@tonic-gate extern clock32_t times32(); 7790Sstevel@tonic-gate extern int stime32(); 7800Sstevel@tonic-gate extern int getpagesizes32(); 7810Sstevel@tonic-gate extern int sigaltstack32(); 7820Sstevel@tonic-gate extern int sigqueue32(); 7830Sstevel@tonic-gate extern offset_t llseek32(); 7840Sstevel@tonic-gate extern int waitsys32(); 7850Sstevel@tonic-gate 7860Sstevel@tonic-gate extern ssize_t recv32(); 7870Sstevel@tonic-gate extern ssize_t recvfrom32(); 7880Sstevel@tonic-gate extern ssize_t send32(); 7890Sstevel@tonic-gate extern ssize_t sendto32(); 7900Sstevel@tonic-gate 7910Sstevel@tonic-gate extern int privsys32(); 7920Sstevel@tonic-gate extern int ucredsys32(); 7930Sstevel@tonic-gate 7940Sstevel@tonic-gate /* ONC_PLUS EXTRACT START */ 7950Sstevel@tonic-gate /* 7960Sstevel@tonic-gate * sysent table for ILP32 processes running on 7970Sstevel@tonic-gate * a LP64 kernel. 7980Sstevel@tonic-gate */ 7990Sstevel@tonic-gate struct sysent sysent32[NSYSCALL] = 8000Sstevel@tonic-gate { 8010Sstevel@tonic-gate /* ONC_PLUS EXTRACT END */ 8020Sstevel@tonic-gate /* 0 */ SYSENT_C("indir", indir, 1), 8030Sstevel@tonic-gate /* 1 */ SYSENT_CI("exit", (int (*)())rexit, 1), 804*11798SRoger.Faulkner@Sun.COM /* 2 */ SYSENT_LOADABLE32(), /* (was forkall) */ 8050Sstevel@tonic-gate /* 3 */ SYSENT_CI("read", read32, 3), 8060Sstevel@tonic-gate /* 4 */ SYSENT_CI("write", write32, 3), 8070Sstevel@tonic-gate /* 5 */ SYSENT_CI("open", open32, 3), 8080Sstevel@tonic-gate /* 6 */ SYSENT_CI("close", close, 1), 809*11798SRoger.Faulkner@Sun.COM /* 7 */ SYSENT_LOADABLE32(), /* (was wait) */ 810*11798SRoger.Faulkner@Sun.COM /* 8 */ SYSENT_LOADABLE32(), /* (was creat32) */ 8110Sstevel@tonic-gate /* 9 */ SYSENT_CI("link", link, 2), 8120Sstevel@tonic-gate /* 10 */ SYSENT_CI("unlink", unlink, 1), 813*11798SRoger.Faulkner@Sun.COM /* 11 */ SYSENT_LOADABLE32(), /* (was exec) */ 8140Sstevel@tonic-gate /* 12 */ SYSENT_CI("chdir", chdir, 1), 8150Sstevel@tonic-gate /* 13 */ SYSENT_CI("time", gtime, 0), 8160Sstevel@tonic-gate /* 14 */ SYSENT_CI("mknod", mknod, 3), 8170Sstevel@tonic-gate /* 15 */ SYSENT_CI("chmod", chmod, 2), 8180Sstevel@tonic-gate /* 16 */ SYSENT_CI("chown", chown, 3), 8190Sstevel@tonic-gate /* 17 */ SYSENT_CI("brk", brk, 1), 8200Sstevel@tonic-gate /* 18 */ SYSENT_CI("stat", stat32, 2), 8210Sstevel@tonic-gate /* 19 */ SYSENT_CI("lseek", lseek32, 3), 8220Sstevel@tonic-gate /* 20 */ SYSENT_2CI("getpid", getpid, 0), 8230Sstevel@tonic-gate /* 21 */ SYSENT_AP("mount", mount, 8), 824*11798SRoger.Faulkner@Sun.COM /* 22 */ SYSENT_LOADABLE32(), /* (was umount) */ 8250Sstevel@tonic-gate /* 23 */ SYSENT_CI("setuid", setuid, 1), 8260Sstevel@tonic-gate /* 24 */ SYSENT_2CI("getuid", getuid, 0), 8270Sstevel@tonic-gate /* 25 */ SYSENT_CI("stime", stime32, 1), 8280Sstevel@tonic-gate /* 26 */ SYSENT_CI("pcsample", pcsample, 2), 8290Sstevel@tonic-gate /* 27 */ SYSENT_CI("alarm", alarm, 1), 8300Sstevel@tonic-gate /* 28 */ SYSENT_CI("fstat", fstat32, 2), 8310Sstevel@tonic-gate /* 29 */ SYSENT_CI("pause", pause, 0), 832*11798SRoger.Faulkner@Sun.COM /* 30 */ SYSENT_LOADABLE32(), /* (was utime) */ 8330Sstevel@tonic-gate /* 31 */ SYSENT_CI("stty", stty, 2), 8340Sstevel@tonic-gate /* 32 */ SYSENT_CI("gtty", gtty, 2), 8350Sstevel@tonic-gate /* 33 */ SYSENT_CI("access", access, 2), 8360Sstevel@tonic-gate /* 34 */ SYSENT_CI("nice", nice, 1), 8370Sstevel@tonic-gate /* 35 */ SYSENT_CI("statfs", statfs32, 4), 8380Sstevel@tonic-gate /* 36 */ SYSENT_CI("sync", syssync, 0), 8390Sstevel@tonic-gate /* 37 */ SYSENT_CI("kill", kill, 2), 8400Sstevel@tonic-gate /* 38 */ SYSENT_CI("fstatfs", fstatfs32, 4), 8410Sstevel@tonic-gate /* 39 */ SYSENT_CI("setpgrp", setpgrp, 3), 8422712Snn35248 /* 40 */ SYSENT_CI("uucopystr", uucopystr, 3), 843*11798SRoger.Faulkner@Sun.COM /* 41 */ SYSENT_LOADABLE32(), /* (was dup) */ 8443235Sraf /* 42 */ SYSENT_LOADABLE32(), /* pipe */ 8450Sstevel@tonic-gate /* 43 */ SYSENT_CI("times", times32, 1), 8460Sstevel@tonic-gate /* 44 */ SYSENT_CI("prof", profil, 4), 847*11798SRoger.Faulkner@Sun.COM /* 45 */ SYSENT_CI("faccessat", faccessat, 4), 8480Sstevel@tonic-gate /* 46 */ SYSENT_CI("setgid", setgid, 1), 8490Sstevel@tonic-gate /* 47 */ SYSENT_2CI("getgid", getgid, 0), 85010927SRoger.Faulkner@Sun.COM /* 48 */ SYSENT_LOADABLE32(), /* (was ssig) */ 8513235Sraf /* 49 */ SYSENT_LOADABLE32(), /* msgsys */ 8520Sstevel@tonic-gate /* 50 */ IF_386_ABI( 8530Sstevel@tonic-gate SYSENT_CI("sysi86", sysi86, 4), 854*11798SRoger.Faulkner@Sun.COM SYSENT_LOADABLE32()), /* (was sys3b) */ 8550Sstevel@tonic-gate /* 51 */ SYSENT_LOADABLE32(), /* sysacct */ 8560Sstevel@tonic-gate /* 52 */ SYSENT_LOADABLE32(), /* shmsys */ 8570Sstevel@tonic-gate /* 53 */ SYSENT_LOADABLE32(), /* semsys */ 8580Sstevel@tonic-gate /* 54 */ SYSENT_CI("ioctl", ioctl, 3), 8590Sstevel@tonic-gate /* 55 */ SYSENT_CI("uadmin", uadmin, 3), 860*11798SRoger.Faulkner@Sun.COM /* 56 */ SYSENT_CI("fchownat", fchownat, 5), 8610Sstevel@tonic-gate /* 57 */ SYSENT_2CI("utssys", utssys32, 4), 8620Sstevel@tonic-gate /* 58 */ SYSENT_CI("fdsync", fdsync, 2), 8630Sstevel@tonic-gate /* 59 */ SYSENT_CI("exece", exece, 3), 8640Sstevel@tonic-gate /* 60 */ SYSENT_CI("umask", umask, 1), 8650Sstevel@tonic-gate /* 61 */ SYSENT_CI("chroot", chroot, 1), 8660Sstevel@tonic-gate /* 62 */ SYSENT_CI("fcntl", fcntl, 3), 8670Sstevel@tonic-gate /* 63 */ SYSENT_CI("ulimit", ulimit32, 2), 868*11798SRoger.Faulkner@Sun.COM /* 64 */ SYSENT_CI("renameat", renameat, 4), 869*11798SRoger.Faulkner@Sun.COM /* 65 */ SYSENT_CI("unlinkat", unlinkat, 3), 870*11798SRoger.Faulkner@Sun.COM /* 66 */ SYSENT_CI("fstatat", fstatat32, 4), 871*11798SRoger.Faulkner@Sun.COM /* 67 */ SYSENT_CI("fstatat64", fstatat64_32, 4), 872*11798SRoger.Faulkner@Sun.COM /* 68 */ SYSENT_CI("openat", openat32, 4), 873*11798SRoger.Faulkner@Sun.COM /* 69 */ SYSENT_CI("openat64", openat64, 4), 8740Sstevel@tonic-gate /* 70 */ SYSENT_CI("tasksys", tasksys, 5), 8750Sstevel@tonic-gate /* 71 */ SYSENT_LOADABLE32(), /* acctctl */ 8760Sstevel@tonic-gate /* 72 */ SYSENT_LOADABLE32(), /* exacct */ 8775349Skchow /* 73 */ SYSENT_CI("getpagesizes", getpagesizes32, 3), 8780Sstevel@tonic-gate /* 74 */ SYSENT_CI("rctlsys", rctlsys, 6), 8794321Scasper /* 75 */ SYSENT_2CI("sidsys", sidsys, 4), 880*11798SRoger.Faulkner@Sun.COM /* 76 */ SYSENT_LOADABLE32(), /* (was fsat) */ 8810Sstevel@tonic-gate /* 77 */ SYSENT_CI("lwp_park", syslwp_park, 3), 8820Sstevel@tonic-gate /* 78 */ SYSENT_CI("sendfilev", sendfilev, 5), 8830Sstevel@tonic-gate /* 79 */ SYSENT_CI("rmdir", rmdir, 1), 8840Sstevel@tonic-gate /* 80 */ SYSENT_CI("mkdir", mkdir, 2), 8850Sstevel@tonic-gate /* 81 */ SYSENT_CI("getdents", getdents32, 3), 8866134Scasper /* 82 */ SYSENT_CI("privsys", privsys32, 6), 8870Sstevel@tonic-gate /* 83 */ SYSENT_CI("ucredsys", ucredsys32, 3), 8880Sstevel@tonic-gate /* 84 */ SYSENT_CI("sysfs", sysfs, 3), 8890Sstevel@tonic-gate /* 85 */ SYSENT_CI("getmsg", getmsg32, 4), 8900Sstevel@tonic-gate /* 86 */ SYSENT_CI("putmsg", putmsg32, 4), 891*11798SRoger.Faulkner@Sun.COM /* 87 */ SYSENT_LOADABLE32(), /* (was poll) */ 8920Sstevel@tonic-gate /* 88 */ SYSENT_CI("lstat", lstat32, 2), 8930Sstevel@tonic-gate /* 89 */ SYSENT_CI("symlink", symlink, 2), 8940Sstevel@tonic-gate /* 90 */ SYSENT_CI("readlink", readlink32, 3), 8950Sstevel@tonic-gate /* 91 */ SYSENT_CI("setgroups", setgroups, 2), 8960Sstevel@tonic-gate /* 92 */ SYSENT_CI("getgroups", getgroups, 2), 8970Sstevel@tonic-gate /* 93 */ SYSENT_CI("fchmod", fchmod, 2), 8980Sstevel@tonic-gate /* 94 */ SYSENT_CI("fchown", fchown, 3), 8990Sstevel@tonic-gate /* 95 */ SYSENT_CI("sigprocmask", sigprocmask, 3), 9000Sstevel@tonic-gate /* 96 */ SYSENT_CI("sigsuspend", sigsuspend, 1), 9010Sstevel@tonic-gate /* 97 */ SYSENT_CI("sigaltstack", sigaltstack32, 2), 9020Sstevel@tonic-gate /* 98 */ SYSENT_CI("sigaction", sigaction32, 3), 9030Sstevel@tonic-gate /* 99 */ SYSENT_CI("sigpending", sigpending, 2), 9040Sstevel@tonic-gate /* 100 */ SYSENT_CI("getsetcontext", getsetcontext32, 2), 905*11798SRoger.Faulkner@Sun.COM /* 101 */ SYSENT_LOADABLE32(), 906*11798SRoger.Faulkner@Sun.COM /* 102 */ SYSENT_LOADABLE32(), 9070Sstevel@tonic-gate /* 103 */ SYSENT_CI("statvfs", statvfs32, 2), 9080Sstevel@tonic-gate /* 104 */ SYSENT_CI("fstatvfs", fstatvfs32, 2), 9090Sstevel@tonic-gate /* 105 */ SYSENT_CI("getloadavg", getloadavg, 2), 9100Sstevel@tonic-gate /* ONC_PLUS EXTRACT START */ 9110Sstevel@tonic-gate /* 106 */ SYSENT_LOADABLE32(), /* nfssys */ 9120Sstevel@tonic-gate /* ONC_PLUS EXTRACT END */ 9130Sstevel@tonic-gate /* 107 */ SYSENT_CI("waitsys", waitsys32, 4), 9140Sstevel@tonic-gate /* 108 */ SYSENT_CI("sigsendset", sigsendsys, 2), 9150Sstevel@tonic-gate /* 109 */ IF_x86( 9160Sstevel@tonic-gate SYSENT_AP("hrtsys", hrtsys, 5), 9170Sstevel@tonic-gate SYSENT_LOADABLE32()), 91810440SRoger.Faulkner@Sun.COM /* 110 */ SYSENT_CI("utimesys", utimesys, 5), 9194806Sraf /* 111 */ SYSENT_CI("sigresend", sigresend, 3), 9200Sstevel@tonic-gate /* 112 */ SYSENT_CI("priocntlsys", priocntlsys, 5), 9210Sstevel@tonic-gate /* 113 */ SYSENT_CI("pathconf", pathconf, 2), 9220Sstevel@tonic-gate /* 114 */ SYSENT_CI("mincore", mincore, 3), 9230Sstevel@tonic-gate /* 115 */ SYSENT_CI("mmap", smmap32, 6), 9240Sstevel@tonic-gate /* 116 */ SYSENT_CI("mprotect", mprotect, 3), 9250Sstevel@tonic-gate /* 117 */ SYSENT_CI("munmap", munmap, 2), 9260Sstevel@tonic-gate /* 118 */ SYSENT_CI("fpathconf", fpathconf, 2), 9270Sstevel@tonic-gate /* 119 */ SYSENT_2CI("vfork", vfork, 0), 9280Sstevel@tonic-gate /* 120 */ SYSENT_CI("fchdir", fchdir, 1), 9290Sstevel@tonic-gate /* 121 */ SYSENT_CI("readv", readv32, 3), 9300Sstevel@tonic-gate /* 122 */ SYSENT_CI("writev", writev32, 3), 931*11798SRoger.Faulkner@Sun.COM /* 123 */ SYSENT_LOADABLE32(), /* was xstat32 */ 932*11798SRoger.Faulkner@Sun.COM /* 124 */ SYSENT_LOADABLE32(), /* was lxstat32 */ 933*11798SRoger.Faulkner@Sun.COM /* 125 */ SYSENT_LOADABLE32(), /* was fxstat32 */ 934*11798SRoger.Faulkner@Sun.COM /* 126 */ SYSENT_LOADABLE32(), /* was xmknod */ 9358212SMichael.Corcoran@Sun.COM /* 127 */ SYSENT_CI("mmapobj", mmapobjsys, 5), 9360Sstevel@tonic-gate /* 128 */ SYSENT_CI("setrlimit", setrlimit32, 2), 9370Sstevel@tonic-gate /* 129 */ SYSENT_CI("getrlimit", getrlimit32, 2), 9380Sstevel@tonic-gate /* 130 */ SYSENT_CI("lchown", lchown, 3), 9390Sstevel@tonic-gate /* 131 */ SYSENT_CI("memcntl", memcntl, 6), 9400Sstevel@tonic-gate /* 132 */ SYSENT_CI("getpmsg", getpmsg32, 5), 9410Sstevel@tonic-gate /* 133 */ SYSENT_CI("putpmsg", putpmsg32, 5), 9420Sstevel@tonic-gate /* 134 */ SYSENT_CI("rename", rename, 2), 9430Sstevel@tonic-gate /* 135 */ SYSENT_CI("uname", uname, 1), 9440Sstevel@tonic-gate /* 136 */ SYSENT_CI("setegid", setegid, 1), 9450Sstevel@tonic-gate /* 137 */ SYSENT_CI("sysconfig", sysconfig, 1), 9460Sstevel@tonic-gate /* 138 */ SYSENT_CI("adjtime", adjtime, 2), 9470Sstevel@tonic-gate /* 139 */ SYSENT_CI("systeminfo", systeminfo, 3), 9483957Sth199096 /* 140 */ SYSENT_LOADABLE32(), /* sharefs */ 9490Sstevel@tonic-gate /* 141 */ SYSENT_CI("seteuid", seteuid, 1), 9503235Sraf /* 142 */ SYSENT_2CI("forksys", forksys, 2), 951*11798SRoger.Faulkner@Sun.COM /* 143 */ SYSENT_LOADABLE32(), /* (was fork1) */ 9520Sstevel@tonic-gate /* 144 */ SYSENT_CI("sigtimedwait", sigtimedwait, 3), 9530Sstevel@tonic-gate /* 145 */ SYSENT_CI("lwp_info", lwp_info, 1), 9540Sstevel@tonic-gate /* 146 */ SYSENT_CI("yield", yield, 0), 955*11798SRoger.Faulkner@Sun.COM /* 147 */ SYSENT_LOADABLE32(), /* (was lwp_sema_wait) */ 9560Sstevel@tonic-gate /* 148 */ SYSENT_CI("lwp_sema_post", lwp_sema_post, 1), 9570Sstevel@tonic-gate /* 149 */ SYSENT_CI("lwp_sema_trywait", lwp_sema_trywait, 1), 9580Sstevel@tonic-gate /* 150 */ SYSENT_CI("lwp_detach", lwp_detach, 1), 9590Sstevel@tonic-gate /* 151 */ SYSENT_CI("corectl", corectl, 4), 9600Sstevel@tonic-gate /* 152 */ SYSENT_CI("modctl", modctl, 6), 9610Sstevel@tonic-gate /* 153 */ SYSENT_CI("fchroot", fchroot, 1), 962*11798SRoger.Faulkner@Sun.COM /* 154 */ SYSENT_LOADABLE32(), /* (was utimes) */ 9630Sstevel@tonic-gate /* 155 */ SYSENT_CI("vhangup", vhangup, 0), 9640Sstevel@tonic-gate /* 156 */ SYSENT_CI("gettimeofday", gettimeofday, 1), 9650Sstevel@tonic-gate /* 157 */ SYSENT_CI("getitimer", getitimer, 2), 9660Sstevel@tonic-gate /* 158 */ SYSENT_CI("setitimer", setitimer, 3), 9670Sstevel@tonic-gate /* 159 */ SYSENT_CI("lwp_create", syslwp_create, 3), 9680Sstevel@tonic-gate /* 160 */ SYSENT_CI("lwp_exit", (int (*)())syslwp_exit, 0), 9690Sstevel@tonic-gate /* 161 */ SYSENT_CI("lwp_suspend", syslwp_suspend, 1), 9700Sstevel@tonic-gate /* 162 */ SYSENT_CI("lwp_continue", syslwp_continue, 1), 9710Sstevel@tonic-gate /* 163 */ SYSENT_CI("lwp_kill", lwp_kill, 2), 9720Sstevel@tonic-gate /* 164 */ SYSENT_CI("lwp_self", lwp_self, 0), 9730Sstevel@tonic-gate /* 165 */ SYSENT_2CI("lwp_sigmask", lwp_sigmask, 3), 9740Sstevel@tonic-gate /* 166 */ IF_x86( 9750Sstevel@tonic-gate SYSENT_CI("lwp_private", syslwp_private, 3), 9760Sstevel@tonic-gate SYSENT_NOSYS()), 9770Sstevel@tonic-gate /* 167 */ SYSENT_CI("lwp_wait", lwp_wait, 2), 9784574Sraf /* 168 */ SYSENT_CI("lwp_mutex_wakeup", lwp_mutex_wakeup, 2), 979*11798SRoger.Faulkner@Sun.COM /* 169 */ SYSENT_LOADABLE32(), /* (was lwp_mutex_lock) */ 9800Sstevel@tonic-gate /* 170 */ SYSENT_CI("lwp_cond_wait", lwp_cond_wait, 4), 9810Sstevel@tonic-gate /* 171 */ SYSENT_CI("lwp_cond_signal", lwp_cond_signal, 1), 9820Sstevel@tonic-gate /* 172 */ SYSENT_CI("lwp_cond_broadcast", lwp_cond_broadcast, 1), 9830Sstevel@tonic-gate /* 173 */ SYSENT_CI("pread", pread32, 4), 9840Sstevel@tonic-gate /* 174 */ SYSENT_CI("pwrite", pwrite32, 4), 9850Sstevel@tonic-gate /* 175 */ SYSENT_C("llseek", llseek32, 4), 9860Sstevel@tonic-gate /* 176 */ SYSENT_LOADABLE32(), /* inst_sync */ 9872712Snn35248 /* 177 */ SYSENT_CI("brandsys", brandsys, 6), 9880Sstevel@tonic-gate /* 178 */ SYSENT_LOADABLE32(), /* kaio */ 9890Sstevel@tonic-gate /* 179 */ SYSENT_LOADABLE32(), /* cpc */ 9900Sstevel@tonic-gate /* 180 */ SYSENT_CI("lgrpsys", lgrpsys, 3), 9913247Sgjelinek /* 181 */ SYSENT_CI("rusagesys", rusagesys, 5), 9920Sstevel@tonic-gate /* 182 */ SYSENT_LOADABLE32(), /* portfs */ 9930Sstevel@tonic-gate /* 183 */ SYSENT_CI("pollsys", pollsys, 4), 9941676Sjpk /* 184 */ SYSENT_CI("labelsys", labelsys, 5), 9950Sstevel@tonic-gate /* 185 */ SYSENT_CI("acl", acl, 4), 9960Sstevel@tonic-gate /* 186 */ SYSENT_AP("auditsys", auditsys, 2), 9970Sstevel@tonic-gate /* 187 */ SYSENT_CI("processor_bind", processor_bind, 4), 9980Sstevel@tonic-gate /* 188 */ SYSENT_CI("processor_info", processor_info, 2), 9990Sstevel@tonic-gate /* 189 */ SYSENT_CI("p_online", p_online, 2), 10002248Sraf /* 190 */ SYSENT_CI("sigqueue", sigqueue32, 5), 10010Sstevel@tonic-gate /* 191 */ SYSENT_CI("clock_gettime", clock_gettime, 2), 10020Sstevel@tonic-gate /* 192 */ SYSENT_CI("clock_settime", clock_settime, 2), 10030Sstevel@tonic-gate /* 193 */ SYSENT_CI("clock_getres", clock_getres, 2), 10040Sstevel@tonic-gate /* 194 */ SYSENT_CI("timer_create", timer_create, 3), 10050Sstevel@tonic-gate /* 195 */ SYSENT_CI("timer_delete", timer_delete, 1), 10060Sstevel@tonic-gate /* 196 */ SYSENT_CI("timer_settime", timer_settime, 4), 10070Sstevel@tonic-gate /* 197 */ SYSENT_CI("timer_gettime", timer_gettime, 2), 10080Sstevel@tonic-gate /* 198 */ SYSENT_CI("timer_getoverrun", timer_getoverrun, 1), 10090Sstevel@tonic-gate /* 199 */ SYSENT_CI("nanosleep", nanosleep, 2), 10100Sstevel@tonic-gate /* 200 */ SYSENT_CI("facl", facl, 4), 10110Sstevel@tonic-gate /* 201 */ SYSENT_LOADABLE32(), /* door */ 10120Sstevel@tonic-gate /* 202 */ SYSENT_CI("setreuid", setreuid, 2), 10130Sstevel@tonic-gate /* 203 */ SYSENT_CI("setregid", setregid, 2), 10140Sstevel@tonic-gate /* 204 */ SYSENT_CI("install_utrap", install_utrap, 3), 10150Sstevel@tonic-gate /* 205 */ SYSENT_CI("signotify", signotify, 3), 10160Sstevel@tonic-gate /* 206 */ SYSENT_CI("schedctl", schedctl, 0), 10170Sstevel@tonic-gate /* 207 */ SYSENT_LOADABLE32(), /* pset */ 10180Sstevel@tonic-gate /* 208 */ SYSENT_LOADABLE32(), 10190Sstevel@tonic-gate /* 209 */ SYSENT_CI("resolvepath", resolvepath, 3), 102010887SRoger.Faulkner@Sun.COM /* 210 */ SYSENT_CI("lwp_mutex_timedlock", lwp_mutex_timedlock, 3), 10210Sstevel@tonic-gate /* 211 */ SYSENT_CI("lwp_sema_timedwait", lwp_sema_timedwait, 3), 10220Sstevel@tonic-gate /* 212 */ SYSENT_CI("lwp_rwlock_sys", lwp_rwlock_sys, 3), 10230Sstevel@tonic-gate /* 10240Sstevel@tonic-gate * Syscalls 213-225: 32-bit system call support for large files. 10250Sstevel@tonic-gate */ 10260Sstevel@tonic-gate /* 213 */ SYSENT_CI("getdents64", getdents64, 3), 10270Sstevel@tonic-gate /* 214 */ SYSENT_AP("smmaplf32", smmaplf32, 7), 10280Sstevel@tonic-gate /* 215 */ SYSENT_CI("stat64", stat64_32, 2), 10290Sstevel@tonic-gate /* 216 */ SYSENT_CI("lstat64", lstat64_32, 2), 10300Sstevel@tonic-gate /* 217 */ SYSENT_CI("fstat64", fstat64_32, 2), 10310Sstevel@tonic-gate /* 218 */ SYSENT_CI("statvfs64", statvfs64_32, 2), 10320Sstevel@tonic-gate /* 219 */ SYSENT_CI("fstatvfs64", fstatvfs64_32, 2), 10330Sstevel@tonic-gate /* 220 */ SYSENT_CI("setrlimit64", setrlimit64, 2), 10340Sstevel@tonic-gate /* 221 */ SYSENT_CI("getrlimit64", getrlimit64, 2), 10350Sstevel@tonic-gate /* 222 */ SYSENT_CI("pread64", pread64, 5), 10360Sstevel@tonic-gate /* 223 */ SYSENT_CI("pwrite64", pwrite64, 5), 1037*11798SRoger.Faulkner@Sun.COM /* 224 */ SYSENT_LOADABLE32(), /* (was creat64) */ 10380Sstevel@tonic-gate /* 225 */ SYSENT_CI("open64", open64, 3), 10390Sstevel@tonic-gate /* 226 */ SYSENT_LOADABLE32(), /* rpcsys */ 10400Sstevel@tonic-gate /* 227 */ SYSENT_CI("zone", zone, 6), 10410Sstevel@tonic-gate /* 228 */ SYSENT_LOADABLE32(), /* autofssys */ 10420Sstevel@tonic-gate /* 229 */ SYSENT_CI("getcwd", getcwd, 2), 10430Sstevel@tonic-gate /* 230 */ SYSENT_CI("so_socket", so_socket, 5), 10440Sstevel@tonic-gate /* 231 */ SYSENT_CI("so_socketpair", so_socketpair, 1), 10450Sstevel@tonic-gate /* 232 */ SYSENT_CI("bind", bind, 4), 10460Sstevel@tonic-gate /* 233 */ SYSENT_CI("listen", listen, 3), 10470Sstevel@tonic-gate /* 234 */ SYSENT_CI("accept", accept, 4), 10480Sstevel@tonic-gate /* 235 */ SYSENT_CI("connect", connect, 4), 10490Sstevel@tonic-gate /* 236 */ SYSENT_CI("shutdown", shutdown, 3), 10500Sstevel@tonic-gate /* 237 */ SYSENT_CI("recv", recv32, 4), 10510Sstevel@tonic-gate /* 238 */ SYSENT_CI("recvfrom", recvfrom32, 6), 10520Sstevel@tonic-gate /* 239 */ SYSENT_CI("recvmsg", recvmsg, 3), 10530Sstevel@tonic-gate /* 240 */ SYSENT_CI("send", send32, 4), 10540Sstevel@tonic-gate /* 241 */ SYSENT_CI("sendmsg", sendmsg, 3), 10550Sstevel@tonic-gate /* 242 */ SYSENT_CI("sendto", sendto32, 6), 10560Sstevel@tonic-gate /* 243 */ SYSENT_CI("getpeername", getpeername, 4), 10570Sstevel@tonic-gate /* 244 */ SYSENT_CI("getsockname", getsockname, 4), 10580Sstevel@tonic-gate /* 245 */ SYSENT_CI("getsockopt", getsockopt, 6), 10590Sstevel@tonic-gate /* 246 */ SYSENT_CI("setsockopt", setsockopt, 6), 10600Sstevel@tonic-gate /* 247 */ SYSENT_CI("sockconfig", sockconfig, 4), 10610Sstevel@tonic-gate /* 248 */ SYSENT_CI("ntp_gettime", ntp_gettime, 1), 10620Sstevel@tonic-gate /* 249 */ SYSENT_CI("ntp_adjtime", ntp_adjtime, 1), 10630Sstevel@tonic-gate /* 250 */ SYSENT_CI("lwp_mutex_unlock", lwp_mutex_unlock, 1), 106410887SRoger.Faulkner@Sun.COM /* 251 */ SYSENT_CI("lwp_mutex_trylock", lwp_mutex_trylock, 2), 10659264SRoger.Faulkner@Sun.COM /* 252 */ SYSENT_CI("lwp_mutex_register", lwp_mutex_register, 2), 10660Sstevel@tonic-gate /* 253 */ SYSENT_CI("cladm", cladm, 3), 10672712Snn35248 /* 254 */ SYSENT_CI("uucopy", uucopy, 3), 10680Sstevel@tonic-gate /* 255 */ SYSENT_CI("umount2", umount2, 2) 10690Sstevel@tonic-gate /* ONC_PLUS EXTRACT START */ 10700Sstevel@tonic-gate }; 10710Sstevel@tonic-gate /* ONC_PLUS EXTRACT END */ 10720Sstevel@tonic-gate #endif /* _SYSCALL32_IMPL */ 10730Sstevel@tonic-gate 10740Sstevel@tonic-gate /* 10750Sstevel@tonic-gate * Space allocated and initialized in init_syscallnames(). 10760Sstevel@tonic-gate */ 10770Sstevel@tonic-gate char **syscallnames; 10780Sstevel@tonic-gate 10790Sstevel@tonic-gate systrace_sysent_t *systrace_sysent; 10800Sstevel@tonic-gate void (*systrace_probe)(dtrace_id_t, uintptr_t, uintptr_t, 10812769Sahl uintptr_t, uintptr_t, uintptr_t, uintptr_t); 10820Sstevel@tonic-gate 10830Sstevel@tonic-gate /*ARGSUSED*/ 10840Sstevel@tonic-gate void 10850Sstevel@tonic-gate systrace_stub(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, 10862769Sahl uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5) 10870Sstevel@tonic-gate {} 10880Sstevel@tonic-gate 10890Sstevel@tonic-gate /*ARGSUSED*/ 10900Sstevel@tonic-gate int64_t 10910Sstevel@tonic-gate dtrace_systrace_syscall(uintptr_t arg0, uintptr_t arg1, uintptr_t arg2, 10920Sstevel@tonic-gate uintptr_t arg3, uintptr_t arg4, uintptr_t arg5) 10930Sstevel@tonic-gate { 10940Sstevel@tonic-gate systrace_sysent_t *sy = &systrace_sysent[curthread->t_sysnum]; 10950Sstevel@tonic-gate dtrace_id_t id; 10960Sstevel@tonic-gate int64_t rval; 10970Sstevel@tonic-gate proc_t *p; 10980Sstevel@tonic-gate 10990Sstevel@tonic-gate if ((id = sy->stsy_entry) != DTRACE_IDNONE) 11002769Sahl (*systrace_probe)(id, arg0, arg1, arg2, arg3, arg4, arg5); 11010Sstevel@tonic-gate 11020Sstevel@tonic-gate /* 11030Sstevel@tonic-gate * We want to explicitly allow DTrace consumers to stop a process 11040Sstevel@tonic-gate * before it actually executes the meat of the syscall. 11050Sstevel@tonic-gate */ 11060Sstevel@tonic-gate p = ttoproc(curthread); 11070Sstevel@tonic-gate mutex_enter(&p->p_lock); 11080Sstevel@tonic-gate if (curthread->t_dtrace_stop && !curthread->t_lwp->lwp_nostop) { 11090Sstevel@tonic-gate curthread->t_dtrace_stop = 0; 11100Sstevel@tonic-gate stop(PR_REQUESTED, 0); 11110Sstevel@tonic-gate } 11120Sstevel@tonic-gate mutex_exit(&p->p_lock); 11130Sstevel@tonic-gate 11140Sstevel@tonic-gate rval = (*sy->stsy_underlying)(arg0, arg1, arg2, arg3, arg4, arg5); 11150Sstevel@tonic-gate 11160Sstevel@tonic-gate if (ttolwp(curthread)->lwp_errno != 0) 11170Sstevel@tonic-gate rval = -1; 11180Sstevel@tonic-gate 11190Sstevel@tonic-gate if ((id = sy->stsy_return) != DTRACE_IDNONE) 11200Sstevel@tonic-gate (*systrace_probe)(id, (uintptr_t)rval, (uintptr_t)rval, 11212769Sahl (uintptr_t)((int64_t)rval >> 32), 0, 0, 0); 11220Sstevel@tonic-gate 11230Sstevel@tonic-gate return (rval); 11240Sstevel@tonic-gate } 11250Sstevel@tonic-gate 11260Sstevel@tonic-gate #ifdef _SYSCALL32_IMPL 11270Sstevel@tonic-gate 11280Sstevel@tonic-gate systrace_sysent_t *systrace_sysent32; 11290Sstevel@tonic-gate 11300Sstevel@tonic-gate /*ARGSUSED*/ 11310Sstevel@tonic-gate int64_t 11320Sstevel@tonic-gate dtrace_systrace_syscall32(uintptr_t arg0, uintptr_t arg1, uintptr_t arg2, 11330Sstevel@tonic-gate uintptr_t arg3, uintptr_t arg4, uintptr_t arg5) 11340Sstevel@tonic-gate { 11350Sstevel@tonic-gate systrace_sysent_t *sy = &systrace_sysent32[curthread->t_sysnum]; 11360Sstevel@tonic-gate dtrace_id_t id; 11370Sstevel@tonic-gate int64_t rval; 11380Sstevel@tonic-gate proc_t *p; 11390Sstevel@tonic-gate 11400Sstevel@tonic-gate if ((id = sy->stsy_entry) != DTRACE_IDNONE) 11412769Sahl (*systrace_probe)(id, arg0, arg1, arg2, arg3, arg4, arg5); 11420Sstevel@tonic-gate 11430Sstevel@tonic-gate /* 11440Sstevel@tonic-gate * We want to explicitly allow DTrace consumers to stop a process 11450Sstevel@tonic-gate * before it actually executes the meat of the syscall. 11460Sstevel@tonic-gate */ 11470Sstevel@tonic-gate p = ttoproc(curthread); 11480Sstevel@tonic-gate mutex_enter(&p->p_lock); 11490Sstevel@tonic-gate if (curthread->t_dtrace_stop && !curthread->t_lwp->lwp_nostop) { 11500Sstevel@tonic-gate curthread->t_dtrace_stop = 0; 11510Sstevel@tonic-gate stop(PR_REQUESTED, 0); 11520Sstevel@tonic-gate } 11530Sstevel@tonic-gate mutex_exit(&p->p_lock); 11540Sstevel@tonic-gate 11550Sstevel@tonic-gate rval = (*sy->stsy_underlying)(arg0, arg1, arg2, arg3, arg4, arg5); 11560Sstevel@tonic-gate 11570Sstevel@tonic-gate if (ttolwp(curthread)->lwp_errno != 0) 11580Sstevel@tonic-gate rval = -1; 11590Sstevel@tonic-gate 11600Sstevel@tonic-gate if ((id = sy->stsy_return) != DTRACE_IDNONE) 11610Sstevel@tonic-gate (*systrace_probe)(id, (uintptr_t)rval, (uintptr_t)rval, 11622769Sahl (uintptr_t)((uint64_t)rval >> 32), 0, 0, 0); 11630Sstevel@tonic-gate 11640Sstevel@tonic-gate return (rval); 11650Sstevel@tonic-gate } 11660Sstevel@tonic-gate 11670Sstevel@tonic-gate #endif 11680Sstevel@tonic-gate 11690Sstevel@tonic-gate void 11700Sstevel@tonic-gate dtrace_systrace_rtt(void) 11710Sstevel@tonic-gate { 11720Sstevel@tonic-gate systrace_sysent_t *sy; 11730Sstevel@tonic-gate dtrace_id_t id; 11740Sstevel@tonic-gate 11750Sstevel@tonic-gate if (get_udatamodel() == DATAMODEL_NATIVE) { 11760Sstevel@tonic-gate if (systrace_sysent == NULL) 11770Sstevel@tonic-gate return; 11780Sstevel@tonic-gate 11790Sstevel@tonic-gate sy = &systrace_sysent[curthread->t_sysnum]; 11800Sstevel@tonic-gate #ifdef _SYSCALL32_IMPL 11810Sstevel@tonic-gate } else { 11820Sstevel@tonic-gate if (systrace_sysent32 == NULL) 11830Sstevel@tonic-gate return; 11840Sstevel@tonic-gate 11850Sstevel@tonic-gate sy = &systrace_sysent32[curthread->t_sysnum]; 11860Sstevel@tonic-gate #endif 11870Sstevel@tonic-gate } 11880Sstevel@tonic-gate 11890Sstevel@tonic-gate if ((id = sy->stsy_return) != DTRACE_IDNONE) 11902769Sahl (*systrace_probe)(id, 0, 0, 0, 0, 0, 0); 11910Sstevel@tonic-gate } 1192