xref: /onnv-gate/usr/src/uts/common/sys/syscall.h (revision 11798:1e7f1f154004)
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 /*
23*11798SRoger.Faulkner@Sun.COM  * Copyright 2010 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 #ifdef	__cplusplus
340Sstevel@tonic-gate extern "C" {
350Sstevel@tonic-gate #endif
360Sstevel@tonic-gate 
370Sstevel@tonic-gate /*
380Sstevel@tonic-gate  *	system call numbers
390Sstevel@tonic-gate  *		syscall(SYS_xxxx, ...)
400Sstevel@tonic-gate  */
410Sstevel@tonic-gate 
420Sstevel@tonic-gate 	/* syscall enumeration MUST begin with 1 */
430Sstevel@tonic-gate 
440Sstevel@tonic-gate 	/*
450Sstevel@tonic-gate 	 * SunOS/SPARC uses 0 for the indirect system call SYS_syscall
460Sstevel@tonic-gate 	 * but this doesn't count because it is just another way
470Sstevel@tonic-gate 	 * to specify the real system call number.
480Sstevel@tonic-gate 	 */
490Sstevel@tonic-gate 
500Sstevel@tonic-gate #define	SYS_syscall	0
510Sstevel@tonic-gate #define	SYS_exit	1
520Sstevel@tonic-gate #define	SYS_read	3
530Sstevel@tonic-gate #define	SYS_write	4
540Sstevel@tonic-gate #define	SYS_open	5
550Sstevel@tonic-gate #define	SYS_close	6
560Sstevel@tonic-gate #define	SYS_link	9
570Sstevel@tonic-gate #define	SYS_unlink	10
580Sstevel@tonic-gate #define	SYS_chdir	12
590Sstevel@tonic-gate #define	SYS_time	13
600Sstevel@tonic-gate #define	SYS_mknod	14
610Sstevel@tonic-gate #define	SYS_chmod	15
620Sstevel@tonic-gate #define	SYS_chown	16
630Sstevel@tonic-gate #define	SYS_brk		17
640Sstevel@tonic-gate #define	SYS_stat	18
650Sstevel@tonic-gate #define	SYS_lseek	19
660Sstevel@tonic-gate #define	SYS_getpid	20
670Sstevel@tonic-gate #define	SYS_mount	21
680Sstevel@tonic-gate #define	SYS_setuid	23
690Sstevel@tonic-gate #define	SYS_getuid	24
700Sstevel@tonic-gate #define	SYS_stime	25
710Sstevel@tonic-gate #define	SYS_pcsample	26
720Sstevel@tonic-gate #define	SYS_alarm	27
730Sstevel@tonic-gate #define	SYS_fstat	28
740Sstevel@tonic-gate #define	SYS_pause	29
750Sstevel@tonic-gate #define	SYS_stty	31
760Sstevel@tonic-gate #define	SYS_gtty	32
770Sstevel@tonic-gate #define	SYS_access	33
780Sstevel@tonic-gate #define	SYS_nice	34
790Sstevel@tonic-gate #define	SYS_statfs	35
800Sstevel@tonic-gate #define	SYS_sync	36
810Sstevel@tonic-gate #define	SYS_kill	37
820Sstevel@tonic-gate #define	SYS_fstatfs	38
830Sstevel@tonic-gate #define	SYS_pgrpsys	39
840Sstevel@tonic-gate 	/*
850Sstevel@tonic-gate 	 * subcodes:
860Sstevel@tonic-gate 	 *	getpgrp()	  :: syscall(39,0)
870Sstevel@tonic-gate 	 *	setpgrp()	  :: syscall(39,1)
880Sstevel@tonic-gate 	 *	getsid(pid)	  :: syscall(39,2,pid)
890Sstevel@tonic-gate 	 *	setsid()	  :: syscall(39,3)
900Sstevel@tonic-gate 	 *	getpgid(pid)	  :: syscall(39,4,pid)
910Sstevel@tonic-gate 	 *	setpgid(pid,pgid) :: syscall(39,5,pid,pgid)
920Sstevel@tonic-gate 	 */
932712Snn35248 #define	SYS_uucopystr	40
940Sstevel@tonic-gate #define	SYS_pipe	42
950Sstevel@tonic-gate #define	SYS_times	43
960Sstevel@tonic-gate #define	SYS_profil	44
97*11798SRoger.Faulkner@Sun.COM #define	SYS_faccessat	45
980Sstevel@tonic-gate #define	SYS_setgid	46
990Sstevel@tonic-gate #define	SYS_getgid	47
1000Sstevel@tonic-gate #define	SYS_msgsys	49
1010Sstevel@tonic-gate 	/*
1020Sstevel@tonic-gate 	 * subcodes:
1030Sstevel@tonic-gate 	 *	msgget(...)  :: msgsys(0, ...)
1040Sstevel@tonic-gate 	 *	msgctl(...)  :: msgsys(1, ...)
1050Sstevel@tonic-gate 	 *	msgrcv(...)  :: msgsys(2, ...)
1060Sstevel@tonic-gate 	 *	msgsnd(...)  :: msgsys(3, ...)
1070Sstevel@tonic-gate 	 *	msgids(...)  :: msgsys(4, ...)
1080Sstevel@tonic-gate 	 *	msgsnap(...) :: msgsys(5, ...)
1090Sstevel@tonic-gate 	 *	see <sys/msg.h>
1100Sstevel@tonic-gate 	 */
1110Sstevel@tonic-gate #define	SYS_sysi86	50
1120Sstevel@tonic-gate 	/*
1130Sstevel@tonic-gate 	 * subcodes:
1145891Sraf 	 *	sysi86(code, ...)
1150Sstevel@tonic-gate 	 */
1160Sstevel@tonic-gate #define	SYS_acct	51
1170Sstevel@tonic-gate #define	SYS_shmsys	52
1180Sstevel@tonic-gate 	/*
1190Sstevel@tonic-gate 	 * subcodes:
1200Sstevel@tonic-gate 	 *	shmat (...) :: shmsys(0, ...)
1210Sstevel@tonic-gate 	 *	shmctl(...) :: shmsys(1, ...)
1220Sstevel@tonic-gate 	 *	shmdt (...) :: shmsys(2, ...)
1230Sstevel@tonic-gate 	 *	shmget(...) :: shmsys(3, ...)
1240Sstevel@tonic-gate 	 *	shmids(...) :: shmsys(4, ...)
1250Sstevel@tonic-gate 	 *	see <sys/shm.h>
1260Sstevel@tonic-gate 	 */
1270Sstevel@tonic-gate #define	SYS_semsys	53
1280Sstevel@tonic-gate 	/*
1290Sstevel@tonic-gate 	 * subcodes:
1300Sstevel@tonic-gate 	 *	semctl(...) :: semsys(0, ...)
1310Sstevel@tonic-gate 	 *	semget(...) :: semsys(1, ...)
1320Sstevel@tonic-gate 	 *	semop (...) :: semsys(2, ...)
1330Sstevel@tonic-gate 	 *	semids(...) :: semsys(3, ...)
1340Sstevel@tonic-gate 	 *	semtimedop(...) :: semsys(4, ...)
1350Sstevel@tonic-gate 	 *	see <sys/sem.h>
1360Sstevel@tonic-gate 	 */
1370Sstevel@tonic-gate #define	SYS_ioctl	54
1380Sstevel@tonic-gate #define	SYS_uadmin	55
139*11798SRoger.Faulkner@Sun.COM #define	SYS_fchownat	56
1400Sstevel@tonic-gate #define	SYS_utssys	57
1410Sstevel@tonic-gate 	/*
1420Sstevel@tonic-gate 	 * subcodes (third argument):
1430Sstevel@tonic-gate 	 *	uname(obuf)  (obsolete)   :: syscall(57, obuf, ign, 0)
1440Sstevel@tonic-gate 	 *					subcode 1 unused
1450Sstevel@tonic-gate 	 *	ustat(dev, obuf)	  :: syscall(57, obuf, dev, 2)
1460Sstevel@tonic-gate 	 *	fusers(path, flags, obuf) :: syscall(57, path, flags, 3, obuf)
1470Sstevel@tonic-gate 	 *	see <sys/utssys.h>
1480Sstevel@tonic-gate 	 */
1490Sstevel@tonic-gate #define	SYS_fdsync	58
1500Sstevel@tonic-gate #define	SYS_execve	59
1510Sstevel@tonic-gate #define	SYS_umask	60
1520Sstevel@tonic-gate #define	SYS_chroot	61
1530Sstevel@tonic-gate #define	SYS_fcntl	62
1540Sstevel@tonic-gate #define	SYS_ulimit	63
155*11798SRoger.Faulkner@Sun.COM #define	SYS_renameat	64
156*11798SRoger.Faulkner@Sun.COM #define	SYS_unlinkat	65
157*11798SRoger.Faulkner@Sun.COM #define	SYS_fstatat	66
158*11798SRoger.Faulkner@Sun.COM #define	SYS_fstatat64	67
159*11798SRoger.Faulkner@Sun.COM #define	SYS_openat	68
160*11798SRoger.Faulkner@Sun.COM #define	SYS_openat64	69
1610Sstevel@tonic-gate #define	SYS_tasksys	70
1620Sstevel@tonic-gate 	/*
1630Sstevel@tonic-gate 	 * subcodes:
1640Sstevel@tonic-gate 	 * 	settaskid(...) :: tasksys(0, ...)
1650Sstevel@tonic-gate 	 * 	gettaskid(...) :: tasksys(1, ...)
1660Sstevel@tonic-gate 	 * 	getprojid(...) :: tasksys(2, ...)
1670Sstevel@tonic-gate 	 */
1680Sstevel@tonic-gate #define	SYS_acctctl	71
1690Sstevel@tonic-gate #define	SYS_exacctsys	72
1700Sstevel@tonic-gate 	/*
1710Sstevel@tonic-gate 	 * subcodes:
1720Sstevel@tonic-gate 	 * 	getacct(...) :: exacct(0, ...)
1730Sstevel@tonic-gate 	 * 	putacct(...) :: exacct(1, ...)
1740Sstevel@tonic-gate 	 * 	wracct(...) :: exacct(2, ...)
1750Sstevel@tonic-gate 	 */
1760Sstevel@tonic-gate #define	SYS_getpagesizes	73
1775349Skchow 	/*
1785349Skchow 	 * subcodes:
1795349Skchow 	 *	getpagesizes2(...)	:: getpagesizes(0, ...)
1805349Skchow 	 * 	getpagesizes(...)	:: getpagesizes(1, ...) legacy
1815349Skchow 	 */
1820Sstevel@tonic-gate #define	SYS_rctlsys	74
1830Sstevel@tonic-gate 	/*
1840Sstevel@tonic-gate 	 * subcodes:
1850Sstevel@tonic-gate 	 * 	getrctl(...) :: rctlsys(0, ...)
1860Sstevel@tonic-gate 	 * 	setrctl(...) :: rctlsys(1, ...)
1870Sstevel@tonic-gate 	 * 	rctllist(...) :: rctlsys(2, ...)
1880Sstevel@tonic-gate 	 * 	rctlctl(...) :: rctlsys(3, ...)
1890Sstevel@tonic-gate 	 */
1904321Scasper #define	SYS_sidsys	75
1914321Scasper 	/*
1924321Scasper 	 * subcodes:
1934321Scasper 	 * 	allocids(...)		:: sidsys(0, ...)
1944321Scasper 	 * 	idmap_reg(...)		:: sidsys(1, ...)
1954321Scasper 	 * 	idmap_unreg(...)	:: sidsys(2, ...)
1964321Scasper 	 */
1970Sstevel@tonic-gate #define	SYS_lwp_park	77
1980Sstevel@tonic-gate 	/*
1990Sstevel@tonic-gate 	 * subcodes:
20010440SRoger.Faulkner@Sun.COM 	 *	_lwp_park(timespec_t *, lwpid_t)	:: syslwp_park(0, ...)
20110440SRoger.Faulkner@Sun.COM 	 *	_lwp_unpark(lwpid_t, int)		:: syslwp_park(1, ...)
20210440SRoger.Faulkner@Sun.COM 	 *	_lwp_unpark_all(lwpid_t *, int)		:: syslwp_park(2, ...)
20310440SRoger.Faulkner@Sun.COM 	 *	_lwp_unpark_cancel(lwpid_t *, int)	:: syslwp_park(3, ...)
20410440SRoger.Faulkner@Sun.COM 	 *	_lwp_set_park(lwpid_t *, int)		:: syslwp_park(4, ...)
2050Sstevel@tonic-gate 	 */
2060Sstevel@tonic-gate #define	SYS_sendfilev	78
2070Sstevel@tonic-gate 	/*
2080Sstevel@tonic-gate 	 * subcodes :
2090Sstevel@tonic-gate 	 * 	sendfilev()   :: sendfilev(0, ...)
2100Sstevel@tonic-gate 	 * 	sendfilev64() :: sendfilev(1, ...)
2110Sstevel@tonic-gate 	 */
2120Sstevel@tonic-gate #define	SYS_rmdir	79
2130Sstevel@tonic-gate #define	SYS_mkdir	80
2140Sstevel@tonic-gate #define	SYS_getdents	81
2150Sstevel@tonic-gate #define	SYS_privsys	82
2160Sstevel@tonic-gate 	/*
2170Sstevel@tonic-gate 	 * subcodes:
2180Sstevel@tonic-gate 	 * 	setppriv(...)		:: privsys(0, ...)
2190Sstevel@tonic-gate 	 * 	getppriv(...)		:: privsys(1, ...)
2200Sstevel@tonic-gate 	 * 	getimplinfo(...)	:: privsys(2, ...)
2210Sstevel@tonic-gate 	 * 	setpflags(...) 		:: privsys(3, ...)
2220Sstevel@tonic-gate 	 * 	getpflags(...) 		:: privsys(4, ...)
2234321Scasper 	 *	issetugid();		:: privsys(5)
2240Sstevel@tonic-gate 	 */
2250Sstevel@tonic-gate #define	SYS_ucredsys	83
2260Sstevel@tonic-gate 	/*
2270Sstevel@tonic-gate 	 * subcodes:
2280Sstevel@tonic-gate 	 *	ucred_get(...)		:: ucredsys(0, ...)
2290Sstevel@tonic-gate 	 *	getpeerucred(...)	:: ucredsys(1, ...)
2300Sstevel@tonic-gate 	 */
2310Sstevel@tonic-gate #define	SYS_sysfs	84
2320Sstevel@tonic-gate 	/*
2330Sstevel@tonic-gate 	 * subcodes:
2340Sstevel@tonic-gate 	 *	sysfs(code, ...)
2350Sstevel@tonic-gate 	 *	see <sys/fstyp.h>
2360Sstevel@tonic-gate 	 */
2370Sstevel@tonic-gate #define	SYS_getmsg	85
2380Sstevel@tonic-gate #define	SYS_putmsg	86
2390Sstevel@tonic-gate #define	SYS_lstat	88
2400Sstevel@tonic-gate #define	SYS_symlink	89
2410Sstevel@tonic-gate #define	SYS_readlink	90
2420Sstevel@tonic-gate #define	SYS_setgroups	91
2430Sstevel@tonic-gate #define	SYS_getgroups	92
2440Sstevel@tonic-gate #define	SYS_fchmod	93
2450Sstevel@tonic-gate #define	SYS_fchown	94
2460Sstevel@tonic-gate #define	SYS_sigprocmask	95
2470Sstevel@tonic-gate #define	SYS_sigsuspend	96
2480Sstevel@tonic-gate #define	SYS_sigaltstack	97
2490Sstevel@tonic-gate #define	SYS_sigaction	98
2500Sstevel@tonic-gate #define	SYS_sigpending	99
2510Sstevel@tonic-gate 	/*
2520Sstevel@tonic-gate 	 * subcodes:
2530Sstevel@tonic-gate 	 *			subcode 0 unused
2540Sstevel@tonic-gate 	 *	sigpending(...) :: syscall(99, 1, ...)
2550Sstevel@tonic-gate 	 *	sigfillset(...) :: syscall(99, 2, ...)
2560Sstevel@tonic-gate 	 */
2570Sstevel@tonic-gate #define	SYS_context	100
2580Sstevel@tonic-gate 	/*
2590Sstevel@tonic-gate 	 * subcodes:
2600Sstevel@tonic-gate 	 *	getcontext(...) :: syscall(100, 0, ...)
2610Sstevel@tonic-gate 	 *	setcontext(...) :: syscall(100, 1, ...)
2620Sstevel@tonic-gate 	 */
2630Sstevel@tonic-gate #define	SYS_statvfs	103
2640Sstevel@tonic-gate #define	SYS_fstatvfs	104
2650Sstevel@tonic-gate #define	SYS_getloadavg	105
2660Sstevel@tonic-gate #define	SYS_nfssys	106
2675891Sraf #define	SYS_waitid	107
2685891Sraf #define	SYS_waitsys	SYS_waitid	/* historical */
2690Sstevel@tonic-gate #define	SYS_sigsendsys	108
2700Sstevel@tonic-gate #define	SYS_hrtsys	109
27110440SRoger.Faulkner@Sun.COM #define	SYS_utimesys	110
27210440SRoger.Faulkner@Sun.COM 	/*
27310440SRoger.Faulkner@Sun.COM 	 * subcodes:
27410440SRoger.Faulkner@Sun.COM 	 *	futimens(...)	:: syscall(110, 0, ...)
27510440SRoger.Faulkner@Sun.COM 	 *	utimensat(...)	:: syscall(110, 1, ...)
27610440SRoger.Faulkner@Sun.COM 	 */
2774806Sraf #define	SYS_sigresend	111
2780Sstevel@tonic-gate #define	SYS_priocntlsys	112
2790Sstevel@tonic-gate #define	SYS_pathconf	113
2800Sstevel@tonic-gate #define	SYS_mincore	114
2810Sstevel@tonic-gate #define	SYS_mmap	115
2820Sstevel@tonic-gate #define	SYS_mprotect	116
2830Sstevel@tonic-gate #define	SYS_munmap	117
2840Sstevel@tonic-gate #define	SYS_fpathconf	118
2850Sstevel@tonic-gate #define	SYS_vfork	119
2860Sstevel@tonic-gate #define	SYS_fchdir	120
2870Sstevel@tonic-gate #define	SYS_readv	121
2880Sstevel@tonic-gate #define	SYS_writev	122
2898212SMichael.Corcoran@Sun.COM #define	SYS_mmapobj	127
2900Sstevel@tonic-gate #define	SYS_setrlimit	128
2910Sstevel@tonic-gate #define	SYS_getrlimit	129
2920Sstevel@tonic-gate #define	SYS_lchown	130
2930Sstevel@tonic-gate #define	SYS_memcntl	131
2940Sstevel@tonic-gate #define	SYS_getpmsg	132
2950Sstevel@tonic-gate #define	SYS_putpmsg	133
2960Sstevel@tonic-gate #define	SYS_rename	134
2970Sstevel@tonic-gate #define	SYS_uname	135
2980Sstevel@tonic-gate #define	SYS_setegid	136
2990Sstevel@tonic-gate #define	SYS_sysconfig	137
3000Sstevel@tonic-gate #define	SYS_adjtime	138
3010Sstevel@tonic-gate #define	SYS_systeminfo	139
3023957Sth199096 #define	SYS_sharefs	140
3030Sstevel@tonic-gate #define	SYS_seteuid	141
3043235Sraf #define	SYS_forksys	142
3053235Sraf 	/*
3063235Sraf 	 * subcodes:
3073235Sraf 	 *	forkx(flags)    :: forksys(0, flags)
3083235Sraf 	 *	forkallx(flags) :: forksys(1, flags)
3093235Sraf 	 *	vforkx(flags)   :: forksys(2, flags)
3103235Sraf 	 */
3110Sstevel@tonic-gate #define	SYS_sigtimedwait	144
3120Sstevel@tonic-gate #define	SYS_lwp_info	145
3130Sstevel@tonic-gate #define	SYS_yield	146
3140Sstevel@tonic-gate #define	SYS_lwp_sema_post	148
3150Sstevel@tonic-gate #define	SYS_lwp_sema_trywait	149
3160Sstevel@tonic-gate #define	SYS_lwp_detach	150
3170Sstevel@tonic-gate #define	SYS_corectl	151
3180Sstevel@tonic-gate #define	SYS_modctl	152
3190Sstevel@tonic-gate #define	SYS_fchroot	153
3200Sstevel@tonic-gate #define	SYS_vhangup	155
3210Sstevel@tonic-gate #define	SYS_gettimeofday	156
3220Sstevel@tonic-gate #define	SYS_getitimer		157
3230Sstevel@tonic-gate #define	SYS_setitimer		158
3240Sstevel@tonic-gate #define	SYS_lwp_create		159
3250Sstevel@tonic-gate #define	SYS_lwp_exit		160
3260Sstevel@tonic-gate #define	SYS_lwp_suspend		161
3270Sstevel@tonic-gate #define	SYS_lwp_continue	162
3280Sstevel@tonic-gate #define	SYS_lwp_kill		163
3290Sstevel@tonic-gate #define	SYS_lwp_self		164
3300Sstevel@tonic-gate #define	SYS_lwp_sigmask		165
3310Sstevel@tonic-gate #define	SYS_lwp_private		166
3320Sstevel@tonic-gate #define	SYS_lwp_wait		167
3330Sstevel@tonic-gate #define	SYS_lwp_mutex_wakeup	168
3340Sstevel@tonic-gate #define	SYS_lwp_cond_wait	170
3350Sstevel@tonic-gate #define	SYS_lwp_cond_signal	171
3360Sstevel@tonic-gate #define	SYS_lwp_cond_broadcast	172
3370Sstevel@tonic-gate #define	SYS_pread		173
3380Sstevel@tonic-gate #define	SYS_pwrite		174
3390Sstevel@tonic-gate #define	SYS_llseek		175
3400Sstevel@tonic-gate #define	SYS_inst_sync		176
3412712Snn35248 #define	SYS_brand		177
3420Sstevel@tonic-gate #define	SYS_kaio		178
3430Sstevel@tonic-gate 	/*
3440Sstevel@tonic-gate 	 * subcodes:
3450Sstevel@tonic-gate 	 *	aioread(...)	:: kaio(AIOREAD, ...)
3460Sstevel@tonic-gate 	 *	aiowrite(...)	:: kaio(AIOWRITE, ...)
3470Sstevel@tonic-gate 	 *	aiowait(...)	:: kaio(AIOWAIT, ...)
3480Sstevel@tonic-gate 	 *	aiocancel(...)	:: kaio(AIOCANCEL, ...)
3490Sstevel@tonic-gate 	 *	aionotify()	:: kaio(AIONOTIFY)
3500Sstevel@tonic-gate 	 *	aioinit()	:: kaio(AIOINIT)
3510Sstevel@tonic-gate 	 *	aiostart()	:: kaio(AIOSTART)
3520Sstevel@tonic-gate 	 *	see <sys/aio.h>
3530Sstevel@tonic-gate 	 */
3540Sstevel@tonic-gate #define	SYS_cpc			179
3550Sstevel@tonic-gate #define	SYS_lgrpsys		180
3560Sstevel@tonic-gate #define	SYS_meminfosys		SYS_lgrpsys
3570Sstevel@tonic-gate 	/*
3580Sstevel@tonic-gate 	 * subcodes:
3590Sstevel@tonic-gate 	 * 	meminfo(...) :: meminfosys(MISYS_MEMINFO, ...)
3600Sstevel@tonic-gate 	 */
3610Sstevel@tonic-gate #define	SYS_rusagesys		181
3620Sstevel@tonic-gate 	/*
3630Sstevel@tonic-gate 	 * subcodes:
3643247Sgjelinek 	 *	getrusage(...) :: rusagesys(RUSAGESYS_GETRUSAGE, ...)
3653247Sgjelinek 	 *	getvmusage(...)    :: rusagesys(RUSAGESYS_GETVMUSAGE, ...)
3660Sstevel@tonic-gate 	 */
3670Sstevel@tonic-gate #define	SYS_port		182
3680Sstevel@tonic-gate 	/*
3690Sstevel@tonic-gate 	 * subcodes:
3700Sstevel@tonic-gate 	 *	port_create(...) :: portfs(PORT_CREATE, ...)
3710Sstevel@tonic-gate 	 *	port_associate(...) :: portfs(PORT_ASSOCIATE, ...)
3720Sstevel@tonic-gate 	 *	port_dissociate(...) :: portfs(PORT_DISSOCIATE, ...)
3730Sstevel@tonic-gate 	 *	port_send(...) :: portfs(PORT_SEND, ...)
3740Sstevel@tonic-gate 	 *	port_sendn(...) :: portfs(PORT_SENDN, ...)
3750Sstevel@tonic-gate 	 *	port_get(...) :: portfs(PORT_GET, ...)
3760Sstevel@tonic-gate 	 *	port_getn(...) :: portfs(PORT_GETN, ...)
3770Sstevel@tonic-gate 	 *	port_alert(...) :: portfs(PORT_ALERT, ...)
3780Sstevel@tonic-gate 	 *	port_dispatch(...) :: portfs(PORT_DISPATCH, ...)
3790Sstevel@tonic-gate 	 */
3800Sstevel@tonic-gate #define	SYS_pollsys		183
3811676Sjpk #define	SYS_labelsys		184
3820Sstevel@tonic-gate #define	SYS_acl			185
3830Sstevel@tonic-gate #define	SYS_auditsys		186
3840Sstevel@tonic-gate #define	SYS_processor_bind	187
3850Sstevel@tonic-gate #define	SYS_processor_info	188
3860Sstevel@tonic-gate #define	SYS_p_online		189
3870Sstevel@tonic-gate #define	SYS_sigqueue		190
3880Sstevel@tonic-gate #define	SYS_clock_gettime	191
3890Sstevel@tonic-gate #define	SYS_clock_settime	192
3900Sstevel@tonic-gate #define	SYS_clock_getres	193
3910Sstevel@tonic-gate #define	SYS_timer_create	194
3920Sstevel@tonic-gate #define	SYS_timer_delete	195
3930Sstevel@tonic-gate #define	SYS_timer_settime	196
3940Sstevel@tonic-gate #define	SYS_timer_gettime	197
3950Sstevel@tonic-gate #define	SYS_timer_getoverrun	198
3960Sstevel@tonic-gate #define	SYS_nanosleep		199
3970Sstevel@tonic-gate #define	SYS_facl		200
3980Sstevel@tonic-gate #define	SYS_door		201
3990Sstevel@tonic-gate 	/*
4000Sstevel@tonic-gate 	 * Door Subcodes:
4010Sstevel@tonic-gate 	 *	0	door_create
4020Sstevel@tonic-gate 	 *	1	door_revoke
4030Sstevel@tonic-gate 	 *	2	door_info
4040Sstevel@tonic-gate 	 *	3	door_call
4050Sstevel@tonic-gate 	 *	4	door_return
4060Sstevel@tonic-gate 	 */
4070Sstevel@tonic-gate #define	SYS_setreuid		202
4080Sstevel@tonic-gate #define	SYS_setregid		203
4090Sstevel@tonic-gate #define	SYS_install_utrap	204
4100Sstevel@tonic-gate #define	SYS_signotify		205
4110Sstevel@tonic-gate #define	SYS_schedctl		206
4120Sstevel@tonic-gate #define	SYS_pset		207
4130Sstevel@tonic-gate #define	SYS_sparc_utrap_install	208
4140Sstevel@tonic-gate #define	SYS_resolvepath		209
4150Sstevel@tonic-gate #define	SYS_lwp_mutex_timedlock	210
4160Sstevel@tonic-gate #define	SYS_lwp_sema_timedwait	211
4170Sstevel@tonic-gate #define	SYS_lwp_rwlock_sys	212
4180Sstevel@tonic-gate 	/*
4190Sstevel@tonic-gate 	 * subcodes:
4200Sstevel@tonic-gate 	 *	lwp_rwlock_rdlock(...)    :: syscall(212, 0, ...)
4210Sstevel@tonic-gate 	 *	lwp_rwlock_wrlock(...)    :: syscall(212, 1, ...)
4220Sstevel@tonic-gate 	 *	lwp_rwlock_tryrdlock(...) :: syscall(212, 2, ...)
4230Sstevel@tonic-gate 	 *	lwp_rwlock_trywrlock(...) :: syscall(212, 3, ...)
4240Sstevel@tonic-gate 	 *	lwp_rwlock_unlock(...)    :: syscall(212, 4, ...)
4250Sstevel@tonic-gate 	 */
4260Sstevel@tonic-gate /* system calls for large file ( > 2 gigabyte) support */
4270Sstevel@tonic-gate #define	SYS_getdents64		213
4280Sstevel@tonic-gate #define	SYS_mmap64		214
4290Sstevel@tonic-gate #define	SYS_stat64		215
4300Sstevel@tonic-gate #define	SYS_lstat64		216
4310Sstevel@tonic-gate #define	SYS_fstat64		217
4320Sstevel@tonic-gate #define	SYS_statvfs64		218
4330Sstevel@tonic-gate #define	SYS_fstatvfs64		219
4340Sstevel@tonic-gate #define	SYS_setrlimit64		220
4350Sstevel@tonic-gate #define	SYS_getrlimit64		221
4360Sstevel@tonic-gate #define	SYS_pread64		222
4370Sstevel@tonic-gate #define	SYS_pwrite64		223
4380Sstevel@tonic-gate #define	SYS_open64		225
4390Sstevel@tonic-gate #define	SYS_rpcsys		226
4400Sstevel@tonic-gate #define	SYS_zone		227
4410Sstevel@tonic-gate 	/*
4420Sstevel@tonic-gate 	 * subcodes:
4430Sstevel@tonic-gate 	 *	zone_create(...) :: zone(ZONE_CREATE, ...)
4440Sstevel@tonic-gate 	 *	zone_destroy(...) :: zone(ZONE_DESTROY, ...)
4450Sstevel@tonic-gate 	 *	zone_getattr(...) :: zone(ZONE_GETATTR, ...)
4460Sstevel@tonic-gate 	 *	zone_enter(...) :: zone(ZONE_ENTER, ...)
4470Sstevel@tonic-gate 	 *	zone_list(...) :: zone(ZONE_LIST, ...)
4480Sstevel@tonic-gate 	 *	zone_shutdown(...) :: zone(ZONE_SHUTDOWN, ...)
4490Sstevel@tonic-gate 	 *	zone_lookup(...) :: zone(ZONE_LOOKUP, ...)
4503448Sdh155122 	 *	zone_boot(...) :: zone(ZONE_BOOT, ...)
4513448Sdh155122 	 *	zone_version(...) :: zone(ZONE_VERSION, ...)
4522712Snn35248 	 *	zone_setattr(...) :: zone(ZONE_SETATTR, ...)
4533448Sdh155122 	 *	zone_add_datalink(...) :: zone(ZONE_ADD_DATALINK, ...)
4543448Sdh155122 	 *	zone_remove_datalink(...) :: zone(ZONE_DEL_DATALINK, ...)
4553448Sdh155122 	 *	zone_check_datalink(...) :: zone(ZONE_CHECK_DATALINK, ...)
4563448Sdh155122 	 *	zone_list_datalink(...) :: zone(ZONE_LIST_DATALINK, ...)
4570Sstevel@tonic-gate 	 */
4580Sstevel@tonic-gate #define	SYS_autofssys		228
4590Sstevel@tonic-gate #define	SYS_getcwd		229
4600Sstevel@tonic-gate #define	SYS_so_socket		230
4610Sstevel@tonic-gate #define	SYS_so_socketpair	231
4620Sstevel@tonic-gate #define	SYS_bind		232
4630Sstevel@tonic-gate #define	SYS_listen		233
4640Sstevel@tonic-gate #define	SYS_accept		234
4650Sstevel@tonic-gate #define	SYS_connect		235
4660Sstevel@tonic-gate #define	SYS_shutdown		236
4670Sstevel@tonic-gate #define	SYS_recv		237
4680Sstevel@tonic-gate #define	SYS_recvfrom		238
4690Sstevel@tonic-gate #define	SYS_recvmsg		239
4700Sstevel@tonic-gate #define	SYS_send		240
4710Sstevel@tonic-gate #define	SYS_sendmsg		241
4720Sstevel@tonic-gate #define	SYS_sendto		242
4730Sstevel@tonic-gate #define	SYS_getpeername		243
4740Sstevel@tonic-gate #define	SYS_getsockname		244
4750Sstevel@tonic-gate #define	SYS_getsockopt		245
4760Sstevel@tonic-gate #define	SYS_setsockopt		246
4770Sstevel@tonic-gate #define	SYS_sockconfig		247
4780Sstevel@tonic-gate 	/*
4790Sstevel@tonic-gate 	 * NTP codes
4800Sstevel@tonic-gate 	 */
4810Sstevel@tonic-gate #define	SYS_ntp_gettime		248
4820Sstevel@tonic-gate #define	SYS_ntp_adjtime		249
4830Sstevel@tonic-gate #define	SYS_lwp_mutex_unlock	250
4840Sstevel@tonic-gate #define	SYS_lwp_mutex_trylock	251
4854574Sraf #define	SYS_lwp_mutex_register	252
4860Sstevel@tonic-gate #define	SYS_cladm		253
4872712Snn35248 #define	SYS_uucopy		254
4880Sstevel@tonic-gate #define	SYS_umount2		255
4890Sstevel@tonic-gate 
4900Sstevel@tonic-gate #ifndef	_ASM
4910Sstevel@tonic-gate 
4920Sstevel@tonic-gate typedef struct {		/* syscall set type */
4930Sstevel@tonic-gate 	unsigned int	word[16];
4940Sstevel@tonic-gate } sysset_t;
4950Sstevel@tonic-gate 
4960Sstevel@tonic-gate #if !defined(_KERNEL)
4970Sstevel@tonic-gate 
4980Sstevel@tonic-gate typedef struct {	/* return values from system call */
4990Sstevel@tonic-gate 	long	sys_rval1;	/* primary return value from system call */
5000Sstevel@tonic-gate 	long	sys_rval2;	/* second return value from system call */
5010Sstevel@tonic-gate } sysret_t;
5020Sstevel@tonic-gate 
5030Sstevel@tonic-gate #if defined(__STDC__)
5040Sstevel@tonic-gate extern int	syscall(int, ...);
5050Sstevel@tonic-gate extern int	__systemcall(sysret_t *, int, ...);
5060Sstevel@tonic-gate extern int	__set_errno(int);
5070Sstevel@tonic-gate #else
5080Sstevel@tonic-gate extern int	syscall();
5090Sstevel@tonic-gate extern int	__systemcall();
5100Sstevel@tonic-gate extern int	__set_errno();
5110Sstevel@tonic-gate #endif
5120Sstevel@tonic-gate 
5130Sstevel@tonic-gate #endif	/* _KERNEL */
5140Sstevel@tonic-gate 
5150Sstevel@tonic-gate #endif	/* _ASM */
5160Sstevel@tonic-gate 
5170Sstevel@tonic-gate #ifdef	__cplusplus
5180Sstevel@tonic-gate }
5190Sstevel@tonic-gate #endif
5200Sstevel@tonic-gate 
5210Sstevel@tonic-gate #endif	/* _SYS_SYSCALL_H */
522