xref: /titanic_51/usr/src/uts/common/sys/syscall.h (revision 9d12795f87b63c2e39e87bff369182edd34677d3)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
545916cd2Sjpk  * Common Development and Distribution License (the "License").
645916cd2Sjpk  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
21657b1f3dSraf 
227c478bd9Sstevel@tonic-gate /*
23ba3594baSGarrett D'Amore  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24794f0adbSRoger A. Faulkner  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
252a12f85aSJeremy Jones  * Copyright (c) 2013 by Delphix. All rights reserved.
26fca543caSDJ Hoffman  * Copyright (c) 2015, Joyent, Inc.  All rights reserved.
277c478bd9Sstevel@tonic-gate  */
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
307c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
317c478bd9Sstevel@tonic-gate 
327c478bd9Sstevel@tonic-gate #ifndef	_SYS_SYSCALL_H
337c478bd9Sstevel@tonic-gate #define	_SYS_SYSCALL_H
347c478bd9Sstevel@tonic-gate 
357c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
367c478bd9Sstevel@tonic-gate extern "C" {
377c478bd9Sstevel@tonic-gate #endif
387c478bd9Sstevel@tonic-gate 
397c478bd9Sstevel@tonic-gate /*
407c478bd9Sstevel@tonic-gate  *	system call numbers
417c478bd9Sstevel@tonic-gate  *		syscall(SYS_xxxx, ...)
427c478bd9Sstevel@tonic-gate  */
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate 	/* syscall enumeration MUST begin with 1 */
457c478bd9Sstevel@tonic-gate 
467c478bd9Sstevel@tonic-gate 	/*
477c478bd9Sstevel@tonic-gate 	 * SunOS/SPARC uses 0 for the indirect system call SYS_syscall
487c478bd9Sstevel@tonic-gate 	 * but this doesn't count because it is just another way
497c478bd9Sstevel@tonic-gate 	 * to specify the real system call number.
507c478bd9Sstevel@tonic-gate 	 */
517c478bd9Sstevel@tonic-gate 
527c478bd9Sstevel@tonic-gate #define	SYS_syscall	0
537c478bd9Sstevel@tonic-gate #define	SYS_exit	1
547c478bd9Sstevel@tonic-gate #define	SYS_read	3
557c478bd9Sstevel@tonic-gate #define	SYS_write	4
567c478bd9Sstevel@tonic-gate #define	SYS_open	5
577c478bd9Sstevel@tonic-gate #define	SYS_close	6
58794f0adbSRoger A. Faulkner #define	SYS_linkat	7
597c478bd9Sstevel@tonic-gate #define	SYS_link	9
607c478bd9Sstevel@tonic-gate #define	SYS_unlink	10
61794f0adbSRoger A. Faulkner #define	SYS_symlinkat	11
627c478bd9Sstevel@tonic-gate #define	SYS_chdir	12
637c478bd9Sstevel@tonic-gate #define	SYS_time	13
647c478bd9Sstevel@tonic-gate #define	SYS_mknod	14
657c478bd9Sstevel@tonic-gate #define	SYS_chmod	15
667c478bd9Sstevel@tonic-gate #define	SYS_chown	16
677c478bd9Sstevel@tonic-gate #define	SYS_brk		17
687c478bd9Sstevel@tonic-gate #define	SYS_stat	18
697c478bd9Sstevel@tonic-gate #define	SYS_lseek	19
707c478bd9Sstevel@tonic-gate #define	SYS_getpid	20
717c478bd9Sstevel@tonic-gate #define	SYS_mount	21
72794f0adbSRoger A. Faulkner #define	SYS_readlinkat	22
737c478bd9Sstevel@tonic-gate #define	SYS_setuid	23
747c478bd9Sstevel@tonic-gate #define	SYS_getuid	24
757c478bd9Sstevel@tonic-gate #define	SYS_stime	25
767c478bd9Sstevel@tonic-gate #define	SYS_pcsample	26
777c478bd9Sstevel@tonic-gate #define	SYS_alarm	27
787c478bd9Sstevel@tonic-gate #define	SYS_fstat	28
797c478bd9Sstevel@tonic-gate #define	SYS_pause	29
807c478bd9Sstevel@tonic-gate #define	SYS_stty	31
817c478bd9Sstevel@tonic-gate #define	SYS_gtty	32
827c478bd9Sstevel@tonic-gate #define	SYS_access	33
837c478bd9Sstevel@tonic-gate #define	SYS_nice	34
847c478bd9Sstevel@tonic-gate #define	SYS_statfs	35
857c478bd9Sstevel@tonic-gate #define	SYS_sync	36
867c478bd9Sstevel@tonic-gate #define	SYS_kill	37
877c478bd9Sstevel@tonic-gate #define	SYS_fstatfs	38
887c478bd9Sstevel@tonic-gate #define	SYS_pgrpsys	39
897c478bd9Sstevel@tonic-gate 	/*
907c478bd9Sstevel@tonic-gate 	 * subcodes:
917c478bd9Sstevel@tonic-gate 	 *	getpgrp()	  :: syscall(39,0)
927c478bd9Sstevel@tonic-gate 	 *	setpgrp()	  :: syscall(39,1)
937c478bd9Sstevel@tonic-gate 	 *	getsid(pid)	  :: syscall(39,2,pid)
947c478bd9Sstevel@tonic-gate 	 *	setsid()	  :: syscall(39,3)
957c478bd9Sstevel@tonic-gate 	 *	getpgid(pid)	  :: syscall(39,4,pid)
967c478bd9Sstevel@tonic-gate 	 *	setpgid(pid,pgid) :: syscall(39,5,pid,pgid)
977c478bd9Sstevel@tonic-gate 	 */
989acbbeafSnn35248 #define	SYS_uucopystr	40
997c478bd9Sstevel@tonic-gate #define	SYS_pipe	42
1007c478bd9Sstevel@tonic-gate #define	SYS_times	43
1017c478bd9Sstevel@tonic-gate #define	SYS_profil	44
1028fd04b83SRoger A. Faulkner #define	SYS_faccessat	45
1037c478bd9Sstevel@tonic-gate #define	SYS_setgid	46
1047c478bd9Sstevel@tonic-gate #define	SYS_getgid	47
105794f0adbSRoger A. Faulkner #define	SYS_mknodat	48
1067c478bd9Sstevel@tonic-gate #define	SYS_msgsys	49
1077c478bd9Sstevel@tonic-gate 	/*
1087c478bd9Sstevel@tonic-gate 	 * subcodes:
1097c478bd9Sstevel@tonic-gate 	 *	msgget(...)  :: msgsys(0, ...)
1107c478bd9Sstevel@tonic-gate 	 *	msgctl(...)  :: msgsys(1, ...)
1117c478bd9Sstevel@tonic-gate 	 *	msgrcv(...)  :: msgsys(2, ...)
1127c478bd9Sstevel@tonic-gate 	 *	msgsnd(...)  :: msgsys(3, ...)
1137c478bd9Sstevel@tonic-gate 	 *	msgids(...)  :: msgsys(4, ...)
1147c478bd9Sstevel@tonic-gate 	 *	msgsnap(...) :: msgsys(5, ...)
1157c478bd9Sstevel@tonic-gate 	 *	see <sys/msg.h>
1167c478bd9Sstevel@tonic-gate 	 */
1177c478bd9Sstevel@tonic-gate #define	SYS_sysi86	50
1187c478bd9Sstevel@tonic-gate 	/*
1197c478bd9Sstevel@tonic-gate 	 * subcodes:
120a574db85Sraf 	 *	sysi86(code, ...)
1217c478bd9Sstevel@tonic-gate 	 */
1227c478bd9Sstevel@tonic-gate #define	SYS_acct	51
1237c478bd9Sstevel@tonic-gate #define	SYS_shmsys	52
1247c478bd9Sstevel@tonic-gate 	/*
1257c478bd9Sstevel@tonic-gate 	 * subcodes:
1267c478bd9Sstevel@tonic-gate 	 *	shmat (...) :: shmsys(0, ...)
1277c478bd9Sstevel@tonic-gate 	 *	shmctl(...) :: shmsys(1, ...)
1287c478bd9Sstevel@tonic-gate 	 *	shmdt (...) :: shmsys(2, ...)
1297c478bd9Sstevel@tonic-gate 	 *	shmget(...) :: shmsys(3, ...)
1307c478bd9Sstevel@tonic-gate 	 *	shmids(...) :: shmsys(4, ...)
1317c478bd9Sstevel@tonic-gate 	 *	see <sys/shm.h>
1327c478bd9Sstevel@tonic-gate 	 */
1337c478bd9Sstevel@tonic-gate #define	SYS_semsys	53
1347c478bd9Sstevel@tonic-gate 	/*
1357c478bd9Sstevel@tonic-gate 	 * subcodes:
1367c478bd9Sstevel@tonic-gate 	 *	semctl(...) :: semsys(0, ...)
1377c478bd9Sstevel@tonic-gate 	 *	semget(...) :: semsys(1, ...)
1387c478bd9Sstevel@tonic-gate 	 *	semop (...) :: semsys(2, ...)
1397c478bd9Sstevel@tonic-gate 	 *	semids(...) :: semsys(3, ...)
1407c478bd9Sstevel@tonic-gate 	 *	semtimedop(...) :: semsys(4, ...)
1417c478bd9Sstevel@tonic-gate 	 *	see <sys/sem.h>
1427c478bd9Sstevel@tonic-gate 	 */
1437c478bd9Sstevel@tonic-gate #define	SYS_ioctl	54
1447c478bd9Sstevel@tonic-gate #define	SYS_uadmin	55
1458fd04b83SRoger A. Faulkner #define	SYS_fchownat	56
1467c478bd9Sstevel@tonic-gate #define	SYS_utssys	57
1477c478bd9Sstevel@tonic-gate 	/*
1487c478bd9Sstevel@tonic-gate 	 * subcodes (third argument):
1497c478bd9Sstevel@tonic-gate 	 *	uname(obuf)  (obsolete)   :: syscall(57, obuf, ign, 0)
1507c478bd9Sstevel@tonic-gate 	 *					subcode 1 unused
1517c478bd9Sstevel@tonic-gate 	 *	ustat(dev, obuf)	  :: syscall(57, obuf, dev, 2)
1527c478bd9Sstevel@tonic-gate 	 *	fusers(path, flags, obuf) :: syscall(57, path, flags, 3, obuf)
1537c478bd9Sstevel@tonic-gate 	 *	see <sys/utssys.h>
1547c478bd9Sstevel@tonic-gate 	 */
1557c478bd9Sstevel@tonic-gate #define	SYS_fdsync	58
1567c478bd9Sstevel@tonic-gate #define	SYS_execve	59
1577c478bd9Sstevel@tonic-gate #define	SYS_umask	60
1587c478bd9Sstevel@tonic-gate #define	SYS_chroot	61
1597c478bd9Sstevel@tonic-gate #define	SYS_fcntl	62
1607c478bd9Sstevel@tonic-gate #define	SYS_ulimit	63
1618fd04b83SRoger A. Faulkner #define	SYS_renameat	64
1628fd04b83SRoger A. Faulkner #define	SYS_unlinkat	65
1638fd04b83SRoger A. Faulkner #define	SYS_fstatat	66
1648fd04b83SRoger A. Faulkner #define	SYS_fstatat64	67
1658fd04b83SRoger A. Faulkner #define	SYS_openat	68
1668fd04b83SRoger A. Faulkner #define	SYS_openat64	69
1677c478bd9Sstevel@tonic-gate #define	SYS_tasksys	70
1687c478bd9Sstevel@tonic-gate 	/*
1697c478bd9Sstevel@tonic-gate 	 * subcodes:
1707c478bd9Sstevel@tonic-gate 	 * 	settaskid(...) :: tasksys(0, ...)
1717c478bd9Sstevel@tonic-gate 	 * 	gettaskid(...) :: tasksys(1, ...)
1727c478bd9Sstevel@tonic-gate 	 * 	getprojid(...) :: tasksys(2, ...)
1737c478bd9Sstevel@tonic-gate 	 */
1747c478bd9Sstevel@tonic-gate #define	SYS_acctctl	71
1757c478bd9Sstevel@tonic-gate #define	SYS_exacctsys	72
1767c478bd9Sstevel@tonic-gate 	/*
1777c478bd9Sstevel@tonic-gate 	 * subcodes:
1787c478bd9Sstevel@tonic-gate 	 * 	getacct(...) :: exacct(0, ...)
1797c478bd9Sstevel@tonic-gate 	 * 	putacct(...) :: exacct(1, ...)
1807c478bd9Sstevel@tonic-gate 	 * 	wracct(...) :: exacct(2, ...)
1817c478bd9Sstevel@tonic-gate 	 */
1827c478bd9Sstevel@tonic-gate #define	SYS_getpagesizes	73
18302bc52beSkchow 	/*
18402bc52beSkchow 	 * subcodes:
18502bc52beSkchow 	 *	getpagesizes2(...)	:: getpagesizes(0, ...)
18602bc52beSkchow 	 * 	getpagesizes(...)	:: getpagesizes(1, ...) legacy
18702bc52beSkchow 	 */
1887c478bd9Sstevel@tonic-gate #define	SYS_rctlsys	74
1897c478bd9Sstevel@tonic-gate 	/*
1907c478bd9Sstevel@tonic-gate 	 * subcodes:
1917c478bd9Sstevel@tonic-gate 	 * 	getrctl(...) :: rctlsys(0, ...)
1927c478bd9Sstevel@tonic-gate 	 * 	setrctl(...) :: rctlsys(1, ...)
1937c478bd9Sstevel@tonic-gate 	 * 	rctllist(...) :: rctlsys(2, ...)
1947c478bd9Sstevel@tonic-gate 	 * 	rctlctl(...) :: rctlsys(3, ...)
1957c478bd9Sstevel@tonic-gate 	 */
196f48205beScasper #define	SYS_sidsys	75
197f48205beScasper 	/*
198f48205beScasper 	 * subcodes:
199f48205beScasper 	 * 	allocids(...)		:: sidsys(0, ...)
200f48205beScasper 	 * 	idmap_reg(...)		:: sidsys(1, ...)
201f48205beScasper 	 * 	idmap_unreg(...)	:: sidsys(2, ...)
202f48205beScasper 	 */
2037c478bd9Sstevel@tonic-gate #define	SYS_lwp_park	77
2047c478bd9Sstevel@tonic-gate 	/*
2057c478bd9Sstevel@tonic-gate 	 * subcodes:
2067c478bd9Sstevel@tonic-gate 	 *	_lwp_park(timespec_t *, lwpid_t)	:: syslwp_park(0, ...)
2077c478bd9Sstevel@tonic-gate 	 *	_lwp_unpark(lwpid_t, int)		:: syslwp_park(1, ...)
2087c478bd9Sstevel@tonic-gate 	 *	_lwp_unpark_all(lwpid_t *, int)		:: syslwp_park(2, ...)
20947eb4d1eSsl108498 	 *	_lwp_unpark_cancel(lwpid_t *, int)	:: syslwp_park(3, ...)
21047eb4d1eSsl108498 	 *	_lwp_set_park(lwpid_t *, int)		:: syslwp_park(4, ...)
2117c478bd9Sstevel@tonic-gate 	 */
2127c478bd9Sstevel@tonic-gate #define	SYS_sendfilev	78
2137c478bd9Sstevel@tonic-gate 	/*
2147c478bd9Sstevel@tonic-gate 	 * subcodes :
2157c478bd9Sstevel@tonic-gate 	 * 	sendfilev()   :: sendfilev(0, ...)
2167c478bd9Sstevel@tonic-gate 	 * 	sendfilev64() :: sendfilev(1, ...)
2177c478bd9Sstevel@tonic-gate 	 */
2187c478bd9Sstevel@tonic-gate #define	SYS_rmdir	79
2197c478bd9Sstevel@tonic-gate #define	SYS_mkdir	80
2207c478bd9Sstevel@tonic-gate #define	SYS_getdents	81
2217c478bd9Sstevel@tonic-gate #define	SYS_privsys	82
2227c478bd9Sstevel@tonic-gate 	/*
2237c478bd9Sstevel@tonic-gate 	 * subcodes:
2247c478bd9Sstevel@tonic-gate 	 * 	setppriv(...)		:: privsys(0, ...)
2257c478bd9Sstevel@tonic-gate 	 * 	getppriv(...)		:: privsys(1, ...)
2267c478bd9Sstevel@tonic-gate 	 * 	getimplinfo(...)	:: privsys(2, ...)
2277c478bd9Sstevel@tonic-gate 	 * 	setpflags(...) 		:: privsys(3, ...)
2287c478bd9Sstevel@tonic-gate 	 * 	getpflags(...) 		:: privsys(4, ...)
229f48205beScasper 	 *	issetugid();		:: privsys(5)
2307c478bd9Sstevel@tonic-gate 	 */
2317c478bd9Sstevel@tonic-gate #define	SYS_ucredsys	83
2327c478bd9Sstevel@tonic-gate 	/*
2337c478bd9Sstevel@tonic-gate 	 * subcodes:
2347c478bd9Sstevel@tonic-gate 	 *	ucred_get(...)		:: ucredsys(0, ...)
2357c478bd9Sstevel@tonic-gate 	 *	getpeerucred(...)	:: ucredsys(1, ...)
2367c478bd9Sstevel@tonic-gate 	 */
2377c478bd9Sstevel@tonic-gate #define	SYS_sysfs	84
2387c478bd9Sstevel@tonic-gate 	/*
2397c478bd9Sstevel@tonic-gate 	 * subcodes:
2407c478bd9Sstevel@tonic-gate 	 *	sysfs(code, ...)
2417c478bd9Sstevel@tonic-gate 	 *	see <sys/fstyp.h>
2427c478bd9Sstevel@tonic-gate 	 */
2437c478bd9Sstevel@tonic-gate #define	SYS_getmsg	85
2447c478bd9Sstevel@tonic-gate #define	SYS_putmsg	86
2457c478bd9Sstevel@tonic-gate #define	SYS_lstat	88
2467c478bd9Sstevel@tonic-gate #define	SYS_symlink	89
2477c478bd9Sstevel@tonic-gate #define	SYS_readlink	90
2487c478bd9Sstevel@tonic-gate #define	SYS_setgroups	91
2497c478bd9Sstevel@tonic-gate #define	SYS_getgroups	92
2507c478bd9Sstevel@tonic-gate #define	SYS_fchmod	93
2517c478bd9Sstevel@tonic-gate #define	SYS_fchown	94
2527c478bd9Sstevel@tonic-gate #define	SYS_sigprocmask	95
2537c478bd9Sstevel@tonic-gate #define	SYS_sigsuspend	96
2547c478bd9Sstevel@tonic-gate #define	SYS_sigaltstack	97
2557c478bd9Sstevel@tonic-gate #define	SYS_sigaction	98
2567c478bd9Sstevel@tonic-gate #define	SYS_sigpending	99
2577c478bd9Sstevel@tonic-gate 	/*
2587c478bd9Sstevel@tonic-gate 	 * subcodes:
2597c478bd9Sstevel@tonic-gate 	 *			subcode 0 unused
2607c478bd9Sstevel@tonic-gate 	 *	sigpending(...) :: syscall(99, 1, ...)
2617c478bd9Sstevel@tonic-gate 	 *	sigfillset(...) :: syscall(99, 2, ...)
2627c478bd9Sstevel@tonic-gate 	 */
2637c478bd9Sstevel@tonic-gate #define	SYS_context	100
2647c478bd9Sstevel@tonic-gate 	/*
2657c478bd9Sstevel@tonic-gate 	 * subcodes:
2667c478bd9Sstevel@tonic-gate 	 *	getcontext(...) :: syscall(100, 0, ...)
2677c478bd9Sstevel@tonic-gate 	 *	setcontext(...) :: syscall(100, 1, ...)
2687c478bd9Sstevel@tonic-gate 	 */
269794f0adbSRoger A. Faulkner #define	SYS_fchmodat	101
270794f0adbSRoger A. Faulkner #define	SYS_mkdirat	102
2717c478bd9Sstevel@tonic-gate #define	SYS_statvfs	103
2727c478bd9Sstevel@tonic-gate #define	SYS_fstatvfs	104
2737c478bd9Sstevel@tonic-gate #define	SYS_getloadavg	105
2747c478bd9Sstevel@tonic-gate #define	SYS_nfssys	106
275a574db85Sraf #define	SYS_waitid	107
276a574db85Sraf #define	SYS_waitsys	SYS_waitid	/* historical */
2777c478bd9Sstevel@tonic-gate #define	SYS_sigsendsys	108
2787c478bd9Sstevel@tonic-gate #define	SYS_hrtsys	109
2793b862e9aSRoger A. Faulkner #define	SYS_utimesys	110
2803b862e9aSRoger A. Faulkner 	/*
2813b862e9aSRoger A. Faulkner 	 * subcodes:
2823b862e9aSRoger A. Faulkner 	 *	futimens(...)	:: syscall(110, 0, ...)
2833b862e9aSRoger A. Faulkner 	 *	utimensat(...)	:: syscall(110, 1, ...)
2843b862e9aSRoger A. Faulkner 	 */
285f48068adSraf #define	SYS_sigresend	111
2867c478bd9Sstevel@tonic-gate #define	SYS_priocntlsys	112
2877c478bd9Sstevel@tonic-gate #define	SYS_pathconf	113
2887c478bd9Sstevel@tonic-gate #define	SYS_mincore	114
2897c478bd9Sstevel@tonic-gate #define	SYS_mmap	115
2907c478bd9Sstevel@tonic-gate #define	SYS_mprotect	116
2917c478bd9Sstevel@tonic-gate #define	SYS_munmap	117
2927c478bd9Sstevel@tonic-gate #define	SYS_fpathconf	118
2937c478bd9Sstevel@tonic-gate #define	SYS_vfork	119
2947c478bd9Sstevel@tonic-gate #define	SYS_fchdir	120
2957c478bd9Sstevel@tonic-gate #define	SYS_readv	121
2967c478bd9Sstevel@tonic-gate #define	SYS_writev	122
297fca543caSDJ Hoffman #define	SYS_preadv	123
298fca543caSDJ Hoffman #define	SYS_pwritev	124
299*9d12795fSRobert Mustacchi #define	SYS_getrandom	126
3000616c1c3SMichael Corcoran #define	SYS_mmapobj	127
3017c478bd9Sstevel@tonic-gate #define	SYS_setrlimit	128
3027c478bd9Sstevel@tonic-gate #define	SYS_getrlimit	129
3037c478bd9Sstevel@tonic-gate #define	SYS_lchown	130
3047c478bd9Sstevel@tonic-gate #define	SYS_memcntl	131
3057c478bd9Sstevel@tonic-gate #define	SYS_getpmsg	132
3067c478bd9Sstevel@tonic-gate #define	SYS_putpmsg	133
3077c478bd9Sstevel@tonic-gate #define	SYS_rename	134
3087c478bd9Sstevel@tonic-gate #define	SYS_uname	135
3097c478bd9Sstevel@tonic-gate #define	SYS_setegid	136
3107c478bd9Sstevel@tonic-gate #define	SYS_sysconfig	137
3117c478bd9Sstevel@tonic-gate #define	SYS_adjtime	138
3127c478bd9Sstevel@tonic-gate #define	SYS_systeminfo	139
313a237e38eSth199096 #define	SYS_sharefs	140
3147c478bd9Sstevel@tonic-gate #define	SYS_seteuid	141
315657b1f3dSraf #define	SYS_forksys	142
316657b1f3dSraf 	/*
317657b1f3dSraf 	 * subcodes:
318657b1f3dSraf 	 *	forkx(flags)    :: forksys(0, flags)
319657b1f3dSraf 	 *	forkallx(flags) :: forksys(1, flags)
320657b1f3dSraf 	 *	vforkx(flags)   :: forksys(2, flags)
321657b1f3dSraf 	 */
3227c478bd9Sstevel@tonic-gate #define	SYS_sigtimedwait	144
3237c478bd9Sstevel@tonic-gate #define	SYS_lwp_info	145
3247c478bd9Sstevel@tonic-gate #define	SYS_yield	146
3257c478bd9Sstevel@tonic-gate #define	SYS_lwp_sema_post	148
3267c478bd9Sstevel@tonic-gate #define	SYS_lwp_sema_trywait	149
3277c478bd9Sstevel@tonic-gate #define	SYS_lwp_detach	150
3287c478bd9Sstevel@tonic-gate #define	SYS_corectl	151
3297c478bd9Sstevel@tonic-gate #define	SYS_modctl	152
3307c478bd9Sstevel@tonic-gate #define	SYS_fchroot	153
3317c478bd9Sstevel@tonic-gate #define	SYS_vhangup	155
3327c478bd9Sstevel@tonic-gate #define	SYS_gettimeofday	156
3337c478bd9Sstevel@tonic-gate #define	SYS_getitimer		157
3347c478bd9Sstevel@tonic-gate #define	SYS_setitimer		158
3357c478bd9Sstevel@tonic-gate #define	SYS_lwp_create		159
3367c478bd9Sstevel@tonic-gate #define	SYS_lwp_exit		160
3377c478bd9Sstevel@tonic-gate #define	SYS_lwp_suspend		161
3387c478bd9Sstevel@tonic-gate #define	SYS_lwp_continue	162
3397c478bd9Sstevel@tonic-gate #define	SYS_lwp_kill		163
3407c478bd9Sstevel@tonic-gate #define	SYS_lwp_self		164
3417c478bd9Sstevel@tonic-gate #define	SYS_lwp_sigmask		165
3427c478bd9Sstevel@tonic-gate #define	SYS_lwp_private		166
3437c478bd9Sstevel@tonic-gate #define	SYS_lwp_wait		167
3447c478bd9Sstevel@tonic-gate #define	SYS_lwp_mutex_wakeup	168
3457c478bd9Sstevel@tonic-gate #define	SYS_lwp_cond_wait	170
3467c478bd9Sstevel@tonic-gate #define	SYS_lwp_cond_signal	171
3477c478bd9Sstevel@tonic-gate #define	SYS_lwp_cond_broadcast	172
3487c478bd9Sstevel@tonic-gate #define	SYS_pread		173
3497c478bd9Sstevel@tonic-gate #define	SYS_pwrite		174
3507c478bd9Sstevel@tonic-gate #define	SYS_llseek		175
3517c478bd9Sstevel@tonic-gate #define	SYS_inst_sync		176
3529acbbeafSnn35248 #define	SYS_brand		177
3537c478bd9Sstevel@tonic-gate #define	SYS_kaio		178
3547c478bd9Sstevel@tonic-gate 	/*
3557c478bd9Sstevel@tonic-gate 	 * subcodes:
3567c478bd9Sstevel@tonic-gate 	 *	aioread(...)	:: kaio(AIOREAD, ...)
3577c478bd9Sstevel@tonic-gate 	 *	aiowrite(...)	:: kaio(AIOWRITE, ...)
3587c478bd9Sstevel@tonic-gate 	 *	aiowait(...)	:: kaio(AIOWAIT, ...)
3597c478bd9Sstevel@tonic-gate 	 *	aiocancel(...)	:: kaio(AIOCANCEL, ...)
3607c478bd9Sstevel@tonic-gate 	 *	aionotify()	:: kaio(AIONOTIFY)
3617c478bd9Sstevel@tonic-gate 	 *	aioinit()	:: kaio(AIOINIT)
3627c478bd9Sstevel@tonic-gate 	 *	aiostart()	:: kaio(AIOSTART)
3637c478bd9Sstevel@tonic-gate 	 *	see <sys/aio.h>
3647c478bd9Sstevel@tonic-gate 	 */
3657c478bd9Sstevel@tonic-gate #define	SYS_cpc			179
3667c478bd9Sstevel@tonic-gate #define	SYS_lgrpsys		180
3677c478bd9Sstevel@tonic-gate #define	SYS_meminfosys		SYS_lgrpsys
3687c478bd9Sstevel@tonic-gate 	/*
3697c478bd9Sstevel@tonic-gate 	 * subcodes:
3707c478bd9Sstevel@tonic-gate 	 * 	meminfo(...) :: meminfosys(MISYS_MEMINFO, ...)
3717c478bd9Sstevel@tonic-gate 	 */
3727c478bd9Sstevel@tonic-gate #define	SYS_rusagesys		181
3737c478bd9Sstevel@tonic-gate 	/*
3747c478bd9Sstevel@tonic-gate 	 * subcodes:
3757c478bd9Sstevel@tonic-gate 	 *	getrusage(...) :: rusagesys(RUSAGESYS_GETRUSAGE, ...)
3760209230bSgjelinek 	 *	getvmusage(...)    :: rusagesys(RUSAGESYS_GETVMUSAGE, ...)
3777c478bd9Sstevel@tonic-gate 	 */
3787c478bd9Sstevel@tonic-gate #define	SYS_port		182
3797c478bd9Sstevel@tonic-gate 	/*
3807c478bd9Sstevel@tonic-gate 	 * subcodes:
3817c478bd9Sstevel@tonic-gate 	 *	port_create(...) :: portfs(PORT_CREATE, ...)
3827c478bd9Sstevel@tonic-gate 	 *	port_associate(...) :: portfs(PORT_ASSOCIATE, ...)
3837c478bd9Sstevel@tonic-gate 	 *	port_dissociate(...) :: portfs(PORT_DISSOCIATE, ...)
3847c478bd9Sstevel@tonic-gate 	 *	port_send(...) :: portfs(PORT_SEND, ...)
3857c478bd9Sstevel@tonic-gate 	 *	port_sendn(...) :: portfs(PORT_SENDN, ...)
3867c478bd9Sstevel@tonic-gate 	 *	port_get(...) :: portfs(PORT_GET, ...)
3877c478bd9Sstevel@tonic-gate 	 *	port_getn(...) :: portfs(PORT_GETN, ...)
3887c478bd9Sstevel@tonic-gate 	 *	port_alert(...) :: portfs(PORT_ALERT, ...)
3897c478bd9Sstevel@tonic-gate 	 *	port_dispatch(...) :: portfs(PORT_DISPATCH, ...)
3907c478bd9Sstevel@tonic-gate 	 */
3917c478bd9Sstevel@tonic-gate #define	SYS_pollsys		183
39245916cd2Sjpk #define	SYS_labelsys		184
3937c478bd9Sstevel@tonic-gate #define	SYS_acl			185
3947c478bd9Sstevel@tonic-gate #define	SYS_auditsys		186
3957c478bd9Sstevel@tonic-gate #define	SYS_processor_bind	187
3967c478bd9Sstevel@tonic-gate #define	SYS_processor_info	188
3977c478bd9Sstevel@tonic-gate #define	SYS_p_online		189
3987c478bd9Sstevel@tonic-gate #define	SYS_sigqueue		190
3997c478bd9Sstevel@tonic-gate #define	SYS_clock_gettime	191
4007c478bd9Sstevel@tonic-gate #define	SYS_clock_settime	192
4017c478bd9Sstevel@tonic-gate #define	SYS_clock_getres	193
4027c478bd9Sstevel@tonic-gate #define	SYS_timer_create	194
4037c478bd9Sstevel@tonic-gate #define	SYS_timer_delete	195
4047c478bd9Sstevel@tonic-gate #define	SYS_timer_settime	196
4057c478bd9Sstevel@tonic-gate #define	SYS_timer_gettime	197
4067c478bd9Sstevel@tonic-gate #define	SYS_timer_getoverrun	198
4077c478bd9Sstevel@tonic-gate #define	SYS_nanosleep		199
4087c478bd9Sstevel@tonic-gate #define	SYS_facl		200
4097c478bd9Sstevel@tonic-gate #define	SYS_door		201
4107c478bd9Sstevel@tonic-gate 	/*
4117c478bd9Sstevel@tonic-gate 	 * Door Subcodes:
4127c478bd9Sstevel@tonic-gate 	 *	0	door_create
4137c478bd9Sstevel@tonic-gate 	 *	1	door_revoke
4147c478bd9Sstevel@tonic-gate 	 *	2	door_info
4157c478bd9Sstevel@tonic-gate 	 *	3	door_call
4167c478bd9Sstevel@tonic-gate 	 *	4	door_return
4177c478bd9Sstevel@tonic-gate 	 */
4187c478bd9Sstevel@tonic-gate #define	SYS_setreuid		202
4197c478bd9Sstevel@tonic-gate #define	SYS_setregid		203
4207c478bd9Sstevel@tonic-gate #define	SYS_install_utrap	204
4217c478bd9Sstevel@tonic-gate #define	SYS_signotify		205
4227c478bd9Sstevel@tonic-gate #define	SYS_schedctl		206
4237c478bd9Sstevel@tonic-gate #define	SYS_pset		207
4247c478bd9Sstevel@tonic-gate #define	SYS_sparc_utrap_install	208
4257c478bd9Sstevel@tonic-gate #define	SYS_resolvepath		209
4267c478bd9Sstevel@tonic-gate #define	SYS_lwp_mutex_timedlock	210
4277c478bd9Sstevel@tonic-gate #define	SYS_lwp_sema_timedwait	211
4287c478bd9Sstevel@tonic-gate #define	SYS_lwp_rwlock_sys	212
4297c478bd9Sstevel@tonic-gate 	/*
4307c478bd9Sstevel@tonic-gate 	 * subcodes:
4317c478bd9Sstevel@tonic-gate 	 *	lwp_rwlock_rdlock(...)    :: syscall(212, 0, ...)
4327c478bd9Sstevel@tonic-gate 	 *	lwp_rwlock_wrlock(...)    :: syscall(212, 1, ...)
4337c478bd9Sstevel@tonic-gate 	 *	lwp_rwlock_tryrdlock(...) :: syscall(212, 2, ...)
4347c478bd9Sstevel@tonic-gate 	 *	lwp_rwlock_trywrlock(...) :: syscall(212, 3, ...)
4357c478bd9Sstevel@tonic-gate 	 *	lwp_rwlock_unlock(...)    :: syscall(212, 4, ...)
4367c478bd9Sstevel@tonic-gate 	 */
4377c478bd9Sstevel@tonic-gate /* system calls for large file ( > 2 gigabyte) support */
4387c478bd9Sstevel@tonic-gate #define	SYS_getdents64		213
4397c478bd9Sstevel@tonic-gate #define	SYS_mmap64		214
4407c478bd9Sstevel@tonic-gate #define	SYS_stat64		215
4417c478bd9Sstevel@tonic-gate #define	SYS_lstat64		216
4427c478bd9Sstevel@tonic-gate #define	SYS_fstat64		217
4437c478bd9Sstevel@tonic-gate #define	SYS_statvfs64		218
4447c478bd9Sstevel@tonic-gate #define	SYS_fstatvfs64		219
4457c478bd9Sstevel@tonic-gate #define	SYS_setrlimit64		220
4467c478bd9Sstevel@tonic-gate #define	SYS_getrlimit64		221
4477c478bd9Sstevel@tonic-gate #define	SYS_pread64		222
4487c478bd9Sstevel@tonic-gate #define	SYS_pwrite64		223
4497c478bd9Sstevel@tonic-gate #define	SYS_open64		225
4507c478bd9Sstevel@tonic-gate #define	SYS_rpcsys		226
4517c478bd9Sstevel@tonic-gate #define	SYS_zone		227
4527c478bd9Sstevel@tonic-gate 	/*
4537c478bd9Sstevel@tonic-gate 	 * subcodes:
4547c478bd9Sstevel@tonic-gate 	 *	zone_create(...) :: zone(ZONE_CREATE, ...)
4557c478bd9Sstevel@tonic-gate 	 *	zone_destroy(...) :: zone(ZONE_DESTROY, ...)
4567c478bd9Sstevel@tonic-gate 	 *	zone_getattr(...) :: zone(ZONE_GETATTR, ...)
4577c478bd9Sstevel@tonic-gate 	 *	zone_enter(...) :: zone(ZONE_ENTER, ...)
4587c478bd9Sstevel@tonic-gate 	 *	zone_list(...) :: zone(ZONE_LIST, ...)
4597c478bd9Sstevel@tonic-gate 	 *	zone_shutdown(...) :: zone(ZONE_SHUTDOWN, ...)
4607c478bd9Sstevel@tonic-gate 	 *	zone_lookup(...) :: zone(ZONE_LOOKUP, ...)
461f4b3ec61Sdh155122 	 *	zone_boot(...) :: zone(ZONE_BOOT, ...)
462f4b3ec61Sdh155122 	 *	zone_version(...) :: zone(ZONE_VERSION, ...)
4639acbbeafSnn35248 	 *	zone_setattr(...) :: zone(ZONE_SETATTR, ...)
464f4b3ec61Sdh155122 	 *	zone_add_datalink(...) :: zone(ZONE_ADD_DATALINK, ...)
465f4b3ec61Sdh155122 	 *	zone_remove_datalink(...) :: zone(ZONE_DEL_DATALINK, ...)
466f4b3ec61Sdh155122 	 *	zone_check_datalink(...) :: zone(ZONE_CHECK_DATALINK, ...)
467f4b3ec61Sdh155122 	 *	zone_list_datalink(...) :: zone(ZONE_LIST_DATALINK, ...)
4687c478bd9Sstevel@tonic-gate 	 */
4697c478bd9Sstevel@tonic-gate #define	SYS_autofssys		228
4707c478bd9Sstevel@tonic-gate #define	SYS_getcwd		229
4717c478bd9Sstevel@tonic-gate #define	SYS_so_socket		230
4727c478bd9Sstevel@tonic-gate #define	SYS_so_socketpair	231
4737c478bd9Sstevel@tonic-gate #define	SYS_bind		232
4747c478bd9Sstevel@tonic-gate #define	SYS_listen		233
4757c478bd9Sstevel@tonic-gate #define	SYS_accept		234
4767c478bd9Sstevel@tonic-gate #define	SYS_connect		235
4777c478bd9Sstevel@tonic-gate #define	SYS_shutdown		236
4787c478bd9Sstevel@tonic-gate #define	SYS_recv		237
4797c478bd9Sstevel@tonic-gate #define	SYS_recvfrom		238
4807c478bd9Sstevel@tonic-gate #define	SYS_recvmsg		239
4817c478bd9Sstevel@tonic-gate #define	SYS_send		240
4827c478bd9Sstevel@tonic-gate #define	SYS_sendmsg		241
4837c478bd9Sstevel@tonic-gate #define	SYS_sendto		242
4847c478bd9Sstevel@tonic-gate #define	SYS_getpeername		243
4857c478bd9Sstevel@tonic-gate #define	SYS_getsockname		244
4867c478bd9Sstevel@tonic-gate #define	SYS_getsockopt		245
4877c478bd9Sstevel@tonic-gate #define	SYS_setsockopt		246
4887c478bd9Sstevel@tonic-gate #define	SYS_sockconfig		247
4897c478bd9Sstevel@tonic-gate 	/*
4907c478bd9Sstevel@tonic-gate 	 * NTP codes
4917c478bd9Sstevel@tonic-gate 	 */
4927c478bd9Sstevel@tonic-gate #define	SYS_ntp_gettime		248
4937c478bd9Sstevel@tonic-gate #define	SYS_ntp_adjtime		249
4947c478bd9Sstevel@tonic-gate #define	SYS_lwp_mutex_unlock	250
4957c478bd9Sstevel@tonic-gate #define	SYS_lwp_mutex_trylock	251
496883492d5Sraf #define	SYS_lwp_mutex_register	252
4977c478bd9Sstevel@tonic-gate #define	SYS_cladm		253
4989acbbeafSnn35248 #define	SYS_uucopy		254
4997c478bd9Sstevel@tonic-gate #define	SYS_umount2		255
5007c478bd9Sstevel@tonic-gate 
5017c478bd9Sstevel@tonic-gate #ifndef	_ASM
5027c478bd9Sstevel@tonic-gate 
5037c478bd9Sstevel@tonic-gate typedef struct {		/* syscall set type */
5047c478bd9Sstevel@tonic-gate 	unsigned int	word[16];
5057c478bd9Sstevel@tonic-gate } sysset_t;
5067c478bd9Sstevel@tonic-gate 
5077c478bd9Sstevel@tonic-gate typedef struct {	/* return values from system call */
5087c478bd9Sstevel@tonic-gate 	long	sys_rval1;	/* primary return value from system call */
5097c478bd9Sstevel@tonic-gate 	long	sys_rval2;	/* second return value from system call */
5107c478bd9Sstevel@tonic-gate } sysret_t;
5117c478bd9Sstevel@tonic-gate 
5122a12f85aSJeremy Jones #if !defined(_KERNEL)
5132a12f85aSJeremy Jones 
5147c478bd9Sstevel@tonic-gate extern int	syscall(int, ...);
5157c478bd9Sstevel@tonic-gate extern int	__systemcall(sysret_t *, int, ...);
5167c478bd9Sstevel@tonic-gate extern int	__set_errno(int);
5177c478bd9Sstevel@tonic-gate 
5187c478bd9Sstevel@tonic-gate #endif	/* _KERNEL */
5197c478bd9Sstevel@tonic-gate 
5207c478bd9Sstevel@tonic-gate #endif	/* _ASM */
5217c478bd9Sstevel@tonic-gate 
5227c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
5237c478bd9Sstevel@tonic-gate }
5247c478bd9Sstevel@tonic-gate #endif
5257c478bd9Sstevel@tonic-gate 
5267c478bd9Sstevel@tonic-gate #endif	/* _SYS_SYSCALL_H */
527