xref: /onnv-gate/usr/src/uts/intel/sys/old_procfs.h (revision 11135:5b5c2c84a4d5)
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*11135SRoger.Faulkner@Sun.COM  * Common Development and Distribution License (the "License").
6*11135SRoger.Faulkner@Sun.COM  * 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*11135SRoger.Faulkner@Sun.COM 
220Sstevel@tonic-gate /*
23*11135SRoger.Faulkner@Sun.COM  * Copyright 2009 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_OLD_PROCFS_H
310Sstevel@tonic-gate #define	_SYS_OLD_PROCFS_H
320Sstevel@tonic-gate 
330Sstevel@tonic-gate /*
340Sstevel@tonic-gate  * This file contains the definitions for the old ioctl()-based
350Sstevel@tonic-gate  * version of the process file system.  It is obsolete but will
360Sstevel@tonic-gate  * continue to be supported in SunOS until the next major release.
370Sstevel@tonic-gate  */
380Sstevel@tonic-gate 
390Sstevel@tonic-gate #include <sys/types.h>
400Sstevel@tonic-gate #include <sys/time_impl.h>
410Sstevel@tonic-gate #include <sys/signal.h>
420Sstevel@tonic-gate #include <sys/siginfo.h>
430Sstevel@tonic-gate #include <sys/fault.h>
440Sstevel@tonic-gate #include <sys/syscall.h>
450Sstevel@tonic-gate #include <sys/procfs_isa.h>
460Sstevel@tonic-gate 
470Sstevel@tonic-gate #ifdef	__cplusplus
480Sstevel@tonic-gate extern "C" {
490Sstevel@tonic-gate #endif
500Sstevel@tonic-gate 
510Sstevel@tonic-gate #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
520Sstevel@tonic-gate #error	"Cannot use procfs in the large file compilation environment"
530Sstevel@tonic-gate #endif
540Sstevel@tonic-gate 
550Sstevel@tonic-gate #if _STRUCTURED_PROC == 0
560Sstevel@tonic-gate 
570Sstevel@tonic-gate /*
58*11135SRoger.Faulkner@Sun.COM  * The old (ioctl-based) and new (structured) /proc interfaces define
59*11135SRoger.Faulkner@Sun.COM  * related structures of the same name, but slightly diferent contents:
60*11135SRoger.Faulkner@Sun.COM  *	prmap_t
61*11135SRoger.Faulkner@Sun.COM  *	prcred_t
62*11135SRoger.Faulkner@Sun.COM  * This doesn't hurt because you can't include both of these
63*11135SRoger.Faulkner@Sun.COM  * in the same compilation unit:
64*11135SRoger.Faulkner@Sun.COM  *	<sys/procfs.h>
65*11135SRoger.Faulkner@Sun.COM  *	<sys/old_procfs.h>
66*11135SRoger.Faulkner@Sun.COM  * unless _STRUCTURED_PROC is first defined to be 1.
67*11135SRoger.Faulkner@Sun.COM  * (Including <procfs.h> defines it to be 1.)
68*11135SRoger.Faulkner@Sun.COM  *
69*11135SRoger.Faulkner@Sun.COM  * However, the latest version of lint goes overboard in hunting
70*11135SRoger.Faulkner@Sun.COM  * down and reporting differences in functions and data of the
71*11135SRoger.Faulkner@Sun.COM  * same name across multiple compilation units, even though there
72*11135SRoger.Faulkner@Sun.COM  * is no real problem.  To mitigate this, we redefine the old procfs
73*11135SRoger.Faulkner@Sun.COM  * names when performing lint.
74*11135SRoger.Faulkner@Sun.COM  */
75*11135SRoger.Faulkner@Sun.COM #if defined(__lint)
76*11135SRoger.Faulkner@Sun.COM #define	prmap		Prmap
77*11135SRoger.Faulkner@Sun.COM #define	prmap_t		Prmap_t
78*11135SRoger.Faulkner@Sun.COM #define	prcred		Prcred
79*11135SRoger.Faulkner@Sun.COM #define	prcred_t	Prcred_t
80*11135SRoger.Faulkner@Sun.COM #endif	/* __lint */
81*11135SRoger.Faulkner@Sun.COM 
82*11135SRoger.Faulkner@Sun.COM /*
830Sstevel@tonic-gate  * ioctl codes and system call interfaces for /proc.
840Sstevel@tonic-gate  */
850Sstevel@tonic-gate 
860Sstevel@tonic-gate #define	PIOC		('q'<<8)
870Sstevel@tonic-gate #define	PIOCSTATUS	(PIOC|1)	/* get process status */
880Sstevel@tonic-gate #define	PIOCSTOP	(PIOC|2)	/* post STOP request and... */
890Sstevel@tonic-gate #define	PIOCWSTOP	(PIOC|3)	/* wait for process to STOP */
900Sstevel@tonic-gate #define	PIOCRUN		(PIOC|4)	/* make process runnable */
910Sstevel@tonic-gate #define	PIOCGTRACE	(PIOC|5)	/* get traced signal set */
920Sstevel@tonic-gate #define	PIOCSTRACE	(PIOC|6)	/* set traced signal set */
930Sstevel@tonic-gate #define	PIOCSSIG	(PIOC|7)	/* set current signal */
940Sstevel@tonic-gate #define	PIOCKILL	(PIOC|8)	/* send signal */
950Sstevel@tonic-gate #define	PIOCUNKILL	(PIOC|9)	/* delete a signal */
960Sstevel@tonic-gate #define	PIOCGHOLD	(PIOC|10)	/* get held signal set */
970Sstevel@tonic-gate #define	PIOCSHOLD	(PIOC|11)	/* set held signal set */
980Sstevel@tonic-gate #define	PIOCMAXSIG	(PIOC|12)	/* get max signal number */
990Sstevel@tonic-gate #define	PIOCACTION	(PIOC|13)	/* get signal action structs */
1000Sstevel@tonic-gate #define	PIOCGFAULT	(PIOC|14)	/* get traced fault set */
1010Sstevel@tonic-gate #define	PIOCSFAULT	(PIOC|15)	/* set traced fault set */
1020Sstevel@tonic-gate #define	PIOCCFAULT	(PIOC|16)	/* clear current fault */
1030Sstevel@tonic-gate #define	PIOCGENTRY	(PIOC|17)	/* get syscall entry set */
1040Sstevel@tonic-gate #define	PIOCSENTRY	(PIOC|18)	/* set syscall entry set */
1050Sstevel@tonic-gate #define	PIOCGEXIT	(PIOC|19)	/* get syscall exit set */
1060Sstevel@tonic-gate #define	PIOCSEXIT	(PIOC|20)	/* set syscall exit set */
1070Sstevel@tonic-gate 
1080Sstevel@tonic-gate /*
1090Sstevel@tonic-gate  * These four are obsolete (replaced by PIOCSET/PIOCRESET).
1100Sstevel@tonic-gate  */
1110Sstevel@tonic-gate #define	PIOCSFORK	(PIOC|21)	/* set inherit-on-fork flag */
1120Sstevel@tonic-gate #define	PIOCRFORK	(PIOC|22)	/* reset inherit-on-fork flag */
1130Sstevel@tonic-gate #define	PIOCSRLC	(PIOC|23)	/* set run-on-last-close flag */
1140Sstevel@tonic-gate #define	PIOCRRLC	(PIOC|24)	/* reset run-on-last-close flag */
1150Sstevel@tonic-gate 
1160Sstevel@tonic-gate #define	PIOCGREG	(PIOC|25)	/* get general registers */
1170Sstevel@tonic-gate #define	PIOCSREG	(PIOC|26)	/* set general registers */
1180Sstevel@tonic-gate #define	PIOCGFPREG	(PIOC|27)	/* get floating-point registers */
1190Sstevel@tonic-gate #define	PIOCSFPREG	(PIOC|28)	/* set floating-point registers */
1200Sstevel@tonic-gate #define	PIOCNICE	(PIOC|29)	/* set nice priority */
1210Sstevel@tonic-gate #define	PIOCPSINFO	(PIOC|30)	/* get ps(1) information */
1220Sstevel@tonic-gate #define	PIOCNMAP	(PIOC|31)	/* get number of memory mappings */
1230Sstevel@tonic-gate #define	PIOCMAP		(PIOC|32)	/* get memory map information */
1240Sstevel@tonic-gate #define	PIOCOPENM	(PIOC|33)	/* open mapped object for reading */
1250Sstevel@tonic-gate #define	PIOCCRED	(PIOC|34)	/* get process credentials */
1260Sstevel@tonic-gate #define	PIOCGROUPS	(PIOC|35)	/* get supplementary groups */
1270Sstevel@tonic-gate #define	PIOCGETPR	(PIOC|36)	/* read struct proc */
1280Sstevel@tonic-gate #define	PIOCGETU	(PIOC|37)	/* read user area */
1290Sstevel@tonic-gate 
1300Sstevel@tonic-gate /*
1310Sstevel@tonic-gate  * These are new with SunOS5.0.
1320Sstevel@tonic-gate  */
1330Sstevel@tonic-gate #define	PIOCSET		(PIOC|38)	/* set process flags */
1340Sstevel@tonic-gate #define	PIOCRESET	(PIOC|39)	/* reset process flags */
1350Sstevel@tonic-gate #define	PIOCUSAGE	(PIOC|43)	/* get resource usage */
1360Sstevel@tonic-gate #define	PIOCOPENPD	(PIOC|44)	/* get page data file descriptor */
1370Sstevel@tonic-gate 
1380Sstevel@tonic-gate /*
1390Sstevel@tonic-gate  * Lightweight process interfaces.
1400Sstevel@tonic-gate  */
1410Sstevel@tonic-gate #define	PIOCLWPIDS	(PIOC|45)	/* get lwp identifiers */
1420Sstevel@tonic-gate #define	PIOCOPENLWP	(PIOC|46)	/* get lwp file descriptor */
1430Sstevel@tonic-gate #define	PIOCLSTATUS	(PIOC|47)	/* get status of all lwps */
1440Sstevel@tonic-gate #define	PIOCLUSAGE	(PIOC|48)	/* get resource usage of all lwps */
1450Sstevel@tonic-gate 
1460Sstevel@tonic-gate /*
1470Sstevel@tonic-gate  * SVR4 run-time loader interfaces.
1480Sstevel@tonic-gate  */
1490Sstevel@tonic-gate #define	PIOCNAUXV	(PIOC|49)	/* get number of aux vector entries */
1500Sstevel@tonic-gate #define	PIOCAUXV	(PIOC|50)	/* get aux vector (see sys/auxv.h) */
1510Sstevel@tonic-gate 
1520Sstevel@tonic-gate /*
1530Sstevel@tonic-gate  * extra register state interfaces
1540Sstevel@tonic-gate  */
1550Sstevel@tonic-gate #define	PIOCGXREGSIZE	(PIOC|51)	/* get extra register state size */
1560Sstevel@tonic-gate #define	PIOCGXREG	(PIOC|52)	/* get extra register state */
1570Sstevel@tonic-gate #define	PIOCSXREG	(PIOC|53)	/* set extra register state */
1580Sstevel@tonic-gate 
1590Sstevel@tonic-gate /*
1600Sstevel@tonic-gate  * Intel-specific interfaces.
1610Sstevel@tonic-gate  */
1620Sstevel@tonic-gate #define	PIOCNLDT	(PIOC|103)	/* get number of LDT entries */
1630Sstevel@tonic-gate #define	PIOCLDT		(PIOC|104)	/* get LDT (see sys/sysi86.h) */
1640Sstevel@tonic-gate 
1650Sstevel@tonic-gate /* Process/lwp status structure */
1660Sstevel@tonic-gate 
1670Sstevel@tonic-gate #define	PRCLSZ		8	/* maximum size of scheduling class name */
1680Sstevel@tonic-gate #define	PRSYSARGS	8	/* maximum number of syscall arguments */
1690Sstevel@tonic-gate 
1700Sstevel@tonic-gate #endif	/* _STRUCTURED_PROC == 0 */
1710Sstevel@tonic-gate 
1720Sstevel@tonic-gate typedef struct prstatus {
1730Sstevel@tonic-gate 	int	pr_flags;	/* Flags (see below) */
1740Sstevel@tonic-gate 	short	pr_why;		/* Reason for process stop (if stopped) */
1750Sstevel@tonic-gate 	short	pr_what;	/* More detailed reason */
1760Sstevel@tonic-gate 	siginfo_t pr_info;	/* Info associated with signal or fault */
1770Sstevel@tonic-gate 	short	pr_cursig;	/* Current signal */
1780Sstevel@tonic-gate 	ushort_t pr_nlwp;	/* Number of lwps in the process */
1790Sstevel@tonic-gate 	sigset_t pr_sigpend;	/* Set of signals pending to the process */
1800Sstevel@tonic-gate 	sigset_t pr_sighold;	/* Set of signals held (blocked) by the lwp */
1810Sstevel@tonic-gate 	struct	sigaltstack pr_altstack; /* Alternate signal stack info */
1820Sstevel@tonic-gate 	struct	sigaction pr_action; /* Signal action for current signal */
1830Sstevel@tonic-gate 	pid_t	pr_pid;		/* Process id */
1840Sstevel@tonic-gate 	pid_t	pr_ppid;	/* Parent process id */
1850Sstevel@tonic-gate 	pid_t	pr_pgrp;	/* Process group id */
1860Sstevel@tonic-gate 	pid_t	pr_sid;		/* Session id */
1870Sstevel@tonic-gate 	timestruc_t pr_utime;	/* Process user cpu time */
1880Sstevel@tonic-gate 	timestruc_t pr_stime;	/* Process system cpu time */
1890Sstevel@tonic-gate 	timestruc_t pr_cutime;	/* Sum of children's user times */
1900Sstevel@tonic-gate 	timestruc_t pr_cstime;	/* Sum of children's system times */
1910Sstevel@tonic-gate 	char	pr_clname[PRCLSZ]; /* Scheduling class name */
1920Sstevel@tonic-gate 	short	pr_syscall;	/* System call number (if in syscall) */
1930Sstevel@tonic-gate 	short	pr_nsysarg;	/* Number of arguments to this syscall */
1940Sstevel@tonic-gate 	long	pr_sysarg[PRSYSARGS]; /* Arguments to this syscall */
1950Sstevel@tonic-gate 	id_t	pr_who;		/* Specific lwp identifier */
1960Sstevel@tonic-gate 	sigset_t pr_lwppend;	/* Set of signals pending to the lwp */
1970Sstevel@tonic-gate 	struct ucontext *pr_oldcontext; /* Address of previous ucontext */
1980Sstevel@tonic-gate 	caddr_t	pr_brkbase;	/* Address of the process heap */
1990Sstevel@tonic-gate 	size_t	pr_brksize;	/* Size of the process heap, in bytes */
2000Sstevel@tonic-gate 	caddr_t	pr_stkbase;	/* Address of the process stack */
2010Sstevel@tonic-gate 	size_t	pr_stksize;	/* Size of the process stack, in bytes */
2020Sstevel@tonic-gate 	short	pr_processor;	/* processor which last ran this LWP */
2030Sstevel@tonic-gate 	short	pr_bind;	/* processor LWP bound to or PBIND_NONE */
2040Sstevel@tonic-gate 	long	pr_instr;	/* Current instruction */
2050Sstevel@tonic-gate 	prgregset_t pr_reg;	/* General registers */
2060Sstevel@tonic-gate } prstatus_t;
2070Sstevel@tonic-gate 
2080Sstevel@tonic-gate #if _STRUCTURED_PROC == 0
2090Sstevel@tonic-gate 
2100Sstevel@tonic-gate /* pr_flags */
2110Sstevel@tonic-gate 
2120Sstevel@tonic-gate #define	PR_STOPPED	0x0001	/* lwp is stopped */
2130Sstevel@tonic-gate #define	PR_ISTOP	0x0002	/* lwp is stopped on an event of interest */
2140Sstevel@tonic-gate #define	PR_DSTOP	0x0004	/* lwp has a stop directive in effect */
2150Sstevel@tonic-gate #define	PR_ASLEEP	0x0008	/* lwp is sleeping in a system call */
2160Sstevel@tonic-gate #define	PR_FORK		0x0010	/* inherit-on-fork is in effect */
2170Sstevel@tonic-gate #define	PR_RLC		0x0020	/* run-on-last-close is in effect */
2180Sstevel@tonic-gate #define	PR_PTRACE	0x0040	/* obsolete, never set in SunOS5.0 */
2190Sstevel@tonic-gate #define	PR_PCINVAL	0x0080	/* contents of pr_instr undefined */
2200Sstevel@tonic-gate #define	PR_ISSYS	0x0100	/* system process */
2210Sstevel@tonic-gate #define	PR_STEP		0x0200	/* lwp has a single-step directive in effect */
2220Sstevel@tonic-gate #define	PR_KLC		0x0400	/* kill-on-last-close is in effect */
2230Sstevel@tonic-gate #define	PR_ASYNC	0x0800	/* asynchronous-stop is in effect */
2240Sstevel@tonic-gate #define	PR_PCOMPAT	0x1000	/* ptrace-compatibility mode is in effect */
2250Sstevel@tonic-gate #define	PR_MSACCT	0x2000	/* micro-state usage accounting is in effect */
2260Sstevel@tonic-gate #define	PR_BPTADJ	0x4000	/* breakpoint trap pc adjustment is in effect */
2270Sstevel@tonic-gate #define	PR_ASLWP	0x8000	/* obsolete flag; never set */
2280Sstevel@tonic-gate 
2290Sstevel@tonic-gate /* Reasons for stopping */
2300Sstevel@tonic-gate 
2310Sstevel@tonic-gate #define	PR_REQUESTED	1
2320Sstevel@tonic-gate #define	PR_SIGNALLED	2
2330Sstevel@tonic-gate #define	PR_SYSENTRY	3
2340Sstevel@tonic-gate #define	PR_SYSEXIT	4
2350Sstevel@tonic-gate #define	PR_JOBCONTROL	5
2360Sstevel@tonic-gate #define	PR_FAULTED	6
2370Sstevel@tonic-gate #define	PR_SUSPENDED	7
2380Sstevel@tonic-gate #define	PR_CHECKPOINT	8
2390Sstevel@tonic-gate 
2400Sstevel@tonic-gate /* Information for the ps(1) command */
2410Sstevel@tonic-gate 
2420Sstevel@tonic-gate #define	PRFNSZ		16		/* max size of execed filename */
2430Sstevel@tonic-gate #define	PRARGSZ		80		/* Number of chars of arguments */
2440Sstevel@tonic-gate 
2450Sstevel@tonic-gate #endif	/* _STRUCTURED_PROC == 0 */
2460Sstevel@tonic-gate 
2470Sstevel@tonic-gate typedef struct prpsinfo {
2480Sstevel@tonic-gate 	char	pr_state;	/* numeric process state (see pr_sname) */
2490Sstevel@tonic-gate 	char	pr_sname;	/* printable character representing pr_state */
2500Sstevel@tonic-gate 	char	pr_zomb;	/* !=0: process terminated but not waited for */
2510Sstevel@tonic-gate 	char	pr_nice;	/* nice for cpu usage */
2520Sstevel@tonic-gate 	uint_t	pr_flag;	/* process flags */
2530Sstevel@tonic-gate 	uid_t	pr_uid;		/* real user id */
2540Sstevel@tonic-gate 	gid_t	pr_gid;		/* real group id */
2550Sstevel@tonic-gate 	pid_t	pr_pid;		/* unique process id */
2560Sstevel@tonic-gate 	pid_t	pr_ppid;	/* process id of parent */
2570Sstevel@tonic-gate 	pid_t	pr_pgrp;	/* pid of process group leader */
2580Sstevel@tonic-gate 	pid_t	pr_sid;		/* session id */
2590Sstevel@tonic-gate 	caddr_t	pr_addr;	/* physical address of process */
2600Sstevel@tonic-gate 	size_t	pr_size;	/* size of process image in pages */
2610Sstevel@tonic-gate 	size_t	pr_rssize;	/* resident set size in pages */
2620Sstevel@tonic-gate 	caddr_t	pr_wchan;	/* wait addr for sleeping process */
2630Sstevel@tonic-gate 	timestruc_t pr_start;	/* process start time, sec+nsec since epoch */
2640Sstevel@tonic-gate 	timestruc_t pr_time;	/* usr+sys cpu time for this process */
2650Sstevel@tonic-gate 	int	pr_pri;		/* priority, high value is high priority */
2660Sstevel@tonic-gate 	char	pr_oldpri;	/* pre-SVR4, low value is high priority */
2670Sstevel@tonic-gate 	char	pr_cpu;		/* pre-SVR4, cpu usage for scheduling */
2680Sstevel@tonic-gate 	o_dev_t	pr_ottydev;	/* short tty device number */
2690Sstevel@tonic-gate 	dev_t	pr_lttydev;	/* controlling tty device (PRNODEV if none) */
2700Sstevel@tonic-gate 	char	pr_clname[PRCLSZ];	/* scheduling class name */
2710Sstevel@tonic-gate 	char	pr_fname[PRFNSZ];	/* last component of execed pathname */
2720Sstevel@tonic-gate 	char	pr_psargs[PRARGSZ];	/* initial characters of arg list */
2730Sstevel@tonic-gate 	short	pr_syscall;	/* system call number (if in syscall) */
2740Sstevel@tonic-gate 	short	pr_fill;
2750Sstevel@tonic-gate 	timestruc_t pr_ctime;	/* usr+sys cpu time for reaped children */
2760Sstevel@tonic-gate 	size_t	pr_bysize;	/* size of process image in bytes */
2770Sstevel@tonic-gate 	size_t	pr_byrssize;	/* resident set size in bytes */
2780Sstevel@tonic-gate 	int	pr_argc;	/* initial argument count */
2790Sstevel@tonic-gate 	char	**pr_argv;	/* initial argument vector */
2800Sstevel@tonic-gate 	char	**pr_envp;	/* initial environment vector */
2810Sstevel@tonic-gate 	int	pr_wstat;	/* if zombie, the wait() status */
2820Sstevel@tonic-gate 			/* The following percent numbers are 16-bit binary */
2830Sstevel@tonic-gate 			/* fractions [0 .. 1] with the binary point to the */
2840Sstevel@tonic-gate 			/* right of the high-order bit (one == 0x8000) */
2850Sstevel@tonic-gate 	ushort_t pr_pctcpu;	/* % of recent cpu time, one or all lwps */
2860Sstevel@tonic-gate 	ushort_t pr_pctmem;	/* % of of system memory used by the process */
2870Sstevel@tonic-gate 	uid_t	pr_euid;	/* effective user id */
2880Sstevel@tonic-gate 	gid_t	pr_egid;	/* effective group id */
2890Sstevel@tonic-gate 	id_t	pr_aslwpid;	/* historical; now always zero */
2900Sstevel@tonic-gate 	char	pr_dmodel;	/* data model of the process */
2910Sstevel@tonic-gate 	char	pr_pad[3];
2920Sstevel@tonic-gate 	int	pr_filler[6];	/* for future expansion */
2930Sstevel@tonic-gate } prpsinfo_t;
2940Sstevel@tonic-gate 
2950Sstevel@tonic-gate #if _STRUCTURED_PROC == 0
2960Sstevel@tonic-gate 
2970Sstevel@tonic-gate #if !defined(_STYPES)
2980Sstevel@tonic-gate #define	pr_ttydev	pr_lttydev
2990Sstevel@tonic-gate #else
3000Sstevel@tonic-gate #define	pr_ttydev	pr_ottydev
3010Sstevel@tonic-gate #endif
3020Sstevel@tonic-gate 
3030Sstevel@tonic-gate #define	PRNODEV	(dev_t)(-1l)	/* non-existent device */
3040Sstevel@tonic-gate 
3050Sstevel@tonic-gate /*
3060Sstevel@tonic-gate  * See <sys/procfs_isa.h> for possible values of pr_dmodel.
3070Sstevel@tonic-gate  */
3080Sstevel@tonic-gate 
3090Sstevel@tonic-gate /* Optional actions to take when process continues */
3100Sstevel@tonic-gate 
3110Sstevel@tonic-gate typedef struct prrun {
3120Sstevel@tonic-gate 	int	pr_flags;	/* Flags */
3130Sstevel@tonic-gate 	sigset_t pr_trace;	/* Set of signals to be traced */
3140Sstevel@tonic-gate 	sigset_t pr_sighold;	/* Set of signals to be held */
3150Sstevel@tonic-gate 	fltset_t pr_fault;	/* Set of faults to be traced */
3160Sstevel@tonic-gate 	caddr_t	pr_vaddr;	/* Virtual address at which to resume */
3170Sstevel@tonic-gate 	int	pr_filler[8];	/* Filler area for future expansion */
3180Sstevel@tonic-gate } prrun_t;
3190Sstevel@tonic-gate 
3200Sstevel@tonic-gate #define	PRCSIG		0x001	/* Clear current signal */
3210Sstevel@tonic-gate #define	PRCFAULT	0x002	/* Clear current fault */
3220Sstevel@tonic-gate #define	PRSTRACE	0x004	/* Use traced-signal set in pr_trace */
3230Sstevel@tonic-gate #define	PRSHOLD		0x008	/* Use held-signal set in pr_sighold */
3240Sstevel@tonic-gate #define	PRSFAULT	0x010	/* Use traced-fault set in pr_fault */
3250Sstevel@tonic-gate #define	PRSVADDR	0x020	/* Resume at virtual address in pr_vaddr */
3260Sstevel@tonic-gate #define	PRSTEP		0x040	/* Direct the lwp to single-step */
3270Sstevel@tonic-gate #define	PRSABORT	0x080	/* Abort syscall */
3280Sstevel@tonic-gate #define	PRSTOP		0x100	/* Set directed stop request */
3290Sstevel@tonic-gate 
3300Sstevel@tonic-gate /* Memory-management interface */
3310Sstevel@tonic-gate 
3320Sstevel@tonic-gate typedef struct prmap {
3330Sstevel@tonic-gate 	caddr_t		pr_vaddr;	/* Virtual address */
3340Sstevel@tonic-gate 	size_t		pr_size;	/* Size of mapping in bytes */
3350Sstevel@tonic-gate 	off_t		pr_off;		/* Offset into mapped object, if any */
3360Sstevel@tonic-gate 	uint_t		pr_mflags;	/* Protection and attribute flags */
3370Sstevel@tonic-gate 	uint_t		pr_pagesize;	/* pagesize (bytes) for this mapping */
3380Sstevel@tonic-gate 	long		pr_filler[3];	/* Filler for future expansion */
3390Sstevel@tonic-gate } prmap_t;
3400Sstevel@tonic-gate 
3410Sstevel@tonic-gate /* Protection and attribute flags */
3420Sstevel@tonic-gate 
3430Sstevel@tonic-gate #define	MA_READ		0x04	/* Readable by the traced process */
3440Sstevel@tonic-gate #define	MA_WRITE	0x02	/* Writable by the traced process */
3450Sstevel@tonic-gate #define	MA_EXEC		0x01	/* Executable by the traced process */
3460Sstevel@tonic-gate #define	MA_SHARED	0x08	/* Changes are shared by mapped object */
3470Sstevel@tonic-gate /*
3480Sstevel@tonic-gate  * These are obsolete and unreliable.
3490Sstevel@tonic-gate  * They are included here only for historical compatibility.
3500Sstevel@tonic-gate  */
3510Sstevel@tonic-gate #define	MA_BREAK	0x10	/* Grown by brk(2) */
3520Sstevel@tonic-gate #define	MA_STACK	0x20	/* Grown automatically on stack faults */
3530Sstevel@tonic-gate 
3540Sstevel@tonic-gate /* Process credentials */
3550Sstevel@tonic-gate 
3560Sstevel@tonic-gate typedef struct prcred {
3570Sstevel@tonic-gate 	uid_t	pr_euid;	/* Effective user id */
3580Sstevel@tonic-gate 	uid_t	pr_ruid;	/* Real user id */
3590Sstevel@tonic-gate 	uid_t	pr_suid;	/* Saved user id (from exec) */
3600Sstevel@tonic-gate 	gid_t	pr_egid;	/* Effective group id */
3610Sstevel@tonic-gate 	gid_t	pr_rgid;	/* Real group id */
3620Sstevel@tonic-gate 	gid_t	pr_sgid;	/* Saved group id (from exec) */
3630Sstevel@tonic-gate 	uint_t	pr_ngroups;	/* Number of supplementary groups */
3640Sstevel@tonic-gate } prcred_t;
3650Sstevel@tonic-gate 
3660Sstevel@tonic-gate /* Resource usage */
3670Sstevel@tonic-gate 
3680Sstevel@tonic-gate typedef struct prusage {
3690Sstevel@tonic-gate 	id_t		pr_lwpid;	/* lwp id.  0: process or defunct */
3700Sstevel@tonic-gate 	int		pr_count;	/* number of contributing lwps */
3710Sstevel@tonic-gate 	timestruc_t	pr_tstamp;	/* current time stamp */
3720Sstevel@tonic-gate 	timestruc_t	pr_create;	/* process/lwp creation time stamp */
3730Sstevel@tonic-gate 	timestruc_t	pr_term;	/* process/lwp termination time stamp */
3740Sstevel@tonic-gate 	timestruc_t	pr_rtime;	/* total lwp real (elapsed) time */
3750Sstevel@tonic-gate 	timestruc_t	pr_utime;	/* user level CPU time */
3760Sstevel@tonic-gate 	timestruc_t	pr_stime;	/* system call CPU time */
3770Sstevel@tonic-gate 	timestruc_t	pr_ttime;	/* other system trap CPU time */
3780Sstevel@tonic-gate 	timestruc_t	pr_tftime;	/* text page fault sleep time */
3790Sstevel@tonic-gate 	timestruc_t	pr_dftime;	/* data page fault sleep time */
3800Sstevel@tonic-gate 	timestruc_t	pr_kftime;	/* kernel page fault sleep time */
3810Sstevel@tonic-gate 	timestruc_t	pr_ltime;	/* user lock wait sleep time */
3820Sstevel@tonic-gate 	timestruc_t	pr_slptime;	/* all other sleep time */
3830Sstevel@tonic-gate 	timestruc_t	pr_wtime;	/* wait-cpu (latency) time */
3840Sstevel@tonic-gate 	timestruc_t	pr_stoptime;	/* stopped time */
3850Sstevel@tonic-gate 	timestruc_t	filltime[6];	/* filler for future expansion */
3860Sstevel@tonic-gate 	ulong_t		pr_minf;	/* minor page faults */
3870Sstevel@tonic-gate 	ulong_t		pr_majf;	/* major page faults */
3880Sstevel@tonic-gate 	ulong_t		pr_nswap;	/* swaps */
3890Sstevel@tonic-gate 	ulong_t		pr_inblk;	/* input blocks */
3900Sstevel@tonic-gate 	ulong_t		pr_oublk;	/* output blocks */
3910Sstevel@tonic-gate 	ulong_t		pr_msnd;	/* messages sent */
3920Sstevel@tonic-gate 	ulong_t		pr_mrcv;	/* messages received */
3930Sstevel@tonic-gate 	ulong_t		pr_sigs;	/* signals received */
3940Sstevel@tonic-gate 	ulong_t		pr_vctx;	/* voluntary context switches */
3950Sstevel@tonic-gate 	ulong_t		pr_ictx;	/* involuntary context switches */
3960Sstevel@tonic-gate 	ulong_t		pr_sysc;	/* system calls */
3970Sstevel@tonic-gate 	ulong_t		pr_ioch;	/* chars read and written */
3980Sstevel@tonic-gate 	ulong_t		filler[10];	/* filler for future expansion */
3990Sstevel@tonic-gate } prusage_t;
4000Sstevel@tonic-gate 
4010Sstevel@tonic-gate /* Page data */
4020Sstevel@tonic-gate 
4030Sstevel@tonic-gate /* page data file header */
4040Sstevel@tonic-gate typedef struct prpageheader {
4050Sstevel@tonic-gate 	timestruc_t	pr_tstamp;	/* real time stamp */
4060Sstevel@tonic-gate 	ulong_t		pr_nmap;	/* number of address space mappings */
4070Sstevel@tonic-gate 	ulong_t		pr_npage;	/* total number of pages */
4080Sstevel@tonic-gate } prpageheader_t;
4090Sstevel@tonic-gate 
4100Sstevel@tonic-gate /* page data mapping header */
4110Sstevel@tonic-gate typedef struct prasmap {
4120Sstevel@tonic-gate 	caddr_t		pr_vaddr;	/* virtual address */
4130Sstevel@tonic-gate 	size_t		pr_npage;	/* number of pages in mapping */
4140Sstevel@tonic-gate 	off_t		pr_off;		/* offset into mapped object, if any */
4150Sstevel@tonic-gate 	uint_t		pr_mflags;	/* protection and attribute flags */
4160Sstevel@tonic-gate 	uint_t		pr_pagesize;	/* pagesize (bytes) for this mapping */
4170Sstevel@tonic-gate 	long		pr_filler[3];	/* filler for future expansion */
4180Sstevel@tonic-gate } prasmap_t;
4190Sstevel@tonic-gate 
4200Sstevel@tonic-gate /*
4210Sstevel@tonic-gate  * npage bytes (rounded up to a sizeof (long)-byte boundary) follow
4220Sstevel@tonic-gate  * each mapping header, containing zero or more of these flags.
4230Sstevel@tonic-gate  */
4240Sstevel@tonic-gate #define	PG_REFERENCED	0x02		/* page referenced since last read */
4250Sstevel@tonic-gate #define	PG_MODIFIED	0x01		/* page modified since last read */
4260Sstevel@tonic-gate #define	PG_HWMAPPED	0x04		/* page is present and mapped */
4270Sstevel@tonic-gate 
4280Sstevel@tonic-gate /*
4290Sstevel@tonic-gate  * Macros for manipulating sets of flags.
4300Sstevel@tonic-gate  * sp must be a pointer to one of sigset_t, fltset_t, or sysset_t.
4310Sstevel@tonic-gate  * flag must be a member of the enumeration corresponding to *sp.
4320Sstevel@tonic-gate  */
4330Sstevel@tonic-gate 
4340Sstevel@tonic-gate /* turn on all flags in set */
4350Sstevel@tonic-gate #define	prfillset(sp) \
4360Sstevel@tonic-gate 	{ register int _i_ = sizeof (*(sp))/sizeof (uint32_t); \
4370Sstevel@tonic-gate 		while (_i_) ((uint32_t *)(sp))[--_i_] = (uint32_t)0xFFFFFFFF; }
4380Sstevel@tonic-gate 
4390Sstevel@tonic-gate /* turn off all flags in set */
4400Sstevel@tonic-gate #define	premptyset(sp) \
4410Sstevel@tonic-gate 	{ register int _i_ = sizeof (*(sp))/sizeof (uint32_t); \
4420Sstevel@tonic-gate 		while (_i_) ((uint32_t *)(sp))[--_i_] = (uint32_t)0; }
4430Sstevel@tonic-gate 
4440Sstevel@tonic-gate /* turn on specified flag in set */
4450Sstevel@tonic-gate #define	praddset(sp, flag) \
4460Sstevel@tonic-gate 	((void)(((unsigned)((flag)-1) < 32*sizeof (*(sp))/sizeof (uint32_t)) ? \
4470Sstevel@tonic-gate 	(((uint32_t *)(sp))[((flag)-1)/32] |= (1UL<<(((flag)-1)%32))) : 0))
4480Sstevel@tonic-gate 
4490Sstevel@tonic-gate /* turn off specified flag in set */
4500Sstevel@tonic-gate #define	prdelset(sp, flag) \
4510Sstevel@tonic-gate 	((void)(((unsigned)((flag)-1) < 32*sizeof (*(sp))/sizeof (uint32_t)) ? \
4520Sstevel@tonic-gate 	    (((uint32_t *)(sp))[((flag)-1)/32] &= ~(1UL<<(((flag)-1)%32))) : 0))
4530Sstevel@tonic-gate 
4540Sstevel@tonic-gate /* query: != 0 iff flag is turned on in set */
4550Sstevel@tonic-gate #define	prismember(sp, flag) \
4560Sstevel@tonic-gate 	(((unsigned)((flag)-1) < 32*sizeof (*(sp))/sizeof (uint32_t)) && \
4570Sstevel@tonic-gate 	    (((uint32_t *)(sp))[((flag)-1)/32] & (1UL<<(((flag)-1)%32))))
4580Sstevel@tonic-gate 
4590Sstevel@tonic-gate #endif	/* _STRUCTURED_PROC == 0 */
4600Sstevel@tonic-gate 
4610Sstevel@tonic-gate #ifdef _SYSCALL32
4620Sstevel@tonic-gate 
4630Sstevel@tonic-gate #if _STRUCTURED_PROC == 0
4640Sstevel@tonic-gate 
4650Sstevel@tonic-gate /*
4660Sstevel@tonic-gate  * dev32_t version of PRNODEV
4670Sstevel@tonic-gate  */
4680Sstevel@tonic-gate #define	PRNODEV32 (dev32_t)(-1)
4690Sstevel@tonic-gate 
4700Sstevel@tonic-gate /*
4710Sstevel@tonic-gate  * Kernel view of structures used by _ILP32 programs.
4720Sstevel@tonic-gate  */
4730Sstevel@tonic-gate 
4740Sstevel@tonic-gate #endif	/* _STRUCTURED_PROC == 0 */
4750Sstevel@tonic-gate 
4760Sstevel@tonic-gate typedef struct prstatus32 {
4770Sstevel@tonic-gate 	int32_t	pr_flags;	/* Flags */
4780Sstevel@tonic-gate 	short	pr_why;		/* Reason for process stop (if stopped) */
4790Sstevel@tonic-gate 	short	pr_what;	/* More detailed reason */
4800Sstevel@tonic-gate 	siginfo32_t pr_info;	/* Info associated with signal or fault */
4810Sstevel@tonic-gate 	short	pr_cursig;	/* Current signal */
4820Sstevel@tonic-gate 	ushort_t pr_nlwp;	/* Number of lwps in the process */
4830Sstevel@tonic-gate 	sigset_t pr_sigpend;	/* Set of signals pending to the process */
4840Sstevel@tonic-gate 	sigset_t pr_sighold;	/* Set of signals held (blocked) by the lwp */
4850Sstevel@tonic-gate 	struct	sigaltstack32 pr_altstack; /* Alternate signal stack info */
4860Sstevel@tonic-gate 	struct	sigaction32 pr_action; /* Signal action for current signal */
4870Sstevel@tonic-gate 	pid32_t	pr_pid;		/* Process id */
4880Sstevel@tonic-gate 	pid32_t	pr_ppid;	/* Parent process id */
4890Sstevel@tonic-gate 	pid32_t	pr_pgrp;	/* Process group id */
4900Sstevel@tonic-gate 	pid32_t	pr_sid;		/* Session id */
4910Sstevel@tonic-gate 	timestruc32_t pr_utime;	/* Process user cpu time */
4920Sstevel@tonic-gate 	timestruc32_t pr_stime;	/* Process system cpu time */
4930Sstevel@tonic-gate 	timestruc32_t pr_cutime; /* Sum of children's user times */
4940Sstevel@tonic-gate 	timestruc32_t pr_cstime; /* Sum of children's system times */
4950Sstevel@tonic-gate 	char	pr_clname[PRCLSZ]; /* Scheduling class name */
4960Sstevel@tonic-gate 	short	pr_syscall;	/* System call number (if in syscall) */
4970Sstevel@tonic-gate 	short	pr_nsysarg;	/* Number of arguments to this syscall */
4980Sstevel@tonic-gate 	int32_t	pr_sysarg[PRSYSARGS]; /* Arguments to this syscall */
4990Sstevel@tonic-gate 	id32_t	pr_who;		/* Specific lwp identifier */
5000Sstevel@tonic-gate 	sigset_t pr_lwppend;	/* Set of signals pending to the lwp */
5010Sstevel@tonic-gate 	caddr32_t pr_oldcontext; /* Address of previous ucontext */
5020Sstevel@tonic-gate 	caddr32_t pr_brkbase;	/* Address of the process heap */
5030Sstevel@tonic-gate 	size32_t pr_brksize;	/* Size of the process heap, in bytes */
5040Sstevel@tonic-gate 	caddr32_t pr_stkbase;	/* Address of the process stack */
5050Sstevel@tonic-gate 	size32_t pr_stksize;	/* Size of the process stack, in bytes */
5060Sstevel@tonic-gate 	short	pr_processor;	/* processor which last ran this LWP */
5070Sstevel@tonic-gate 	short	pr_bind;	/* processor LWP bound to or PBIND_NONE */
5080Sstevel@tonic-gate 	int32_t	pr_instr;	/* Current instruction */
5090Sstevel@tonic-gate 	prgregset32_t pr_reg;	/* General registers */
5100Sstevel@tonic-gate } prstatus32_t;
5110Sstevel@tonic-gate 
5120Sstevel@tonic-gate typedef struct prpsinfo32 {
5130Sstevel@tonic-gate 	char	pr_state;	/* numeric process state (see pr_sname) */
5140Sstevel@tonic-gate 	char	pr_sname;	/* printable character representing pr_state */
5150Sstevel@tonic-gate 	char	pr_zomb;	/* !=0: process terminated but not waited for */
5160Sstevel@tonic-gate 	char	pr_nice;	/* nice for cpu usage */
5170Sstevel@tonic-gate 	uint32_t pr_flag;	/* process flags */
5180Sstevel@tonic-gate 	uid32_t	pr_uid;		/* real user id */
5190Sstevel@tonic-gate 	gid32_t	pr_gid;		/* real group id */
5200Sstevel@tonic-gate 	pid32_t	pr_pid;		/* unique process id */
5210Sstevel@tonic-gate 	pid32_t	pr_ppid;	/* process id of parent */
5220Sstevel@tonic-gate 	pid32_t	pr_pgrp;	/* pid of process group leader */
5230Sstevel@tonic-gate 	pid32_t	pr_sid;		/* session id */
5240Sstevel@tonic-gate 	caddr32_t pr_addr;	/* physical address of process */
5250Sstevel@tonic-gate 	size32_t pr_size;	/* size of process image in pages */
5260Sstevel@tonic-gate 	size32_t pr_rssize;	/* resident set size in pages */
5270Sstevel@tonic-gate 	caddr32_t pr_wchan;	/* wait addr for sleeping process */
5280Sstevel@tonic-gate 	timestruc32_t pr_start;	/* process start time, sec+nsec since epoch */
5290Sstevel@tonic-gate 	timestruc32_t pr_time;	/* usr+sys cpu time for this process */
5300Sstevel@tonic-gate 	int32_t	pr_pri;		/* priority, high value is high priority */
5310Sstevel@tonic-gate 	char	pr_oldpri;	/* pre-SVR4, low value is high priority */
5320Sstevel@tonic-gate 	char	pr_cpu;		/* pre-SVR4, cpu usage for scheduling */
5330Sstevel@tonic-gate 	o_dev_t	pr_ottydev;	/* short tty device number */
5340Sstevel@tonic-gate 	dev32_t	pr_lttydev;	/* controlling tty device (PRNODEV if none) */
5350Sstevel@tonic-gate 	char	pr_clname[PRCLSZ];	/* scheduling class name */
5360Sstevel@tonic-gate 	char	pr_fname[PRFNSZ];	/* last component of execed pathname */
5370Sstevel@tonic-gate 	char	pr_psargs[PRARGSZ];	/* initial characters of arg list */
5380Sstevel@tonic-gate 	short	pr_syscall;	/* system call number (if in syscall) */
5390Sstevel@tonic-gate 	short	pr_fill;
5400Sstevel@tonic-gate 	timestruc32_t pr_ctime;	/* usr+sys cpu time for reaped children */
5410Sstevel@tonic-gate 	size32_t pr_bysize;	/* size of process image in bytes */
5420Sstevel@tonic-gate 	size32_t pr_byrssize;	/* resident set size in bytes */
5430Sstevel@tonic-gate 	int	pr_argc;	/* initial argument count */
5440Sstevel@tonic-gate 	caddr32_t pr_argv;	/* initial argument vector */
5450Sstevel@tonic-gate 	caddr32_t pr_envp;	/* initial environment vector */
5460Sstevel@tonic-gate 	int	pr_wstat;	/* if zombie, the wait() status */
5470Sstevel@tonic-gate 	ushort_t pr_pctcpu;	/* % of recent cpu time, one or all lwps */
5480Sstevel@tonic-gate 	ushort_t pr_pctmem;	/* % of of system memory used by the process */
5490Sstevel@tonic-gate 	uid32_t	pr_euid;	/* effective user id */
5500Sstevel@tonic-gate 	gid32_t	pr_egid;	/* effective group id */
5510Sstevel@tonic-gate 	id32_t	pr_aslwpid;	/* historical; now always zero */
5520Sstevel@tonic-gate 	char	pr_dmodel;	/* data model of the process */
5530Sstevel@tonic-gate 	char	pr_pad[3];
5540Sstevel@tonic-gate 	int32_t	pr_filler[6];	/* for future expansion */
5550Sstevel@tonic-gate } prpsinfo32_t;
5560Sstevel@tonic-gate 
5570Sstevel@tonic-gate #if _STRUCTURED_PROC == 0
5580Sstevel@tonic-gate 
5590Sstevel@tonic-gate typedef struct prrun32 {
5600Sstevel@tonic-gate 	int32_t	pr_flags;	/* Flags */
5610Sstevel@tonic-gate 	sigset_t pr_trace;	/* Set of signals to be traced */
5620Sstevel@tonic-gate 	sigset_t pr_sighold;	/* Set of signals to be held */
5630Sstevel@tonic-gate 	fltset_t pr_fault;	/* Set of faults to be traced */
5640Sstevel@tonic-gate 	caddr32_t pr_vaddr;	/* Virtual address at which to resume */
5650Sstevel@tonic-gate 	int32_t	pr_filler[8];	/* Filler area for future expansion */
5660Sstevel@tonic-gate } prrun32_t;
5670Sstevel@tonic-gate 
5680Sstevel@tonic-gate typedef struct ioc_prmap32 {
5690Sstevel@tonic-gate 	caddr32_t	pr_vaddr;	/* Virtual address */
5700Sstevel@tonic-gate 	size32_t	pr_size;	/* Size of mapping in bytes */
5710Sstevel@tonic-gate 	off32_t		pr_off;		/* Offset into mapped object, if any */
5720Sstevel@tonic-gate 	uint32_t	pr_mflags;	/* Protection and attribute flags */
5730Sstevel@tonic-gate 	uint32_t	pr_pagesize;	/* pagesize (bytes) for this mapping */
5740Sstevel@tonic-gate 	int32_t		pr_filler[3];	/* Filler for future expansion */
5750Sstevel@tonic-gate } ioc_prmap32_t;
5760Sstevel@tonic-gate 
5770Sstevel@tonic-gate typedef struct prusage32 {
5780Sstevel@tonic-gate 	id32_t		pr_lwpid;	/* lwp id.  0: process or defunct */
5790Sstevel@tonic-gate 	int32_t		pr_count;	/* number of contributing lwps */
5800Sstevel@tonic-gate 	timestruc32_t	pr_tstamp;	/* current time stamp */
5810Sstevel@tonic-gate 	timestruc32_t	pr_create;	/* process/lwp creation time stamp */
5820Sstevel@tonic-gate 	timestruc32_t	pr_term;	/* process/lwp termination time stamp */
5830Sstevel@tonic-gate 	timestruc32_t	pr_rtime;	/* total lwp real (elapsed) time */
5840Sstevel@tonic-gate 	timestruc32_t	pr_utime;	/* user level cpu time */
5850Sstevel@tonic-gate 	timestruc32_t	pr_stime;	/* system call cpu time */
5860Sstevel@tonic-gate 	timestruc32_t	pr_ttime;	/* other system trap cpu time */
5870Sstevel@tonic-gate 	timestruc32_t	pr_tftime;	/* text page fault sleep time */
5880Sstevel@tonic-gate 	timestruc32_t	pr_dftime;	/* data page fault sleep time */
5890Sstevel@tonic-gate 	timestruc32_t	pr_kftime;	/* kernel page fault sleep time */
5900Sstevel@tonic-gate 	timestruc32_t	pr_ltime;	/* user lock wait sleep time */
5910Sstevel@tonic-gate 	timestruc32_t	pr_slptime;	/* all other sleep time */
5920Sstevel@tonic-gate 	timestruc32_t	pr_wtime;	/* wait-cpu (latency) time */
5930Sstevel@tonic-gate 	timestruc32_t	pr_stoptime;	/* stopped time */
5940Sstevel@tonic-gate 	timestruc32_t	filltime[6];	/* filler for future expansion */
5950Sstevel@tonic-gate 	uint32_t	pr_minf;	/* minor page faults */
5960Sstevel@tonic-gate 	uint32_t	pr_majf;	/* major page faults */
5970Sstevel@tonic-gate 	uint32_t	pr_nswap;	/* swaps */
5980Sstevel@tonic-gate 	uint32_t	pr_inblk;	/* input blocks */
5990Sstevel@tonic-gate 	uint32_t	pr_oublk;	/* output blocks */
6000Sstevel@tonic-gate 	uint32_t	pr_msnd;	/* messages sent */
6010Sstevel@tonic-gate 	uint32_t	pr_mrcv;	/* messages received */
6020Sstevel@tonic-gate 	uint32_t	pr_sigs;	/* signals received */
6030Sstevel@tonic-gate 	uint32_t	pr_vctx;	/* voluntary context switches */
6040Sstevel@tonic-gate 	uint32_t	pr_ictx;	/* involuntary context switches */
6050Sstevel@tonic-gate 	uint32_t	pr_sysc;	/* system calls */
6060Sstevel@tonic-gate 	uint32_t	pr_ioch;	/* chars read and written */
6070Sstevel@tonic-gate 	uint32_t	filler[10];	/* filler for future expansion */
6080Sstevel@tonic-gate } prusage32_t;
6090Sstevel@tonic-gate 
6100Sstevel@tonic-gate typedef struct ioc_prpageheader32 {
6110Sstevel@tonic-gate 	timestruc32_t	pr_tstamp;	/* real time stamp */
6120Sstevel@tonic-gate 	uint32_t	pr_nmap;	/* number of address space mappings */
6130Sstevel@tonic-gate 	uint32_t	pr_npage;	/* total number of pages */
6140Sstevel@tonic-gate } ioc_prpageheader32_t;
6150Sstevel@tonic-gate 
6160Sstevel@tonic-gate typedef struct ioc_prasmap32 {
6170Sstevel@tonic-gate 	caddr32_t	pr_vaddr;	/* virtual address */
6180Sstevel@tonic-gate 	size32_t	pr_npage;	/* number of pages in mapping */
6190Sstevel@tonic-gate 	off32_t		pr_off;		/* offset into mapped object, if any */
6200Sstevel@tonic-gate 	uint32_t	pr_mflags;	/* protection and attribute flags */
6210Sstevel@tonic-gate 	uint32_t	pr_pagesize;	/* pagesize (bytes) for this mapping */
6220Sstevel@tonic-gate 	int32_t		pr_filler[3];	/* filler for future expansion */
6230Sstevel@tonic-gate } ioc_prasmap32_t;
6240Sstevel@tonic-gate 
6250Sstevel@tonic-gate #endif	/* _STRUCTURED_PROC == 0 */
6260Sstevel@tonic-gate 
6270Sstevel@tonic-gate #endif	/* _SYSCALL32 */
6280Sstevel@tonic-gate 
6290Sstevel@tonic-gate #ifdef	__cplusplus
6300Sstevel@tonic-gate }
6310Sstevel@tonic-gate #endif
6320Sstevel@tonic-gate 
6330Sstevel@tonic-gate #endif	/* _SYS_OLD_PROCFS_H */
634