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 */ 213235Sraf 220Sstevel@tonic-gate /* 233448Sdh155122 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 280Sstevel@tonic-gate /* All Rights Reserved */ 290Sstevel@tonic-gate 300Sstevel@tonic-gate #ifndef _SYS_SYSCALL_H 310Sstevel@tonic-gate #define _SYS_SYSCALL_H 320Sstevel@tonic-gate 330Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 340Sstevel@tonic-gate 350Sstevel@tonic-gate #ifdef __cplusplus 360Sstevel@tonic-gate extern "C" { 370Sstevel@tonic-gate #endif 380Sstevel@tonic-gate 390Sstevel@tonic-gate /* 400Sstevel@tonic-gate * system call numbers 410Sstevel@tonic-gate * syscall(SYS_xxxx, ...) 420Sstevel@tonic-gate */ 430Sstevel@tonic-gate 440Sstevel@tonic-gate /* syscall enumeration MUST begin with 1 */ 450Sstevel@tonic-gate 460Sstevel@tonic-gate /* 470Sstevel@tonic-gate * SunOS/SPARC uses 0 for the indirect system call SYS_syscall 480Sstevel@tonic-gate * but this doesn't count because it is just another way 490Sstevel@tonic-gate * to specify the real system call number. 500Sstevel@tonic-gate */ 510Sstevel@tonic-gate 520Sstevel@tonic-gate #define SYS_syscall 0 530Sstevel@tonic-gate #define SYS_exit 1 540Sstevel@tonic-gate #define SYS_forkall 2 550Sstevel@tonic-gate #define SYS_read 3 560Sstevel@tonic-gate #define SYS_write 4 570Sstevel@tonic-gate #define SYS_open 5 580Sstevel@tonic-gate #define SYS_close 6 590Sstevel@tonic-gate #define SYS_wait 7 600Sstevel@tonic-gate #define SYS_creat 8 610Sstevel@tonic-gate #define SYS_link 9 620Sstevel@tonic-gate #define SYS_unlink 10 630Sstevel@tonic-gate #define SYS_exec 11 640Sstevel@tonic-gate #define SYS_chdir 12 650Sstevel@tonic-gate #define SYS_time 13 660Sstevel@tonic-gate #define SYS_mknod 14 670Sstevel@tonic-gate #define SYS_chmod 15 680Sstevel@tonic-gate #define SYS_chown 16 690Sstevel@tonic-gate #define SYS_brk 17 700Sstevel@tonic-gate #define SYS_stat 18 710Sstevel@tonic-gate #define SYS_lseek 19 720Sstevel@tonic-gate #define SYS_getpid 20 730Sstevel@tonic-gate #define SYS_mount 21 740Sstevel@tonic-gate #define SYS_umount 22 750Sstevel@tonic-gate #define SYS_setuid 23 760Sstevel@tonic-gate #define SYS_getuid 24 770Sstevel@tonic-gate #define SYS_stime 25 780Sstevel@tonic-gate #define SYS_pcsample 26 790Sstevel@tonic-gate #define SYS_alarm 27 800Sstevel@tonic-gate #define SYS_fstat 28 810Sstevel@tonic-gate #define SYS_pause 29 820Sstevel@tonic-gate #define SYS_utime 30 830Sstevel@tonic-gate #define SYS_stty 31 840Sstevel@tonic-gate #define SYS_gtty 32 850Sstevel@tonic-gate #define SYS_access 33 860Sstevel@tonic-gate #define SYS_nice 34 870Sstevel@tonic-gate #define SYS_statfs 35 880Sstevel@tonic-gate #define SYS_sync 36 890Sstevel@tonic-gate #define SYS_kill 37 900Sstevel@tonic-gate #define SYS_fstatfs 38 910Sstevel@tonic-gate #define SYS_pgrpsys 39 920Sstevel@tonic-gate /* 930Sstevel@tonic-gate * subcodes: 940Sstevel@tonic-gate * getpgrp() :: syscall(39,0) 950Sstevel@tonic-gate * setpgrp() :: syscall(39,1) 960Sstevel@tonic-gate * getsid(pid) :: syscall(39,2,pid) 970Sstevel@tonic-gate * setsid() :: syscall(39,3) 980Sstevel@tonic-gate * getpgid(pid) :: syscall(39,4,pid) 990Sstevel@tonic-gate * setpgid(pid,pgid) :: syscall(39,5,pid,pgid) 1000Sstevel@tonic-gate */ 1012712Snn35248 #define SYS_uucopystr 40 1020Sstevel@tonic-gate #define SYS_dup 41 1030Sstevel@tonic-gate #define SYS_pipe 42 1040Sstevel@tonic-gate #define SYS_times 43 1050Sstevel@tonic-gate #define SYS_profil 44 1060Sstevel@tonic-gate #define SYS_plock 45 1070Sstevel@tonic-gate #define SYS_setgid 46 1080Sstevel@tonic-gate #define SYS_getgid 47 1090Sstevel@tonic-gate #define SYS_signal 48 1100Sstevel@tonic-gate /* 1110Sstevel@tonic-gate * subcodes: 1120Sstevel@tonic-gate * signal(sig, f) :: signal(sig, f) ((sig&SIGNO_MASK) == sig) 1130Sstevel@tonic-gate * sigset(sig, f) :: signal(sig|SIGDEFER, f) 1140Sstevel@tonic-gate * sighold(sig) :: signal(sig|SIGHOLD) 1150Sstevel@tonic-gate * sigrelse(sig) :: signal(sig|SIGRELSE) 1160Sstevel@tonic-gate * sigignore(sig) :: signal(sig|SIGIGNORE) 1170Sstevel@tonic-gate * sigpause(sig) :: signal(sig|SIGPAUSE) 1180Sstevel@tonic-gate * see <sys/signal.h> 1190Sstevel@tonic-gate */ 1200Sstevel@tonic-gate #define SYS_msgsys 49 1210Sstevel@tonic-gate /* 1220Sstevel@tonic-gate * subcodes: 1230Sstevel@tonic-gate * msgget(...) :: msgsys(0, ...) 1240Sstevel@tonic-gate * msgctl(...) :: msgsys(1, ...) 1250Sstevel@tonic-gate * msgrcv(...) :: msgsys(2, ...) 1260Sstevel@tonic-gate * msgsnd(...) :: msgsys(3, ...) 1270Sstevel@tonic-gate * msgids(...) :: msgsys(4, ...) 1280Sstevel@tonic-gate * msgsnap(...) :: msgsys(5, ...) 1290Sstevel@tonic-gate * see <sys/msg.h> 1300Sstevel@tonic-gate */ 1310Sstevel@tonic-gate #define SYS_syssun 50 1320Sstevel@tonic-gate #define SYS_sysi86 50 1330Sstevel@tonic-gate /* 1340Sstevel@tonic-gate * subcodes: 1350Sstevel@tonic-gate * syssun(code, ...) 1360Sstevel@tonic-gate * see <sys/sys3b.h> 1370Sstevel@tonic-gate */ 1380Sstevel@tonic-gate #define SYS_acct 51 1390Sstevel@tonic-gate #define SYS_shmsys 52 1400Sstevel@tonic-gate /* 1410Sstevel@tonic-gate * subcodes: 1420Sstevel@tonic-gate * shmat (...) :: shmsys(0, ...) 1430Sstevel@tonic-gate * shmctl(...) :: shmsys(1, ...) 1440Sstevel@tonic-gate * shmdt (...) :: shmsys(2, ...) 1450Sstevel@tonic-gate * shmget(...) :: shmsys(3, ...) 1460Sstevel@tonic-gate * shmids(...) :: shmsys(4, ...) 1470Sstevel@tonic-gate * see <sys/shm.h> 1480Sstevel@tonic-gate */ 1490Sstevel@tonic-gate #define SYS_semsys 53 1500Sstevel@tonic-gate /* 1510Sstevel@tonic-gate * subcodes: 1520Sstevel@tonic-gate * semctl(...) :: semsys(0, ...) 1530Sstevel@tonic-gate * semget(...) :: semsys(1, ...) 1540Sstevel@tonic-gate * semop (...) :: semsys(2, ...) 1550Sstevel@tonic-gate * semids(...) :: semsys(3, ...) 1560Sstevel@tonic-gate * semtimedop(...) :: semsys(4, ...) 1570Sstevel@tonic-gate * see <sys/sem.h> 1580Sstevel@tonic-gate */ 1590Sstevel@tonic-gate #define SYS_ioctl 54 1600Sstevel@tonic-gate #define SYS_uadmin 55 1610Sstevel@tonic-gate #define SYS_utssys 57 1620Sstevel@tonic-gate /* 1630Sstevel@tonic-gate * subcodes (third argument): 1640Sstevel@tonic-gate * uname(obuf) (obsolete) :: syscall(57, obuf, ign, 0) 1650Sstevel@tonic-gate * subcode 1 unused 1660Sstevel@tonic-gate * ustat(dev, obuf) :: syscall(57, obuf, dev, 2) 1670Sstevel@tonic-gate * fusers(path, flags, obuf) :: syscall(57, path, flags, 3, obuf) 1680Sstevel@tonic-gate * see <sys/utssys.h> 1690Sstevel@tonic-gate */ 1700Sstevel@tonic-gate #define SYS_fdsync 58 1710Sstevel@tonic-gate #define SYS_execve 59 1720Sstevel@tonic-gate #define SYS_umask 60 1730Sstevel@tonic-gate #define SYS_chroot 61 1740Sstevel@tonic-gate #define SYS_fcntl 62 1750Sstevel@tonic-gate #define SYS_ulimit 63 1760Sstevel@tonic-gate #define SYS_reserved_64 64 /* 64 reserved */ 1770Sstevel@tonic-gate #define SYS_reserved_65 65 /* 65 reserved */ 1780Sstevel@tonic-gate #define SYS_reserved_66 66 /* 66 reserved */ 1790Sstevel@tonic-gate #define SYS_reserved_67 67 /* 67 reserved */ 1800Sstevel@tonic-gate #define SYS_reserved_68 68 /* 68 reserved */ 1810Sstevel@tonic-gate #define SYS_reserved_69 69 /* 69 reserved */ 1820Sstevel@tonic-gate #define SYS_tasksys 70 1830Sstevel@tonic-gate /* 1840Sstevel@tonic-gate * subcodes: 1850Sstevel@tonic-gate * settaskid(...) :: tasksys(0, ...) 1860Sstevel@tonic-gate * gettaskid(...) :: tasksys(1, ...) 1870Sstevel@tonic-gate * getprojid(...) :: tasksys(2, ...) 1880Sstevel@tonic-gate */ 1890Sstevel@tonic-gate #define SYS_acctctl 71 1900Sstevel@tonic-gate #define SYS_exacctsys 72 1910Sstevel@tonic-gate /* 1920Sstevel@tonic-gate * subcodes: 1930Sstevel@tonic-gate * getacct(...) :: exacct(0, ...) 1940Sstevel@tonic-gate * putacct(...) :: exacct(1, ...) 1950Sstevel@tonic-gate * wracct(...) :: exacct(2, ...) 1960Sstevel@tonic-gate */ 1970Sstevel@tonic-gate #define SYS_getpagesizes 73 1980Sstevel@tonic-gate #define SYS_rctlsys 74 1990Sstevel@tonic-gate /* 2000Sstevel@tonic-gate * subcodes: 2010Sstevel@tonic-gate * getrctl(...) :: rctlsys(0, ...) 2020Sstevel@tonic-gate * setrctl(...) :: rctlsys(1, ...) 2030Sstevel@tonic-gate * rctllist(...) :: rctlsys(2, ...) 2040Sstevel@tonic-gate * rctlctl(...) :: rctlsys(3, ...) 2050Sstevel@tonic-gate */ 2064321Scasper #define SYS_sidsys 75 2074321Scasper /* 2084321Scasper * subcodes: 2094321Scasper * allocids(...) :: sidsys(0, ...) 2104321Scasper * idmap_reg(...) :: sidsys(1, ...) 2114321Scasper * idmap_unreg(...) :: sidsys(2, ...) 2124321Scasper */ 2130Sstevel@tonic-gate #define SYS_fsat 76 2140Sstevel@tonic-gate /* 2150Sstevel@tonic-gate * subcodes: 2160Sstevel@tonic-gate * openat(...) :: fsat(0, ...) 2170Sstevel@tonic-gate * openat64(...) :: fsat(1, ...) 2180Sstevel@tonic-gate * fstatat64(...) :: fsat(2, ...) 2190Sstevel@tonic-gate * fstatat(...) :: fsat(3, ...) 2200Sstevel@tonic-gate * renameat(...) :: fsat(4, ...) 2210Sstevel@tonic-gate * fchownat(...) :: fsat(5, ...) 2220Sstevel@tonic-gate * unlinkat(...) :: fsat(6, ...) 2230Sstevel@tonic-gate * futimesat(...) :: fsat(7, ...) 2240Sstevel@tonic-gate */ 2250Sstevel@tonic-gate #define SYS_lwp_park 77 2260Sstevel@tonic-gate /* 2270Sstevel@tonic-gate * subcodes: 2280Sstevel@tonic-gate * _lwp_park(timespec_t *, lwpid_t) :: syslwp_park(0, ...) 2290Sstevel@tonic-gate * _lwp_unpark(lwpid_t, int) :: syslwp_park(1, ...) 2300Sstevel@tonic-gate * _lwp_unpark_all(lwpid_t *, int) :: syslwp_park(2, ...) 2314389Ssl108498 * _lwp_unpark_cancel(lwpid_t *, int) :: syslwp_park(3, ...) 2324389Ssl108498 * _lwp_set_park(lwpid_t *, int) :: syslwp_park(4, ...) 2330Sstevel@tonic-gate */ 2340Sstevel@tonic-gate #define SYS_sendfilev 78 2350Sstevel@tonic-gate /* 2360Sstevel@tonic-gate * subcodes : 2370Sstevel@tonic-gate * sendfilev() :: sendfilev(0, ...) 2380Sstevel@tonic-gate * sendfilev64() :: sendfilev(1, ...) 2390Sstevel@tonic-gate */ 2400Sstevel@tonic-gate #define SYS_rmdir 79 2410Sstevel@tonic-gate #define SYS_mkdir 80 2420Sstevel@tonic-gate #define SYS_getdents 81 2430Sstevel@tonic-gate #define SYS_privsys 82 2440Sstevel@tonic-gate /* 2450Sstevel@tonic-gate * subcodes: 2460Sstevel@tonic-gate * setppriv(...) :: privsys(0, ...) 2470Sstevel@tonic-gate * getppriv(...) :: privsys(1, ...) 2480Sstevel@tonic-gate * getimplinfo(...) :: privsys(2, ...) 2490Sstevel@tonic-gate * setpflags(...) :: privsys(3, ...) 2500Sstevel@tonic-gate * getpflags(...) :: privsys(4, ...) 2514321Scasper * issetugid(); :: privsys(5) 2520Sstevel@tonic-gate */ 2530Sstevel@tonic-gate #define SYS_ucredsys 83 2540Sstevel@tonic-gate /* 2550Sstevel@tonic-gate * subcodes: 2560Sstevel@tonic-gate * ucred_get(...) :: ucredsys(0, ...) 2570Sstevel@tonic-gate * getpeerucred(...) :: ucredsys(1, ...) 2580Sstevel@tonic-gate */ 2590Sstevel@tonic-gate #define SYS_sysfs 84 2600Sstevel@tonic-gate /* 2610Sstevel@tonic-gate * subcodes: 2620Sstevel@tonic-gate * sysfs(code, ...) 2630Sstevel@tonic-gate * see <sys/fstyp.h> 2640Sstevel@tonic-gate */ 2650Sstevel@tonic-gate #define SYS_getmsg 85 2660Sstevel@tonic-gate #define SYS_putmsg 86 2670Sstevel@tonic-gate #define SYS_poll 87 2680Sstevel@tonic-gate 2690Sstevel@tonic-gate #define SYS_lstat 88 2700Sstevel@tonic-gate #define SYS_symlink 89 2710Sstevel@tonic-gate #define SYS_readlink 90 2720Sstevel@tonic-gate #define SYS_setgroups 91 2730Sstevel@tonic-gate #define SYS_getgroups 92 2740Sstevel@tonic-gate #define SYS_fchmod 93 2750Sstevel@tonic-gate #define SYS_fchown 94 2760Sstevel@tonic-gate #define SYS_sigprocmask 95 2770Sstevel@tonic-gate #define SYS_sigsuspend 96 2780Sstevel@tonic-gate #define SYS_sigaltstack 97 2790Sstevel@tonic-gate #define SYS_sigaction 98 2800Sstevel@tonic-gate #define SYS_sigpending 99 2810Sstevel@tonic-gate /* 2820Sstevel@tonic-gate * subcodes: 2830Sstevel@tonic-gate * subcode 0 unused 2840Sstevel@tonic-gate * sigpending(...) :: syscall(99, 1, ...) 2850Sstevel@tonic-gate * sigfillset(...) :: syscall(99, 2, ...) 2860Sstevel@tonic-gate */ 2870Sstevel@tonic-gate #define SYS_context 100 2880Sstevel@tonic-gate /* 2890Sstevel@tonic-gate * subcodes: 2900Sstevel@tonic-gate * getcontext(...) :: syscall(100, 0, ...) 2910Sstevel@tonic-gate * setcontext(...) :: syscall(100, 1, ...) 2920Sstevel@tonic-gate */ 2930Sstevel@tonic-gate #define SYS_evsys 101 2940Sstevel@tonic-gate #define SYS_evtrapret 102 2950Sstevel@tonic-gate #define SYS_statvfs 103 2960Sstevel@tonic-gate #define SYS_fstatvfs 104 2970Sstevel@tonic-gate #define SYS_getloadavg 105 2980Sstevel@tonic-gate #define SYS_nfssys 106 2990Sstevel@tonic-gate #define SYS_waitsys 107 3000Sstevel@tonic-gate #define SYS_sigsendsys 108 3010Sstevel@tonic-gate #define SYS_hrtsys 109 302*4806Sraf #define SYS_sigresend 111 3030Sstevel@tonic-gate #define SYS_priocntlsys 112 3040Sstevel@tonic-gate #define SYS_pathconf 113 3050Sstevel@tonic-gate #define SYS_mincore 114 3060Sstevel@tonic-gate #define SYS_mmap 115 3070Sstevel@tonic-gate #define SYS_mprotect 116 3080Sstevel@tonic-gate #define SYS_munmap 117 3090Sstevel@tonic-gate #define SYS_fpathconf 118 3100Sstevel@tonic-gate #define SYS_vfork 119 3110Sstevel@tonic-gate #define SYS_fchdir 120 3120Sstevel@tonic-gate #define SYS_readv 121 3130Sstevel@tonic-gate #define SYS_writev 122 3140Sstevel@tonic-gate #define SYS_xstat 123 3150Sstevel@tonic-gate #define SYS_lxstat 124 3160Sstevel@tonic-gate #define SYS_fxstat 125 3170Sstevel@tonic-gate #define SYS_xmknod 126 3180Sstevel@tonic-gate #define SYS_setrlimit 128 3190Sstevel@tonic-gate #define SYS_getrlimit 129 3200Sstevel@tonic-gate #define SYS_lchown 130 3210Sstevel@tonic-gate #define SYS_memcntl 131 3220Sstevel@tonic-gate #define SYS_getpmsg 132 3230Sstevel@tonic-gate #define SYS_putpmsg 133 3240Sstevel@tonic-gate #define SYS_rename 134 3250Sstevel@tonic-gate #define SYS_uname 135 3260Sstevel@tonic-gate #define SYS_setegid 136 3270Sstevel@tonic-gate #define SYS_sysconfig 137 3280Sstevel@tonic-gate #define SYS_adjtime 138 3290Sstevel@tonic-gate #define SYS_systeminfo 139 3303957Sth199096 #define SYS_sharefs 140 3310Sstevel@tonic-gate #define SYS_seteuid 141 3323235Sraf #define SYS_forksys 142 3333235Sraf /* 3343235Sraf * subcodes: 3353235Sraf * forkx(flags) :: forksys(0, flags) 3363235Sraf * forkallx(flags) :: forksys(1, flags) 3373235Sraf * vforkx(flags) :: forksys(2, flags) 3383235Sraf */ 3390Sstevel@tonic-gate #define SYS_fork1 143 3400Sstevel@tonic-gate #define SYS_sigtimedwait 144 3410Sstevel@tonic-gate #define SYS_lwp_info 145 3420Sstevel@tonic-gate #define SYS_yield 146 3430Sstevel@tonic-gate #define SYS_lwp_sema_wait 147 3440Sstevel@tonic-gate #define SYS_lwp_sema_post 148 3450Sstevel@tonic-gate #define SYS_lwp_sema_trywait 149 3460Sstevel@tonic-gate #define SYS_lwp_detach 150 3470Sstevel@tonic-gate #define SYS_corectl 151 3480Sstevel@tonic-gate #define SYS_modctl 152 3490Sstevel@tonic-gate #define SYS_fchroot 153 3500Sstevel@tonic-gate #define SYS_utimes 154 3510Sstevel@tonic-gate #define SYS_vhangup 155 3520Sstevel@tonic-gate #define SYS_gettimeofday 156 3530Sstevel@tonic-gate #define SYS_getitimer 157 3540Sstevel@tonic-gate #define SYS_setitimer 158 3550Sstevel@tonic-gate #define SYS_lwp_create 159 3560Sstevel@tonic-gate #define SYS_lwp_exit 160 3570Sstevel@tonic-gate #define SYS_lwp_suspend 161 3580Sstevel@tonic-gate #define SYS_lwp_continue 162 3590Sstevel@tonic-gate #define SYS_lwp_kill 163 3600Sstevel@tonic-gate #define SYS_lwp_self 164 3610Sstevel@tonic-gate #define SYS_lwp_sigmask 165 3620Sstevel@tonic-gate #define SYS_lwp_private 166 3630Sstevel@tonic-gate #define SYS_lwp_wait 167 3640Sstevel@tonic-gate #define SYS_lwp_mutex_wakeup 168 3650Sstevel@tonic-gate #define SYS_lwp_mutex_lock 169 3660Sstevel@tonic-gate #define SYS_lwp_cond_wait 170 3670Sstevel@tonic-gate #define SYS_lwp_cond_signal 171 3680Sstevel@tonic-gate #define SYS_lwp_cond_broadcast 172 3690Sstevel@tonic-gate #define SYS_pread 173 3700Sstevel@tonic-gate #define SYS_pwrite 174 3710Sstevel@tonic-gate #define SYS_llseek 175 3720Sstevel@tonic-gate #define SYS_inst_sync 176 3732712Snn35248 #define SYS_brand 177 3740Sstevel@tonic-gate #define SYS_kaio 178 3750Sstevel@tonic-gate /* 3760Sstevel@tonic-gate * subcodes: 3770Sstevel@tonic-gate * aioread(...) :: kaio(AIOREAD, ...) 3780Sstevel@tonic-gate * aiowrite(...) :: kaio(AIOWRITE, ...) 3790Sstevel@tonic-gate * aiowait(...) :: kaio(AIOWAIT, ...) 3800Sstevel@tonic-gate * aiocancel(...) :: kaio(AIOCANCEL, ...) 3810Sstevel@tonic-gate * aionotify() :: kaio(AIONOTIFY) 3820Sstevel@tonic-gate * aioinit() :: kaio(AIOINIT) 3830Sstevel@tonic-gate * aiostart() :: kaio(AIOSTART) 3840Sstevel@tonic-gate * see <sys/aio.h> 3850Sstevel@tonic-gate */ 3860Sstevel@tonic-gate #define SYS_cpc 179 3870Sstevel@tonic-gate #define SYS_lgrpsys 180 3880Sstevel@tonic-gate #define SYS_meminfosys SYS_lgrpsys 3890Sstevel@tonic-gate /* 3900Sstevel@tonic-gate * subcodes: 3910Sstevel@tonic-gate * meminfo(...) :: meminfosys(MISYS_MEMINFO, ...) 3920Sstevel@tonic-gate */ 3930Sstevel@tonic-gate #define SYS_rusagesys 181 3940Sstevel@tonic-gate /* 3950Sstevel@tonic-gate * subcodes: 3963247Sgjelinek * getrusage(...) :: rusagesys(RUSAGESYS_GETRUSAGE, ...) 3973247Sgjelinek * getvmusage(...) :: rusagesys(RUSAGESYS_GETVMUSAGE, ...) 3980Sstevel@tonic-gate */ 3990Sstevel@tonic-gate #define SYS_port 182 4000Sstevel@tonic-gate /* 4010Sstevel@tonic-gate * subcodes: 4020Sstevel@tonic-gate * port_create(...) :: portfs(PORT_CREATE, ...) 4030Sstevel@tonic-gate * port_associate(...) :: portfs(PORT_ASSOCIATE, ...) 4040Sstevel@tonic-gate * port_dissociate(...) :: portfs(PORT_DISSOCIATE, ...) 4050Sstevel@tonic-gate * port_send(...) :: portfs(PORT_SEND, ...) 4060Sstevel@tonic-gate * port_sendn(...) :: portfs(PORT_SENDN, ...) 4070Sstevel@tonic-gate * port_get(...) :: portfs(PORT_GET, ...) 4080Sstevel@tonic-gate * port_getn(...) :: portfs(PORT_GETN, ...) 4090Sstevel@tonic-gate * port_alert(...) :: portfs(PORT_ALERT, ...) 4100Sstevel@tonic-gate * port_dispatch(...) :: portfs(PORT_DISPATCH, ...) 4110Sstevel@tonic-gate */ 4120Sstevel@tonic-gate #define SYS_pollsys 183 4131676Sjpk #define SYS_labelsys 184 4140Sstevel@tonic-gate #define SYS_acl 185 4150Sstevel@tonic-gate #define SYS_auditsys 186 4160Sstevel@tonic-gate #define SYS_processor_bind 187 4170Sstevel@tonic-gate #define SYS_processor_info 188 4180Sstevel@tonic-gate #define SYS_p_online 189 4190Sstevel@tonic-gate #define SYS_sigqueue 190 4200Sstevel@tonic-gate #define SYS_clock_gettime 191 4210Sstevel@tonic-gate #define SYS_clock_settime 192 4220Sstevel@tonic-gate #define SYS_clock_getres 193 4230Sstevel@tonic-gate #define SYS_timer_create 194 4240Sstevel@tonic-gate #define SYS_timer_delete 195 4250Sstevel@tonic-gate #define SYS_timer_settime 196 4260Sstevel@tonic-gate #define SYS_timer_gettime 197 4270Sstevel@tonic-gate #define SYS_timer_getoverrun 198 4280Sstevel@tonic-gate #define SYS_nanosleep 199 4290Sstevel@tonic-gate #define SYS_facl 200 4300Sstevel@tonic-gate #define SYS_door 201 4310Sstevel@tonic-gate /* 4320Sstevel@tonic-gate * Door Subcodes: 4330Sstevel@tonic-gate * 0 door_create 4340Sstevel@tonic-gate * 1 door_revoke 4350Sstevel@tonic-gate * 2 door_info 4360Sstevel@tonic-gate * 3 door_call 4370Sstevel@tonic-gate * 4 door_return 4380Sstevel@tonic-gate */ 4390Sstevel@tonic-gate #define SYS_setreuid 202 4400Sstevel@tonic-gate #define SYS_setregid 203 4410Sstevel@tonic-gate #define SYS_install_utrap 204 4420Sstevel@tonic-gate #define SYS_signotify 205 4430Sstevel@tonic-gate #define SYS_schedctl 206 4440Sstevel@tonic-gate #define SYS_pset 207 4450Sstevel@tonic-gate #define SYS_sparc_utrap_install 208 4460Sstevel@tonic-gate #define SYS_resolvepath 209 4470Sstevel@tonic-gate #define SYS_lwp_mutex_timedlock 210 4480Sstevel@tonic-gate #define SYS_lwp_sema_timedwait 211 4490Sstevel@tonic-gate #define SYS_lwp_rwlock_sys 212 4500Sstevel@tonic-gate /* 4510Sstevel@tonic-gate * subcodes: 4520Sstevel@tonic-gate * lwp_rwlock_rdlock(...) :: syscall(212, 0, ...) 4530Sstevel@tonic-gate * lwp_rwlock_wrlock(...) :: syscall(212, 1, ...) 4540Sstevel@tonic-gate * lwp_rwlock_tryrdlock(...) :: syscall(212, 2, ...) 4550Sstevel@tonic-gate * lwp_rwlock_trywrlock(...) :: syscall(212, 3, ...) 4560Sstevel@tonic-gate * lwp_rwlock_unlock(...) :: syscall(212, 4, ...) 4570Sstevel@tonic-gate */ 4580Sstevel@tonic-gate /* system calls for large file ( > 2 gigabyte) support */ 4590Sstevel@tonic-gate #define SYS_getdents64 213 4600Sstevel@tonic-gate #define SYS_mmap64 214 4610Sstevel@tonic-gate #define SYS_stat64 215 4620Sstevel@tonic-gate #define SYS_lstat64 216 4630Sstevel@tonic-gate #define SYS_fstat64 217 4640Sstevel@tonic-gate #define SYS_statvfs64 218 4650Sstevel@tonic-gate #define SYS_fstatvfs64 219 4660Sstevel@tonic-gate #define SYS_setrlimit64 220 4670Sstevel@tonic-gate #define SYS_getrlimit64 221 4680Sstevel@tonic-gate #define SYS_pread64 222 4690Sstevel@tonic-gate #define SYS_pwrite64 223 4700Sstevel@tonic-gate #define SYS_creat64 224 4710Sstevel@tonic-gate #define SYS_open64 225 4720Sstevel@tonic-gate #define SYS_rpcsys 226 4730Sstevel@tonic-gate #define SYS_zone 227 4740Sstevel@tonic-gate /* 4750Sstevel@tonic-gate * subcodes: 4760Sstevel@tonic-gate * zone_create(...) :: zone(ZONE_CREATE, ...) 4770Sstevel@tonic-gate * zone_destroy(...) :: zone(ZONE_DESTROY, ...) 4780Sstevel@tonic-gate * zone_getattr(...) :: zone(ZONE_GETATTR, ...) 4790Sstevel@tonic-gate * zone_enter(...) :: zone(ZONE_ENTER, ...) 4800Sstevel@tonic-gate * zone_list(...) :: zone(ZONE_LIST, ...) 4810Sstevel@tonic-gate * zone_shutdown(...) :: zone(ZONE_SHUTDOWN, ...) 4820Sstevel@tonic-gate * zone_lookup(...) :: zone(ZONE_LOOKUP, ...) 4833448Sdh155122 * zone_boot(...) :: zone(ZONE_BOOT, ...) 4843448Sdh155122 * zone_version(...) :: zone(ZONE_VERSION, ...) 4852712Snn35248 * zone_setattr(...) :: zone(ZONE_SETATTR, ...) 4863448Sdh155122 * zone_add_datalink(...) :: zone(ZONE_ADD_DATALINK, ...) 4873448Sdh155122 * zone_remove_datalink(...) :: zone(ZONE_DEL_DATALINK, ...) 4883448Sdh155122 * zone_check_datalink(...) :: zone(ZONE_CHECK_DATALINK, ...) 4893448Sdh155122 * zone_list_datalink(...) :: zone(ZONE_LIST_DATALINK, ...) 4900Sstevel@tonic-gate */ 4910Sstevel@tonic-gate #define SYS_autofssys 228 4920Sstevel@tonic-gate #define SYS_getcwd 229 4930Sstevel@tonic-gate #define SYS_so_socket 230 4940Sstevel@tonic-gate #define SYS_so_socketpair 231 4950Sstevel@tonic-gate #define SYS_bind 232 4960Sstevel@tonic-gate #define SYS_listen 233 4970Sstevel@tonic-gate #define SYS_accept 234 4980Sstevel@tonic-gate #define SYS_connect 235 4990Sstevel@tonic-gate #define SYS_shutdown 236 5000Sstevel@tonic-gate #define SYS_recv 237 5010Sstevel@tonic-gate #define SYS_recvfrom 238 5020Sstevel@tonic-gate #define SYS_recvmsg 239 5030Sstevel@tonic-gate #define SYS_send 240 5040Sstevel@tonic-gate #define SYS_sendmsg 241 5050Sstevel@tonic-gate #define SYS_sendto 242 5060Sstevel@tonic-gate #define SYS_getpeername 243 5070Sstevel@tonic-gate #define SYS_getsockname 244 5080Sstevel@tonic-gate #define SYS_getsockopt 245 5090Sstevel@tonic-gate #define SYS_setsockopt 246 5100Sstevel@tonic-gate #define SYS_sockconfig 247 5110Sstevel@tonic-gate /* 5120Sstevel@tonic-gate * NTP codes 5130Sstevel@tonic-gate */ 5140Sstevel@tonic-gate #define SYS_ntp_gettime 248 5150Sstevel@tonic-gate #define SYS_ntp_adjtime 249 5160Sstevel@tonic-gate #define SYS_lwp_mutex_unlock 250 5170Sstevel@tonic-gate #define SYS_lwp_mutex_trylock 251 5184574Sraf #define SYS_lwp_mutex_register 252 5190Sstevel@tonic-gate #define SYS_cladm 253 5202712Snn35248 #define SYS_uucopy 254 5210Sstevel@tonic-gate #define SYS_umount2 255 5220Sstevel@tonic-gate 5230Sstevel@tonic-gate 5240Sstevel@tonic-gate #ifndef _ASM 5250Sstevel@tonic-gate 5260Sstevel@tonic-gate typedef struct { /* syscall set type */ 5270Sstevel@tonic-gate unsigned int word[16]; 5280Sstevel@tonic-gate } sysset_t; 5290Sstevel@tonic-gate 5300Sstevel@tonic-gate #if !defined(_KERNEL) 5310Sstevel@tonic-gate 5320Sstevel@tonic-gate typedef struct { /* return values from system call */ 5330Sstevel@tonic-gate long sys_rval1; /* primary return value from system call */ 5340Sstevel@tonic-gate long sys_rval2; /* second return value from system call */ 5350Sstevel@tonic-gate } sysret_t; 5360Sstevel@tonic-gate 5370Sstevel@tonic-gate #if defined(__STDC__) 5380Sstevel@tonic-gate extern int syscall(int, ...); 5390Sstevel@tonic-gate extern int __systemcall(sysret_t *, int, ...); 5400Sstevel@tonic-gate extern int __set_errno(int); 5410Sstevel@tonic-gate #else 5420Sstevel@tonic-gate extern int syscall(); 5430Sstevel@tonic-gate extern int __systemcall(); 5440Sstevel@tonic-gate extern int __set_errno(); 5450Sstevel@tonic-gate #endif 5460Sstevel@tonic-gate 5470Sstevel@tonic-gate #endif /* _KERNEL */ 5480Sstevel@tonic-gate 5490Sstevel@tonic-gate #endif /* _ASM */ 5500Sstevel@tonic-gate 5510Sstevel@tonic-gate #ifdef __cplusplus 5520Sstevel@tonic-gate } 5530Sstevel@tonic-gate #endif 5540Sstevel@tonic-gate 5550Sstevel@tonic-gate #endif /* _SYS_SYSCALL_H */ 556