1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate /* 23*0Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*0Sstevel@tonic-gate * Use is subject to license terms. 25*0Sstevel@tonic-gate */ 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 28*0Sstevel@tonic-gate /* All Rights Reserved */ 29*0Sstevel@tonic-gate 30*0Sstevel@tonic-gate 31*0Sstevel@tonic-gate #ifndef _SYS_SYSCALL_H 32*0Sstevel@tonic-gate #define _SYS_SYSCALL_H 33*0Sstevel@tonic-gate 34*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 35*0Sstevel@tonic-gate 36*0Sstevel@tonic-gate #ifdef __cplusplus 37*0Sstevel@tonic-gate extern "C" { 38*0Sstevel@tonic-gate #endif 39*0Sstevel@tonic-gate 40*0Sstevel@tonic-gate /* 41*0Sstevel@tonic-gate * system call numbers 42*0Sstevel@tonic-gate * syscall(SYS_xxxx, ...) 43*0Sstevel@tonic-gate */ 44*0Sstevel@tonic-gate 45*0Sstevel@tonic-gate /* syscall enumeration MUST begin with 1 */ 46*0Sstevel@tonic-gate 47*0Sstevel@tonic-gate /* 48*0Sstevel@tonic-gate * SunOS/SPARC uses 0 for the indirect system call SYS_syscall 49*0Sstevel@tonic-gate * but this doesn't count because it is just another way 50*0Sstevel@tonic-gate * to specify the real system call number. 51*0Sstevel@tonic-gate */ 52*0Sstevel@tonic-gate 53*0Sstevel@tonic-gate #define SYS_syscall 0 54*0Sstevel@tonic-gate #define SYS_exit 1 55*0Sstevel@tonic-gate #define SYS_forkall 2 56*0Sstevel@tonic-gate #define SYS_fork SYS_forkall /* historical */ 57*0Sstevel@tonic-gate #define SYS_read 3 58*0Sstevel@tonic-gate #define SYS_write 4 59*0Sstevel@tonic-gate #define SYS_open 5 60*0Sstevel@tonic-gate #define SYS_close 6 61*0Sstevel@tonic-gate #define SYS_wait 7 62*0Sstevel@tonic-gate #define SYS_creat 8 63*0Sstevel@tonic-gate #define SYS_link 9 64*0Sstevel@tonic-gate #define SYS_unlink 10 65*0Sstevel@tonic-gate #define SYS_exec 11 66*0Sstevel@tonic-gate #define SYS_chdir 12 67*0Sstevel@tonic-gate #define SYS_time 13 68*0Sstevel@tonic-gate #define SYS_mknod 14 69*0Sstevel@tonic-gate #define SYS_chmod 15 70*0Sstevel@tonic-gate #define SYS_chown 16 71*0Sstevel@tonic-gate #define SYS_brk 17 72*0Sstevel@tonic-gate #define SYS_stat 18 73*0Sstevel@tonic-gate #define SYS_lseek 19 74*0Sstevel@tonic-gate #define SYS_getpid 20 75*0Sstevel@tonic-gate #define SYS_mount 21 76*0Sstevel@tonic-gate #define SYS_umount 22 77*0Sstevel@tonic-gate #define SYS_setuid 23 78*0Sstevel@tonic-gate #define SYS_getuid 24 79*0Sstevel@tonic-gate #define SYS_stime 25 80*0Sstevel@tonic-gate #define SYS_pcsample 26 81*0Sstevel@tonic-gate #define SYS_alarm 27 82*0Sstevel@tonic-gate #define SYS_fstat 28 83*0Sstevel@tonic-gate #define SYS_pause 29 84*0Sstevel@tonic-gate #define SYS_utime 30 85*0Sstevel@tonic-gate #define SYS_stty 31 86*0Sstevel@tonic-gate #define SYS_gtty 32 87*0Sstevel@tonic-gate #define SYS_access 33 88*0Sstevel@tonic-gate #define SYS_nice 34 89*0Sstevel@tonic-gate #define SYS_statfs 35 90*0Sstevel@tonic-gate #define SYS_sync 36 91*0Sstevel@tonic-gate #define SYS_kill 37 92*0Sstevel@tonic-gate #define SYS_fstatfs 38 93*0Sstevel@tonic-gate #define SYS_pgrpsys 39 94*0Sstevel@tonic-gate /* 95*0Sstevel@tonic-gate * subcodes: 96*0Sstevel@tonic-gate * getpgrp() :: syscall(39,0) 97*0Sstevel@tonic-gate * setpgrp() :: syscall(39,1) 98*0Sstevel@tonic-gate * getsid(pid) :: syscall(39,2,pid) 99*0Sstevel@tonic-gate * setsid() :: syscall(39,3) 100*0Sstevel@tonic-gate * getpgid(pid) :: syscall(39,4,pid) 101*0Sstevel@tonic-gate * setpgid(pid,pgid) :: syscall(39,5,pid,pgid) 102*0Sstevel@tonic-gate */ 103*0Sstevel@tonic-gate #define SYS_reserved_40 40 /* 40 not used, was xenix */ 104*0Sstevel@tonic-gate #define SYS_dup 41 105*0Sstevel@tonic-gate #define SYS_pipe 42 106*0Sstevel@tonic-gate #define SYS_times 43 107*0Sstevel@tonic-gate #define SYS_profil 44 108*0Sstevel@tonic-gate #define SYS_plock 45 109*0Sstevel@tonic-gate #define SYS_setgid 46 110*0Sstevel@tonic-gate #define SYS_getgid 47 111*0Sstevel@tonic-gate #define SYS_signal 48 112*0Sstevel@tonic-gate /* 113*0Sstevel@tonic-gate * subcodes: 114*0Sstevel@tonic-gate * signal(sig, f) :: signal(sig, f) ((sig&SIGNO_MASK) == sig) 115*0Sstevel@tonic-gate * sigset(sig, f) :: signal(sig|SIGDEFER, f) 116*0Sstevel@tonic-gate * sighold(sig) :: signal(sig|SIGHOLD) 117*0Sstevel@tonic-gate * sigrelse(sig) :: signal(sig|SIGRELSE) 118*0Sstevel@tonic-gate * sigignore(sig) :: signal(sig|SIGIGNORE) 119*0Sstevel@tonic-gate * sigpause(sig) :: signal(sig|SIGPAUSE) 120*0Sstevel@tonic-gate * see <sys/signal.h> 121*0Sstevel@tonic-gate */ 122*0Sstevel@tonic-gate #define SYS_msgsys 49 123*0Sstevel@tonic-gate /* 124*0Sstevel@tonic-gate * subcodes: 125*0Sstevel@tonic-gate * msgget(...) :: msgsys(0, ...) 126*0Sstevel@tonic-gate * msgctl(...) :: msgsys(1, ...) 127*0Sstevel@tonic-gate * msgrcv(...) :: msgsys(2, ...) 128*0Sstevel@tonic-gate * msgsnd(...) :: msgsys(3, ...) 129*0Sstevel@tonic-gate * msgids(...) :: msgsys(4, ...) 130*0Sstevel@tonic-gate * msgsnap(...) :: msgsys(5, ...) 131*0Sstevel@tonic-gate * see <sys/msg.h> 132*0Sstevel@tonic-gate */ 133*0Sstevel@tonic-gate #define SYS_syssun 50 134*0Sstevel@tonic-gate #define SYS_sysi86 50 135*0Sstevel@tonic-gate /* 136*0Sstevel@tonic-gate * subcodes: 137*0Sstevel@tonic-gate * syssun(code, ...) 138*0Sstevel@tonic-gate * see <sys/sys3b.h> 139*0Sstevel@tonic-gate */ 140*0Sstevel@tonic-gate #define SYS_acct 51 141*0Sstevel@tonic-gate #define SYS_shmsys 52 142*0Sstevel@tonic-gate /* 143*0Sstevel@tonic-gate * subcodes: 144*0Sstevel@tonic-gate * shmat (...) :: shmsys(0, ...) 145*0Sstevel@tonic-gate * shmctl(...) :: shmsys(1, ...) 146*0Sstevel@tonic-gate * shmdt (...) :: shmsys(2, ...) 147*0Sstevel@tonic-gate * shmget(...) :: shmsys(3, ...) 148*0Sstevel@tonic-gate * shmids(...) :: shmsys(4, ...) 149*0Sstevel@tonic-gate * see <sys/shm.h> 150*0Sstevel@tonic-gate */ 151*0Sstevel@tonic-gate #define SYS_semsys 53 152*0Sstevel@tonic-gate /* 153*0Sstevel@tonic-gate * subcodes: 154*0Sstevel@tonic-gate * semctl(...) :: semsys(0, ...) 155*0Sstevel@tonic-gate * semget(...) :: semsys(1, ...) 156*0Sstevel@tonic-gate * semop (...) :: semsys(2, ...) 157*0Sstevel@tonic-gate * semids(...) :: semsys(3, ...) 158*0Sstevel@tonic-gate * semtimedop(...) :: semsys(4, ...) 159*0Sstevel@tonic-gate * see <sys/sem.h> 160*0Sstevel@tonic-gate */ 161*0Sstevel@tonic-gate #define SYS_ioctl 54 162*0Sstevel@tonic-gate #define SYS_uadmin 55 163*0Sstevel@tonic-gate #define SYS_utssys 57 164*0Sstevel@tonic-gate /* 165*0Sstevel@tonic-gate * subcodes (third argument): 166*0Sstevel@tonic-gate * uname(obuf) (obsolete) :: syscall(57, obuf, ign, 0) 167*0Sstevel@tonic-gate * subcode 1 unused 168*0Sstevel@tonic-gate * ustat(dev, obuf) :: syscall(57, obuf, dev, 2) 169*0Sstevel@tonic-gate * fusers(path, flags, obuf) :: syscall(57, path, flags, 3, obuf) 170*0Sstevel@tonic-gate * see <sys/utssys.h> 171*0Sstevel@tonic-gate */ 172*0Sstevel@tonic-gate #define SYS_fdsync 58 173*0Sstevel@tonic-gate #define SYS_execve 59 174*0Sstevel@tonic-gate #define SYS_umask 60 175*0Sstevel@tonic-gate #define SYS_chroot 61 176*0Sstevel@tonic-gate #define SYS_fcntl 62 177*0Sstevel@tonic-gate #define SYS_ulimit 63 178*0Sstevel@tonic-gate #define SYS_reserved_64 64 /* 64 reserved */ 179*0Sstevel@tonic-gate #define SYS_reserved_65 65 /* 65 reserved */ 180*0Sstevel@tonic-gate #define SYS_reserved_66 66 /* 66 reserved */ 181*0Sstevel@tonic-gate #define SYS_reserved_67 67 /* 67 reserved */ 182*0Sstevel@tonic-gate #define SYS_reserved_68 68 /* 68 reserved */ 183*0Sstevel@tonic-gate #define SYS_reserved_69 69 /* 69 reserved */ 184*0Sstevel@tonic-gate #define SYS_tasksys 70 185*0Sstevel@tonic-gate /* 186*0Sstevel@tonic-gate * subcodes: 187*0Sstevel@tonic-gate * settaskid(...) :: tasksys(0, ...) 188*0Sstevel@tonic-gate * gettaskid(...) :: tasksys(1, ...) 189*0Sstevel@tonic-gate * getprojid(...) :: tasksys(2, ...) 190*0Sstevel@tonic-gate */ 191*0Sstevel@tonic-gate #define SYS_acctctl 71 192*0Sstevel@tonic-gate #define SYS_exacctsys 72 193*0Sstevel@tonic-gate /* 194*0Sstevel@tonic-gate * subcodes: 195*0Sstevel@tonic-gate * getacct(...) :: exacct(0, ...) 196*0Sstevel@tonic-gate * putacct(...) :: exacct(1, ...) 197*0Sstevel@tonic-gate * wracct(...) :: exacct(2, ...) 198*0Sstevel@tonic-gate */ 199*0Sstevel@tonic-gate #define SYS_getpagesizes 73 200*0Sstevel@tonic-gate #define SYS_rctlsys 74 201*0Sstevel@tonic-gate /* 202*0Sstevel@tonic-gate * subcodes: 203*0Sstevel@tonic-gate * getrctl(...) :: rctlsys(0, ...) 204*0Sstevel@tonic-gate * setrctl(...) :: rctlsys(1, ...) 205*0Sstevel@tonic-gate * rctllist(...) :: rctlsys(2, ...) 206*0Sstevel@tonic-gate * rctlctl(...) :: rctlsys(3, ...) 207*0Sstevel@tonic-gate */ 208*0Sstevel@tonic-gate #define SYS_issetugid 75 209*0Sstevel@tonic-gate #define SYS_fsat 76 210*0Sstevel@tonic-gate /* 211*0Sstevel@tonic-gate * subcodes: 212*0Sstevel@tonic-gate * openat(...) :: fsat(0, ...) 213*0Sstevel@tonic-gate * openat64(...) :: fsat(1, ...) 214*0Sstevel@tonic-gate * fstatat64(...) :: fsat(2, ...) 215*0Sstevel@tonic-gate * fstatat(...) :: fsat(3, ...) 216*0Sstevel@tonic-gate * renameat(...) :: fsat(4, ...) 217*0Sstevel@tonic-gate * fchownat(...) :: fsat(5, ...) 218*0Sstevel@tonic-gate * unlinkat(...) :: fsat(6, ...) 219*0Sstevel@tonic-gate * futimesat(...) :: fsat(7, ...) 220*0Sstevel@tonic-gate */ 221*0Sstevel@tonic-gate #define SYS_lwp_park 77 222*0Sstevel@tonic-gate /* 223*0Sstevel@tonic-gate * subcodes: 224*0Sstevel@tonic-gate * _lwp_park(timespec_t *, lwpid_t) :: syslwp_park(0, ...) 225*0Sstevel@tonic-gate * _lwp_unpark(lwpid_t, int) :: syslwp_park(1, ...) 226*0Sstevel@tonic-gate * _lwp_unpark_all(lwpid_t *, int) :: syslwp_park(2, ...) 227*0Sstevel@tonic-gate */ 228*0Sstevel@tonic-gate #define SYS_sendfilev 78 229*0Sstevel@tonic-gate /* 230*0Sstevel@tonic-gate * subcodes : 231*0Sstevel@tonic-gate * sendfilev() :: sendfilev(0, ...) 232*0Sstevel@tonic-gate * sendfilev64() :: sendfilev(1, ...) 233*0Sstevel@tonic-gate */ 234*0Sstevel@tonic-gate #define SYS_rmdir 79 235*0Sstevel@tonic-gate #define SYS_mkdir 80 236*0Sstevel@tonic-gate #define SYS_getdents 81 237*0Sstevel@tonic-gate #define SYS_privsys 82 238*0Sstevel@tonic-gate /* 239*0Sstevel@tonic-gate * subcodes: 240*0Sstevel@tonic-gate * setppriv(...) :: privsys(0, ...) 241*0Sstevel@tonic-gate * getppriv(...) :: privsys(1, ...) 242*0Sstevel@tonic-gate * getimplinfo(...) :: privsys(2, ...) 243*0Sstevel@tonic-gate * setpflags(...) :: privsys(3, ...) 244*0Sstevel@tonic-gate * getpflags(...) :: privsys(4, ...) 245*0Sstevel@tonic-gate */ 246*0Sstevel@tonic-gate #define SYS_ucredsys 83 247*0Sstevel@tonic-gate /* 248*0Sstevel@tonic-gate * subcodes: 249*0Sstevel@tonic-gate * ucred_get(...) :: ucredsys(0, ...) 250*0Sstevel@tonic-gate * getpeerucred(...) :: ucredsys(1, ...) 251*0Sstevel@tonic-gate */ 252*0Sstevel@tonic-gate #define SYS_sysfs 84 253*0Sstevel@tonic-gate /* 254*0Sstevel@tonic-gate * subcodes: 255*0Sstevel@tonic-gate * sysfs(code, ...) 256*0Sstevel@tonic-gate * see <sys/fstyp.h> 257*0Sstevel@tonic-gate */ 258*0Sstevel@tonic-gate #define SYS_getmsg 85 259*0Sstevel@tonic-gate #define SYS_putmsg 86 260*0Sstevel@tonic-gate #define SYS_poll 87 261*0Sstevel@tonic-gate 262*0Sstevel@tonic-gate #define SYS_lstat 88 263*0Sstevel@tonic-gate #define SYS_symlink 89 264*0Sstevel@tonic-gate #define SYS_readlink 90 265*0Sstevel@tonic-gate #define SYS_setgroups 91 266*0Sstevel@tonic-gate #define SYS_getgroups 92 267*0Sstevel@tonic-gate #define SYS_fchmod 93 268*0Sstevel@tonic-gate #define SYS_fchown 94 269*0Sstevel@tonic-gate #define SYS_sigprocmask 95 270*0Sstevel@tonic-gate #define SYS_sigsuspend 96 271*0Sstevel@tonic-gate #define SYS_sigaltstack 97 272*0Sstevel@tonic-gate #define SYS_sigaction 98 273*0Sstevel@tonic-gate #define SYS_sigpending 99 274*0Sstevel@tonic-gate /* 275*0Sstevel@tonic-gate * subcodes: 276*0Sstevel@tonic-gate * subcode 0 unused 277*0Sstevel@tonic-gate * sigpending(...) :: syscall(99, 1, ...) 278*0Sstevel@tonic-gate * sigfillset(...) :: syscall(99, 2, ...) 279*0Sstevel@tonic-gate */ 280*0Sstevel@tonic-gate #define SYS_context 100 281*0Sstevel@tonic-gate /* 282*0Sstevel@tonic-gate * subcodes: 283*0Sstevel@tonic-gate * getcontext(...) :: syscall(100, 0, ...) 284*0Sstevel@tonic-gate * setcontext(...) :: syscall(100, 1, ...) 285*0Sstevel@tonic-gate */ 286*0Sstevel@tonic-gate #define SYS_evsys 101 287*0Sstevel@tonic-gate #define SYS_evtrapret 102 288*0Sstevel@tonic-gate #define SYS_statvfs 103 289*0Sstevel@tonic-gate #define SYS_fstatvfs 104 290*0Sstevel@tonic-gate #define SYS_getloadavg 105 291*0Sstevel@tonic-gate #define SYS_nfssys 106 292*0Sstevel@tonic-gate #define SYS_waitsys 107 293*0Sstevel@tonic-gate #define SYS_sigsendsys 108 294*0Sstevel@tonic-gate #define SYS_hrtsys 109 295*0Sstevel@tonic-gate #define SYS_acancel 110 296*0Sstevel@tonic-gate #define SYS_async 111 297*0Sstevel@tonic-gate #define SYS_priocntlsys 112 298*0Sstevel@tonic-gate #define SYS_pathconf 113 299*0Sstevel@tonic-gate #define SYS_mincore 114 300*0Sstevel@tonic-gate #define SYS_mmap 115 301*0Sstevel@tonic-gate #define SYS_mprotect 116 302*0Sstevel@tonic-gate #define SYS_munmap 117 303*0Sstevel@tonic-gate #define SYS_fpathconf 118 304*0Sstevel@tonic-gate #define SYS_vfork 119 305*0Sstevel@tonic-gate #define SYS_fchdir 120 306*0Sstevel@tonic-gate #define SYS_readv 121 307*0Sstevel@tonic-gate #define SYS_writev 122 308*0Sstevel@tonic-gate #define SYS_xstat 123 309*0Sstevel@tonic-gate #define SYS_lxstat 124 310*0Sstevel@tonic-gate #define SYS_fxstat 125 311*0Sstevel@tonic-gate #define SYS_xmknod 126 312*0Sstevel@tonic-gate #define SYS_setrlimit 128 313*0Sstevel@tonic-gate #define SYS_getrlimit 129 314*0Sstevel@tonic-gate #define SYS_lchown 130 315*0Sstevel@tonic-gate #define SYS_memcntl 131 316*0Sstevel@tonic-gate #define SYS_getpmsg 132 317*0Sstevel@tonic-gate #define SYS_putpmsg 133 318*0Sstevel@tonic-gate #define SYS_rename 134 319*0Sstevel@tonic-gate #define SYS_uname 135 320*0Sstevel@tonic-gate #define SYS_setegid 136 321*0Sstevel@tonic-gate #define SYS_sysconfig 137 322*0Sstevel@tonic-gate #define SYS_adjtime 138 323*0Sstevel@tonic-gate #define SYS_systeminfo 139 324*0Sstevel@tonic-gate #define SYS_seteuid 141 325*0Sstevel@tonic-gate #define SYS_fork1 143 326*0Sstevel@tonic-gate #define SYS_sigtimedwait 144 327*0Sstevel@tonic-gate #define SYS_lwp_info 145 328*0Sstevel@tonic-gate #define SYS_yield 146 329*0Sstevel@tonic-gate #define SYS_lwp_sema_wait 147 330*0Sstevel@tonic-gate #define SYS_lwp_sema_post 148 331*0Sstevel@tonic-gate #define SYS_lwp_sema_trywait 149 332*0Sstevel@tonic-gate #define SYS_lwp_detach 150 333*0Sstevel@tonic-gate #define SYS_corectl 151 334*0Sstevel@tonic-gate #define SYS_modctl 152 335*0Sstevel@tonic-gate #define SYS_fchroot 153 336*0Sstevel@tonic-gate #define SYS_utimes 154 337*0Sstevel@tonic-gate #define SYS_vhangup 155 338*0Sstevel@tonic-gate #define SYS_gettimeofday 156 339*0Sstevel@tonic-gate #define SYS_getitimer 157 340*0Sstevel@tonic-gate #define SYS_setitimer 158 341*0Sstevel@tonic-gate #define SYS_lwp_create 159 342*0Sstevel@tonic-gate #define SYS_lwp_exit 160 343*0Sstevel@tonic-gate #define SYS_lwp_suspend 161 344*0Sstevel@tonic-gate #define SYS_lwp_continue 162 345*0Sstevel@tonic-gate #define SYS_lwp_kill 163 346*0Sstevel@tonic-gate #define SYS_lwp_self 164 347*0Sstevel@tonic-gate #define SYS_lwp_sigmask 165 348*0Sstevel@tonic-gate #define SYS_lwp_private 166 349*0Sstevel@tonic-gate #define SYS_lwp_wait 167 350*0Sstevel@tonic-gate #define SYS_lwp_mutex_wakeup 168 351*0Sstevel@tonic-gate #define SYS_lwp_mutex_lock 169 352*0Sstevel@tonic-gate #define SYS_lwp_cond_wait 170 353*0Sstevel@tonic-gate #define SYS_lwp_cond_signal 171 354*0Sstevel@tonic-gate #define SYS_lwp_cond_broadcast 172 355*0Sstevel@tonic-gate #define SYS_pread 173 356*0Sstevel@tonic-gate #define SYS_pwrite 174 357*0Sstevel@tonic-gate #define SYS_llseek 175 358*0Sstevel@tonic-gate #define SYS_inst_sync 176 359*0Sstevel@tonic-gate #define SYS_reserved_177 177 /* 177 reserved */ 360*0Sstevel@tonic-gate #define SYS_kaio 178 361*0Sstevel@tonic-gate /* 362*0Sstevel@tonic-gate * subcodes: 363*0Sstevel@tonic-gate * aioread(...) :: kaio(AIOREAD, ...) 364*0Sstevel@tonic-gate * aiowrite(...) :: kaio(AIOWRITE, ...) 365*0Sstevel@tonic-gate * aiowait(...) :: kaio(AIOWAIT, ...) 366*0Sstevel@tonic-gate * aiocancel(...) :: kaio(AIOCANCEL, ...) 367*0Sstevel@tonic-gate * aionotify() :: kaio(AIONOTIFY) 368*0Sstevel@tonic-gate * aioinit() :: kaio(AIOINIT) 369*0Sstevel@tonic-gate * aiostart() :: kaio(AIOSTART) 370*0Sstevel@tonic-gate * see <sys/aio.h> 371*0Sstevel@tonic-gate */ 372*0Sstevel@tonic-gate #define SYS_cpc 179 373*0Sstevel@tonic-gate #define SYS_lgrpsys 180 374*0Sstevel@tonic-gate #define SYS_meminfosys SYS_lgrpsys 375*0Sstevel@tonic-gate /* 376*0Sstevel@tonic-gate * subcodes: 377*0Sstevel@tonic-gate * meminfo(...) :: meminfosys(MISYS_MEMINFO, ...) 378*0Sstevel@tonic-gate */ 379*0Sstevel@tonic-gate #define SYS_rusagesys 181 380*0Sstevel@tonic-gate /* 381*0Sstevel@tonic-gate * subcodes: 382*0Sstevel@tonic-gate * getrusage(...) :: rusagesys(RUSAGESYS_GETRUSAGE,...) 383*0Sstevel@tonic-gate */ 384*0Sstevel@tonic-gate #define SYS_port 182 385*0Sstevel@tonic-gate /* 386*0Sstevel@tonic-gate * subcodes: 387*0Sstevel@tonic-gate * port_create(...) :: portfs(PORT_CREATE, ...) 388*0Sstevel@tonic-gate * port_associate(...) :: portfs(PORT_ASSOCIATE, ...) 389*0Sstevel@tonic-gate * port_dissociate(...) :: portfs(PORT_DISSOCIATE, ...) 390*0Sstevel@tonic-gate * port_send(...) :: portfs(PORT_SEND, ...) 391*0Sstevel@tonic-gate * port_sendn(...) :: portfs(PORT_SENDN, ...) 392*0Sstevel@tonic-gate * port_get(...) :: portfs(PORT_GET, ...) 393*0Sstevel@tonic-gate * port_getn(...) :: portfs(PORT_GETN, ...) 394*0Sstevel@tonic-gate * port_alert(...) :: portfs(PORT_ALERT, ...) 395*0Sstevel@tonic-gate * port_dispatch(...) :: portfs(PORT_DISPATCH, ...) 396*0Sstevel@tonic-gate */ 397*0Sstevel@tonic-gate #define SYS_pollsys 183 398*0Sstevel@tonic-gate #define SYS_tsolsys 184 399*0Sstevel@tonic-gate #define SYS_acl 185 400*0Sstevel@tonic-gate #define SYS_auditsys 186 401*0Sstevel@tonic-gate #define SYS_processor_bind 187 402*0Sstevel@tonic-gate #define SYS_processor_info 188 403*0Sstevel@tonic-gate #define SYS_p_online 189 404*0Sstevel@tonic-gate #define SYS_sigqueue 190 405*0Sstevel@tonic-gate #define SYS_clock_gettime 191 406*0Sstevel@tonic-gate #define SYS_clock_settime 192 407*0Sstevel@tonic-gate #define SYS_clock_getres 193 408*0Sstevel@tonic-gate #define SYS_timer_create 194 409*0Sstevel@tonic-gate #define SYS_timer_delete 195 410*0Sstevel@tonic-gate #define SYS_timer_settime 196 411*0Sstevel@tonic-gate #define SYS_timer_gettime 197 412*0Sstevel@tonic-gate #define SYS_timer_getoverrun 198 413*0Sstevel@tonic-gate #define SYS_nanosleep 199 414*0Sstevel@tonic-gate #define SYS_facl 200 415*0Sstevel@tonic-gate #define SYS_door 201 416*0Sstevel@tonic-gate /* 417*0Sstevel@tonic-gate * Door Subcodes: 418*0Sstevel@tonic-gate * 0 door_create 419*0Sstevel@tonic-gate * 1 door_revoke 420*0Sstevel@tonic-gate * 2 door_info 421*0Sstevel@tonic-gate * 3 door_call 422*0Sstevel@tonic-gate * 4 door_return 423*0Sstevel@tonic-gate */ 424*0Sstevel@tonic-gate #define SYS_setreuid 202 425*0Sstevel@tonic-gate #define SYS_setregid 203 426*0Sstevel@tonic-gate #define SYS_install_utrap 204 427*0Sstevel@tonic-gate #define SYS_signotify 205 428*0Sstevel@tonic-gate #define SYS_schedctl 206 429*0Sstevel@tonic-gate #define SYS_pset 207 430*0Sstevel@tonic-gate #define SYS_sparc_utrap_install 208 431*0Sstevel@tonic-gate #define SYS_resolvepath 209 432*0Sstevel@tonic-gate #define SYS_lwp_mutex_timedlock 210 433*0Sstevel@tonic-gate #define SYS_lwp_sema_timedwait 211 434*0Sstevel@tonic-gate #define SYS_lwp_rwlock_sys 212 435*0Sstevel@tonic-gate /* 436*0Sstevel@tonic-gate * subcodes: 437*0Sstevel@tonic-gate * lwp_rwlock_rdlock(...) :: syscall(212, 0, ...) 438*0Sstevel@tonic-gate * lwp_rwlock_wrlock(...) :: syscall(212, 1, ...) 439*0Sstevel@tonic-gate * lwp_rwlock_tryrdlock(...) :: syscall(212, 2, ...) 440*0Sstevel@tonic-gate * lwp_rwlock_trywrlock(...) :: syscall(212, 3, ...) 441*0Sstevel@tonic-gate * lwp_rwlock_unlock(...) :: syscall(212, 4, ...) 442*0Sstevel@tonic-gate */ 443*0Sstevel@tonic-gate /* system calls for large file ( > 2 gigabyte) support */ 444*0Sstevel@tonic-gate #define SYS_getdents64 213 445*0Sstevel@tonic-gate #define SYS_mmap64 214 446*0Sstevel@tonic-gate #define SYS_stat64 215 447*0Sstevel@tonic-gate #define SYS_lstat64 216 448*0Sstevel@tonic-gate #define SYS_fstat64 217 449*0Sstevel@tonic-gate #define SYS_statvfs64 218 450*0Sstevel@tonic-gate #define SYS_fstatvfs64 219 451*0Sstevel@tonic-gate #define SYS_setrlimit64 220 452*0Sstevel@tonic-gate #define SYS_getrlimit64 221 453*0Sstevel@tonic-gate #define SYS_pread64 222 454*0Sstevel@tonic-gate #define SYS_pwrite64 223 455*0Sstevel@tonic-gate #define SYS_creat64 224 456*0Sstevel@tonic-gate #define SYS_open64 225 457*0Sstevel@tonic-gate #define SYS_rpcsys 226 458*0Sstevel@tonic-gate #define SYS_zone 227 459*0Sstevel@tonic-gate /* 460*0Sstevel@tonic-gate * subcodes: 461*0Sstevel@tonic-gate * zone_create(...) :: zone(ZONE_CREATE, ...) 462*0Sstevel@tonic-gate * zone_destroy(...) :: zone(ZONE_DESTROY, ...) 463*0Sstevel@tonic-gate * zone_getattr(...) :: zone(ZONE_GETATTR, ...) 464*0Sstevel@tonic-gate * zone_enter(...) :: zone(ZONE_ENTER, ...) 465*0Sstevel@tonic-gate * zone_list(...) :: zone(ZONE_LIST, ...) 466*0Sstevel@tonic-gate * zone_shutdown(...) :: zone(ZONE_SHUTDOWN, ...) 467*0Sstevel@tonic-gate * zone_lookup(...) :: zone(ZONE_LOOKUP, ...) 468*0Sstevel@tonic-gate */ 469*0Sstevel@tonic-gate #define SYS_autofssys 228 470*0Sstevel@tonic-gate #define SYS_getcwd 229 471*0Sstevel@tonic-gate #define SYS_so_socket 230 472*0Sstevel@tonic-gate #define SYS_so_socketpair 231 473*0Sstevel@tonic-gate #define SYS_bind 232 474*0Sstevel@tonic-gate #define SYS_listen 233 475*0Sstevel@tonic-gate #define SYS_accept 234 476*0Sstevel@tonic-gate #define SYS_connect 235 477*0Sstevel@tonic-gate #define SYS_shutdown 236 478*0Sstevel@tonic-gate #define SYS_recv 237 479*0Sstevel@tonic-gate #define SYS_recvfrom 238 480*0Sstevel@tonic-gate #define SYS_recvmsg 239 481*0Sstevel@tonic-gate #define SYS_send 240 482*0Sstevel@tonic-gate #define SYS_sendmsg 241 483*0Sstevel@tonic-gate #define SYS_sendto 242 484*0Sstevel@tonic-gate #define SYS_getpeername 243 485*0Sstevel@tonic-gate #define SYS_getsockname 244 486*0Sstevel@tonic-gate #define SYS_getsockopt 245 487*0Sstevel@tonic-gate #define SYS_setsockopt 246 488*0Sstevel@tonic-gate #define SYS_sockconfig 247 489*0Sstevel@tonic-gate /* 490*0Sstevel@tonic-gate * NTP codes 491*0Sstevel@tonic-gate */ 492*0Sstevel@tonic-gate #define SYS_ntp_gettime 248 493*0Sstevel@tonic-gate #define SYS_ntp_adjtime 249 494*0Sstevel@tonic-gate #define SYS_lwp_mutex_unlock 250 495*0Sstevel@tonic-gate #define SYS_lwp_mutex_trylock 251 496*0Sstevel@tonic-gate #define SYS_lwp_mutex_init 252 497*0Sstevel@tonic-gate #define SYS_cladm 253 498*0Sstevel@tonic-gate #define SYS_reserved_254 254 /* 254 reserved */ 499*0Sstevel@tonic-gate #define SYS_umount2 255 500*0Sstevel@tonic-gate 501*0Sstevel@tonic-gate 502*0Sstevel@tonic-gate #ifndef _ASM 503*0Sstevel@tonic-gate 504*0Sstevel@tonic-gate typedef struct { /* syscall set type */ 505*0Sstevel@tonic-gate unsigned int word[16]; 506*0Sstevel@tonic-gate } sysset_t; 507*0Sstevel@tonic-gate 508*0Sstevel@tonic-gate #if !defined(_KERNEL) 509*0Sstevel@tonic-gate 510*0Sstevel@tonic-gate typedef struct { /* return values from system call */ 511*0Sstevel@tonic-gate long sys_rval1; /* primary return value from system call */ 512*0Sstevel@tonic-gate long sys_rval2; /* second return value from system call */ 513*0Sstevel@tonic-gate } sysret_t; 514*0Sstevel@tonic-gate 515*0Sstevel@tonic-gate #if defined(__STDC__) 516*0Sstevel@tonic-gate extern int syscall(int, ...); 517*0Sstevel@tonic-gate extern int __systemcall(sysret_t *, int, ...); 518*0Sstevel@tonic-gate extern int __set_errno(int); 519*0Sstevel@tonic-gate #else 520*0Sstevel@tonic-gate extern int syscall(); 521*0Sstevel@tonic-gate extern int __systemcall(); 522*0Sstevel@tonic-gate extern int __set_errno(); 523*0Sstevel@tonic-gate #endif 524*0Sstevel@tonic-gate 525*0Sstevel@tonic-gate #endif /* _KERNEL */ 526*0Sstevel@tonic-gate 527*0Sstevel@tonic-gate #endif /* _ASM */ 528*0Sstevel@tonic-gate 529*0Sstevel@tonic-gate #ifdef __cplusplus 530*0Sstevel@tonic-gate } 531*0Sstevel@tonic-gate #endif 532*0Sstevel@tonic-gate 533*0Sstevel@tonic-gate #endif /* _SYS_SYSCALL_H */ 534