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