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