xref: /onnv-gate/usr/src/uts/common/sys/syscall.h (revision 3235:9af05252020c)
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  */
21*3235Sraf 
220Sstevel@tonic-gate /*
231676Sjpk  * Copyright 2006 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 	 */
2060Sstevel@tonic-gate #define	SYS_issetugid	75
2070Sstevel@tonic-gate #define	SYS_fsat	76
2080Sstevel@tonic-gate 	/*
2090Sstevel@tonic-gate 	 * subcodes:
2100Sstevel@tonic-gate 	 *	openat(...)	:: fsat(0, ...)
2110Sstevel@tonic-gate 	 *	openat64(...)	:: fsat(1, ...)
2120Sstevel@tonic-gate 	 *	fstatat64(...)	:: fsat(2, ...)
2130Sstevel@tonic-gate 	 *	fstatat(...)	:: fsat(3, ...)
2140Sstevel@tonic-gate 	 *	renameat(...)	:: fsat(4, ...)
2150Sstevel@tonic-gate 	 *	fchownat(...)	:: fsat(5, ...)
2160Sstevel@tonic-gate 	 *	unlinkat(...)	:: fsat(6, ...)
2170Sstevel@tonic-gate 	 *	futimesat(...)	:: fsat(7, ...)
2180Sstevel@tonic-gate 	 */
2190Sstevel@tonic-gate #define	SYS_lwp_park	77
2200Sstevel@tonic-gate 	/*
2210Sstevel@tonic-gate 	 * subcodes:
2220Sstevel@tonic-gate 	 * 	_lwp_park(timespec_t *, lwpid_t) :: syslwp_park(0, ...)
2230Sstevel@tonic-gate 	 * 	_lwp_unpark(lwpid_t, int)	 :: syslwp_park(1, ...)
2240Sstevel@tonic-gate 	 * 	_lwp_unpark_all(lwpid_t *, int)  :: syslwp_park(2, ...)
2250Sstevel@tonic-gate 	 */
2260Sstevel@tonic-gate #define	SYS_sendfilev	78
2270Sstevel@tonic-gate 	/*
2280Sstevel@tonic-gate 	 * subcodes :
2290Sstevel@tonic-gate 	 * 	sendfilev()   :: sendfilev(0, ...)
2300Sstevel@tonic-gate 	 * 	sendfilev64() :: sendfilev(1, ...)
2310Sstevel@tonic-gate 	 */
2320Sstevel@tonic-gate #define	SYS_rmdir	79
2330Sstevel@tonic-gate #define	SYS_mkdir	80
2340Sstevel@tonic-gate #define	SYS_getdents	81
2350Sstevel@tonic-gate #define	SYS_privsys	82
2360Sstevel@tonic-gate 	/*
2370Sstevel@tonic-gate 	 * subcodes:
2380Sstevel@tonic-gate 	 * 	setppriv(...)		:: privsys(0, ...)
2390Sstevel@tonic-gate 	 * 	getppriv(...)		:: privsys(1, ...)
2400Sstevel@tonic-gate 	 * 	getimplinfo(...)	:: privsys(2, ...)
2410Sstevel@tonic-gate 	 * 	setpflags(...) 		:: privsys(3, ...)
2420Sstevel@tonic-gate 	 * 	getpflags(...) 		:: privsys(4, ...)
2430Sstevel@tonic-gate 	 */
2440Sstevel@tonic-gate #define	SYS_ucredsys	83
2450Sstevel@tonic-gate 	/*
2460Sstevel@tonic-gate 	 * subcodes:
2470Sstevel@tonic-gate 	 *	ucred_get(...)		:: ucredsys(0, ...)
2480Sstevel@tonic-gate 	 *	getpeerucred(...)	:: ucredsys(1, ...)
2490Sstevel@tonic-gate 	 */
2500Sstevel@tonic-gate #define	SYS_sysfs	84
2510Sstevel@tonic-gate 	/*
2520Sstevel@tonic-gate 	 * subcodes:
2530Sstevel@tonic-gate 	 *	sysfs(code, ...)
2540Sstevel@tonic-gate 	 *	see <sys/fstyp.h>
2550Sstevel@tonic-gate 	 */
2560Sstevel@tonic-gate #define	SYS_getmsg	85
2570Sstevel@tonic-gate #define	SYS_putmsg	86
2580Sstevel@tonic-gate #define	SYS_poll	87
2590Sstevel@tonic-gate 
2600Sstevel@tonic-gate #define	SYS_lstat	88
2610Sstevel@tonic-gate #define	SYS_symlink	89
2620Sstevel@tonic-gate #define	SYS_readlink	90
2630Sstevel@tonic-gate #define	SYS_setgroups	91
2640Sstevel@tonic-gate #define	SYS_getgroups	92
2650Sstevel@tonic-gate #define	SYS_fchmod	93
2660Sstevel@tonic-gate #define	SYS_fchown	94
2670Sstevel@tonic-gate #define	SYS_sigprocmask	95
2680Sstevel@tonic-gate #define	SYS_sigsuspend	96
2690Sstevel@tonic-gate #define	SYS_sigaltstack	97
2700Sstevel@tonic-gate #define	SYS_sigaction	98
2710Sstevel@tonic-gate #define	SYS_sigpending	99
2720Sstevel@tonic-gate 	/*
2730Sstevel@tonic-gate 	 * subcodes:
2740Sstevel@tonic-gate 	 *			subcode 0 unused
2750Sstevel@tonic-gate 	 *	sigpending(...) :: syscall(99, 1, ...)
2760Sstevel@tonic-gate 	 *	sigfillset(...) :: syscall(99, 2, ...)
2770Sstevel@tonic-gate 	 */
2780Sstevel@tonic-gate #define	SYS_context	100
2790Sstevel@tonic-gate 	/*
2800Sstevel@tonic-gate 	 * subcodes:
2810Sstevel@tonic-gate 	 *	getcontext(...) :: syscall(100, 0, ...)
2820Sstevel@tonic-gate 	 *	setcontext(...) :: syscall(100, 1, ...)
2830Sstevel@tonic-gate 	 */
2840Sstevel@tonic-gate #define	SYS_evsys	101
2850Sstevel@tonic-gate #define	SYS_evtrapret	102
2860Sstevel@tonic-gate #define	SYS_statvfs	103
2870Sstevel@tonic-gate #define	SYS_fstatvfs	104
2880Sstevel@tonic-gate #define	SYS_getloadavg	105
2890Sstevel@tonic-gate #define	SYS_nfssys	106
2900Sstevel@tonic-gate #define	SYS_waitsys	107
2910Sstevel@tonic-gate #define	SYS_sigsendsys	108
2920Sstevel@tonic-gate #define	SYS_hrtsys	109
2930Sstevel@tonic-gate #define	SYS_acancel	110
2940Sstevel@tonic-gate #define	SYS_async	111
2950Sstevel@tonic-gate #define	SYS_priocntlsys	112
2960Sstevel@tonic-gate #define	SYS_pathconf	113
2970Sstevel@tonic-gate #define	SYS_mincore	114
2980Sstevel@tonic-gate #define	SYS_mmap	115
2990Sstevel@tonic-gate #define	SYS_mprotect	116
3000Sstevel@tonic-gate #define	SYS_munmap	117
3010Sstevel@tonic-gate #define	SYS_fpathconf	118
3020Sstevel@tonic-gate #define	SYS_vfork	119
3030Sstevel@tonic-gate #define	SYS_fchdir	120
3040Sstevel@tonic-gate #define	SYS_readv	121
3050Sstevel@tonic-gate #define	SYS_writev	122
3060Sstevel@tonic-gate #define	SYS_xstat	123
3070Sstevel@tonic-gate #define	SYS_lxstat	124
3080Sstevel@tonic-gate #define	SYS_fxstat	125
3090Sstevel@tonic-gate #define	SYS_xmknod	126
3100Sstevel@tonic-gate #define	SYS_setrlimit	128
3110Sstevel@tonic-gate #define	SYS_getrlimit	129
3120Sstevel@tonic-gate #define	SYS_lchown	130
3130Sstevel@tonic-gate #define	SYS_memcntl	131
3140Sstevel@tonic-gate #define	SYS_getpmsg	132
3150Sstevel@tonic-gate #define	SYS_putpmsg	133
3160Sstevel@tonic-gate #define	SYS_rename	134
3170Sstevel@tonic-gate #define	SYS_uname	135
3180Sstevel@tonic-gate #define	SYS_setegid	136
3190Sstevel@tonic-gate #define	SYS_sysconfig	137
3200Sstevel@tonic-gate #define	SYS_adjtime	138
3210Sstevel@tonic-gate #define	SYS_systeminfo	139
3220Sstevel@tonic-gate #define	SYS_seteuid	141
323*3235Sraf #define	SYS_forksys	142
324*3235Sraf 	/*
325*3235Sraf 	 * subcodes:
326*3235Sraf 	 *	forkx(flags)    :: forksys(0, flags)
327*3235Sraf 	 *	forkallx(flags) :: forksys(1, flags)
328*3235Sraf 	 *	vforkx(flags)   :: forksys(2, flags)
329*3235Sraf 	 */
3300Sstevel@tonic-gate #define	SYS_fork1	143
3310Sstevel@tonic-gate #define	SYS_sigtimedwait	144
3320Sstevel@tonic-gate #define	SYS_lwp_info	145
3330Sstevel@tonic-gate #define	SYS_yield	146
3340Sstevel@tonic-gate #define	SYS_lwp_sema_wait	147
3350Sstevel@tonic-gate #define	SYS_lwp_sema_post	148
3360Sstevel@tonic-gate #define	SYS_lwp_sema_trywait	149
3370Sstevel@tonic-gate #define	SYS_lwp_detach	150
3380Sstevel@tonic-gate #define	SYS_corectl	151
3390Sstevel@tonic-gate #define	SYS_modctl	152
3400Sstevel@tonic-gate #define	SYS_fchroot	153
3410Sstevel@tonic-gate #define	SYS_utimes	154
3420Sstevel@tonic-gate #define	SYS_vhangup	155
3430Sstevel@tonic-gate #define	SYS_gettimeofday	156
3440Sstevel@tonic-gate #define	SYS_getitimer		157
3450Sstevel@tonic-gate #define	SYS_setitimer		158
3460Sstevel@tonic-gate #define	SYS_lwp_create		159
3470Sstevel@tonic-gate #define	SYS_lwp_exit		160
3480Sstevel@tonic-gate #define	SYS_lwp_suspend		161
3490Sstevel@tonic-gate #define	SYS_lwp_continue	162
3500Sstevel@tonic-gate #define	SYS_lwp_kill		163
3510Sstevel@tonic-gate #define	SYS_lwp_self		164
3520Sstevel@tonic-gate #define	SYS_lwp_sigmask		165
3530Sstevel@tonic-gate #define	SYS_lwp_private		166
3540Sstevel@tonic-gate #define	SYS_lwp_wait		167
3550Sstevel@tonic-gate #define	SYS_lwp_mutex_wakeup	168
3560Sstevel@tonic-gate #define	SYS_lwp_mutex_lock	169
3570Sstevel@tonic-gate #define	SYS_lwp_cond_wait	170
3580Sstevel@tonic-gate #define	SYS_lwp_cond_signal	171
3590Sstevel@tonic-gate #define	SYS_lwp_cond_broadcast	172
3600Sstevel@tonic-gate #define	SYS_pread		173
3610Sstevel@tonic-gate #define	SYS_pwrite		174
3620Sstevel@tonic-gate #define	SYS_llseek		175
3630Sstevel@tonic-gate #define	SYS_inst_sync		176
3642712Snn35248 #define	SYS_brand		177
3650Sstevel@tonic-gate #define	SYS_kaio		178
3660Sstevel@tonic-gate 	/*
3670Sstevel@tonic-gate 	 * subcodes:
3680Sstevel@tonic-gate 	 *	aioread(...)	:: kaio(AIOREAD, ...)
3690Sstevel@tonic-gate 	 *	aiowrite(...)	:: kaio(AIOWRITE, ...)
3700Sstevel@tonic-gate 	 *	aiowait(...)	:: kaio(AIOWAIT, ...)
3710Sstevel@tonic-gate 	 *	aiocancel(...)	:: kaio(AIOCANCEL, ...)
3720Sstevel@tonic-gate 	 *	aionotify()	:: kaio(AIONOTIFY)
3730Sstevel@tonic-gate 	 *	aioinit()	:: kaio(AIOINIT)
3740Sstevel@tonic-gate 	 *	aiostart()	:: kaio(AIOSTART)
3750Sstevel@tonic-gate 	 *	see <sys/aio.h>
3760Sstevel@tonic-gate 	 */
3770Sstevel@tonic-gate #define	SYS_cpc			179
3780Sstevel@tonic-gate #define	SYS_lgrpsys		180
3790Sstevel@tonic-gate #define	SYS_meminfosys		SYS_lgrpsys
3800Sstevel@tonic-gate 	/*
3810Sstevel@tonic-gate 	 * subcodes:
3820Sstevel@tonic-gate 	 * 	meminfo(...) :: meminfosys(MISYS_MEMINFO, ...)
3830Sstevel@tonic-gate 	 */
3840Sstevel@tonic-gate #define	SYS_rusagesys		181
3850Sstevel@tonic-gate 	/*
3860Sstevel@tonic-gate 	 * subcodes:
3870Sstevel@tonic-gate 	 *	getrusage(...) :: rusagesys(RUSAGESYS_GETRUSAGE,...)
3880Sstevel@tonic-gate 	 */
3890Sstevel@tonic-gate #define	SYS_port		182
3900Sstevel@tonic-gate 	/*
3910Sstevel@tonic-gate 	 * subcodes:
3920Sstevel@tonic-gate 	 *	port_create(...) :: portfs(PORT_CREATE, ...)
3930Sstevel@tonic-gate 	 *	port_associate(...) :: portfs(PORT_ASSOCIATE, ...)
3940Sstevel@tonic-gate 	 *	port_dissociate(...) :: portfs(PORT_DISSOCIATE, ...)
3950Sstevel@tonic-gate 	 *	port_send(...) :: portfs(PORT_SEND, ...)
3960Sstevel@tonic-gate 	 *	port_sendn(...) :: portfs(PORT_SENDN, ...)
3970Sstevel@tonic-gate 	 *	port_get(...) :: portfs(PORT_GET, ...)
3980Sstevel@tonic-gate 	 *	port_getn(...) :: portfs(PORT_GETN, ...)
3990Sstevel@tonic-gate 	 *	port_alert(...) :: portfs(PORT_ALERT, ...)
4000Sstevel@tonic-gate 	 *	port_dispatch(...) :: portfs(PORT_DISPATCH, ...)
4010Sstevel@tonic-gate 	 */
4020Sstevel@tonic-gate #define	SYS_pollsys		183
4031676Sjpk #define	SYS_labelsys		184
4040Sstevel@tonic-gate #define	SYS_acl			185
4050Sstevel@tonic-gate #define	SYS_auditsys		186
4060Sstevel@tonic-gate #define	SYS_processor_bind	187
4070Sstevel@tonic-gate #define	SYS_processor_info	188
4080Sstevel@tonic-gate #define	SYS_p_online		189
4090Sstevel@tonic-gate #define	SYS_sigqueue		190
4100Sstevel@tonic-gate #define	SYS_clock_gettime	191
4110Sstevel@tonic-gate #define	SYS_clock_settime	192
4120Sstevel@tonic-gate #define	SYS_clock_getres	193
4130Sstevel@tonic-gate #define	SYS_timer_create	194
4140Sstevel@tonic-gate #define	SYS_timer_delete	195
4150Sstevel@tonic-gate #define	SYS_timer_settime	196
4160Sstevel@tonic-gate #define	SYS_timer_gettime	197
4170Sstevel@tonic-gate #define	SYS_timer_getoverrun	198
4180Sstevel@tonic-gate #define	SYS_nanosleep		199
4190Sstevel@tonic-gate #define	SYS_facl		200
4200Sstevel@tonic-gate #define	SYS_door		201
4210Sstevel@tonic-gate 	/*
4220Sstevel@tonic-gate 	 * Door Subcodes:
4230Sstevel@tonic-gate 	 *	0	door_create
4240Sstevel@tonic-gate 	 *	1	door_revoke
4250Sstevel@tonic-gate 	 *	2	door_info
4260Sstevel@tonic-gate 	 *	3	door_call
4270Sstevel@tonic-gate 	 *	4	door_return
4280Sstevel@tonic-gate 	 */
4290Sstevel@tonic-gate #define	SYS_setreuid		202
4300Sstevel@tonic-gate #define	SYS_setregid		203
4310Sstevel@tonic-gate #define	SYS_install_utrap	204
4320Sstevel@tonic-gate #define	SYS_signotify		205
4330Sstevel@tonic-gate #define	SYS_schedctl		206
4340Sstevel@tonic-gate #define	SYS_pset		207
4350Sstevel@tonic-gate #define	SYS_sparc_utrap_install	208
4360Sstevel@tonic-gate #define	SYS_resolvepath		209
4370Sstevel@tonic-gate #define	SYS_lwp_mutex_timedlock	210
4380Sstevel@tonic-gate #define	SYS_lwp_sema_timedwait	211
4390Sstevel@tonic-gate #define	SYS_lwp_rwlock_sys	212
4400Sstevel@tonic-gate 	/*
4410Sstevel@tonic-gate 	 * subcodes:
4420Sstevel@tonic-gate 	 *	lwp_rwlock_rdlock(...)    :: syscall(212, 0, ...)
4430Sstevel@tonic-gate 	 *	lwp_rwlock_wrlock(...)    :: syscall(212, 1, ...)
4440Sstevel@tonic-gate 	 *	lwp_rwlock_tryrdlock(...) :: syscall(212, 2, ...)
4450Sstevel@tonic-gate 	 *	lwp_rwlock_trywrlock(...) :: syscall(212, 3, ...)
4460Sstevel@tonic-gate 	 *	lwp_rwlock_unlock(...)    :: syscall(212, 4, ...)
4470Sstevel@tonic-gate 	 */
4480Sstevel@tonic-gate /* system calls for large file ( > 2 gigabyte) support */
4490Sstevel@tonic-gate #define	SYS_getdents64		213
4500Sstevel@tonic-gate #define	SYS_mmap64		214
4510Sstevel@tonic-gate #define	SYS_stat64		215
4520Sstevel@tonic-gate #define	SYS_lstat64		216
4530Sstevel@tonic-gate #define	SYS_fstat64		217
4540Sstevel@tonic-gate #define	SYS_statvfs64		218
4550Sstevel@tonic-gate #define	SYS_fstatvfs64		219
4560Sstevel@tonic-gate #define	SYS_setrlimit64		220
4570Sstevel@tonic-gate #define	SYS_getrlimit64		221
4580Sstevel@tonic-gate #define	SYS_pread64		222
4590Sstevel@tonic-gate #define	SYS_pwrite64		223
4600Sstevel@tonic-gate #define	SYS_creat64		224
4610Sstevel@tonic-gate #define	SYS_open64		225
4620Sstevel@tonic-gate #define	SYS_rpcsys		226
4630Sstevel@tonic-gate #define	SYS_zone		227
4640Sstevel@tonic-gate 	/*
4650Sstevel@tonic-gate 	 * subcodes:
4660Sstevel@tonic-gate 	 *	zone_create(...) :: zone(ZONE_CREATE, ...)
4670Sstevel@tonic-gate 	 *	zone_destroy(...) :: zone(ZONE_DESTROY, ...)
4680Sstevel@tonic-gate 	 *	zone_getattr(...) :: zone(ZONE_GETATTR, ...)
4690Sstevel@tonic-gate 	 *	zone_enter(...) :: zone(ZONE_ENTER, ...)
4700Sstevel@tonic-gate 	 *	zone_list(...) :: zone(ZONE_LIST, ...)
4710Sstevel@tonic-gate 	 *	zone_shutdown(...) :: zone(ZONE_SHUTDOWN, ...)
4720Sstevel@tonic-gate 	 *	zone_lookup(...) :: zone(ZONE_LOOKUP, ...)
4732712Snn35248 	 *	zone_setattr(...) :: zone(ZONE_SETATTR, ...)
4742712Snn35248 	 *	zone_getattr(...) :: zone(ZONE_GETATTR, ...)
4750Sstevel@tonic-gate 	 */
4760Sstevel@tonic-gate #define	SYS_autofssys		228
4770Sstevel@tonic-gate #define	SYS_getcwd		229
4780Sstevel@tonic-gate #define	SYS_so_socket		230
4790Sstevel@tonic-gate #define	SYS_so_socketpair	231
4800Sstevel@tonic-gate #define	SYS_bind		232
4810Sstevel@tonic-gate #define	SYS_listen		233
4820Sstevel@tonic-gate #define	SYS_accept		234
4830Sstevel@tonic-gate #define	SYS_connect		235
4840Sstevel@tonic-gate #define	SYS_shutdown		236
4850Sstevel@tonic-gate #define	SYS_recv		237
4860Sstevel@tonic-gate #define	SYS_recvfrom		238
4870Sstevel@tonic-gate #define	SYS_recvmsg		239
4880Sstevel@tonic-gate #define	SYS_send		240
4890Sstevel@tonic-gate #define	SYS_sendmsg		241
4900Sstevel@tonic-gate #define	SYS_sendto		242
4910Sstevel@tonic-gate #define	SYS_getpeername		243
4920Sstevel@tonic-gate #define	SYS_getsockname		244
4930Sstevel@tonic-gate #define	SYS_getsockopt		245
4940Sstevel@tonic-gate #define	SYS_setsockopt		246
4950Sstevel@tonic-gate #define	SYS_sockconfig		247
4960Sstevel@tonic-gate 	/*
4970Sstevel@tonic-gate 	 * NTP codes
4980Sstevel@tonic-gate 	 */
4990Sstevel@tonic-gate #define	SYS_ntp_gettime		248
5000Sstevel@tonic-gate #define	SYS_ntp_adjtime		249
5010Sstevel@tonic-gate #define	SYS_lwp_mutex_unlock	250
5020Sstevel@tonic-gate #define	SYS_lwp_mutex_trylock	251
5030Sstevel@tonic-gate #define	SYS_lwp_mutex_init	252
5040Sstevel@tonic-gate #define	SYS_cladm		253
5052712Snn35248 #define	SYS_uucopy		254
5060Sstevel@tonic-gate #define	SYS_umount2		255
5070Sstevel@tonic-gate 
5080Sstevel@tonic-gate 
5090Sstevel@tonic-gate #ifndef	_ASM
5100Sstevel@tonic-gate 
5110Sstevel@tonic-gate typedef struct {		/* syscall set type */
5120Sstevel@tonic-gate 	unsigned int	word[16];
5130Sstevel@tonic-gate } sysset_t;
5140Sstevel@tonic-gate 
5150Sstevel@tonic-gate #if !defined(_KERNEL)
5160Sstevel@tonic-gate 
5170Sstevel@tonic-gate typedef struct {	/* return values from system call */
5180Sstevel@tonic-gate 	long	sys_rval1;	/* primary return value from system call */
5190Sstevel@tonic-gate 	long	sys_rval2;	/* second return value from system call */
5200Sstevel@tonic-gate } sysret_t;
5210Sstevel@tonic-gate 
5220Sstevel@tonic-gate #if defined(__STDC__)
5230Sstevel@tonic-gate extern int	syscall(int, ...);
5240Sstevel@tonic-gate extern int	__systemcall(sysret_t *, int, ...);
5250Sstevel@tonic-gate extern int	__set_errno(int);
5260Sstevel@tonic-gate #else
5270Sstevel@tonic-gate extern int	syscall();
5280Sstevel@tonic-gate extern int	__systemcall();
5290Sstevel@tonic-gate extern int	__set_errno();
5300Sstevel@tonic-gate #endif
5310Sstevel@tonic-gate 
5320Sstevel@tonic-gate #endif	/* _KERNEL */
5330Sstevel@tonic-gate 
5340Sstevel@tonic-gate #endif	/* _ASM */
5350Sstevel@tonic-gate 
5360Sstevel@tonic-gate #ifdef	__cplusplus
5370Sstevel@tonic-gate }
5380Sstevel@tonic-gate #endif
5390Sstevel@tonic-gate 
5400Sstevel@tonic-gate #endif	/* _SYS_SYSCALL_H */
541