sd: remove 'ssd' driver support
[unleashed/tickless.git] / arch / x86 / include / sys / old_procfs.h
blob5aa57280eea56552ce26d373a09235ab630b2b4a
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
30 #ifndef _SYS_OLD_PROCFS_H
31 #define _SYS_OLD_PROCFS_H
34 * This file contains the definitions for the old ioctl()-based
35 * version of the process file system. It is obsolete but will
36 * continue to be supported in SunOS until the next major release.
39 #include <sys/types.h>
40 #include <sys/time_impl.h>
41 #include <sys/signal.h>
42 #include <sys/siginfo.h>
43 #include <sys/fault.h>
44 #include <sys/syscall.h>
45 #include <sys/procfs_isa.h>
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
51 #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
52 #error "Cannot use procfs in the large file compilation environment"
53 #endif
55 #if _STRUCTURED_PROC == 0
58 * ioctl codes and system call interfaces for /proc.
61 #define PIOC ('q'<<8)
62 #define PIOCSTATUS (PIOC|1) /* get process status */
63 #define PIOCSTOP (PIOC|2) /* post STOP request and... */
64 #define PIOCWSTOP (PIOC|3) /* wait for process to STOP */
65 #define PIOCRUN (PIOC|4) /* make process runnable */
66 #define PIOCGTRACE (PIOC|5) /* get traced signal set */
67 #define PIOCSTRACE (PIOC|6) /* set traced signal set */
68 #define PIOCSSIG (PIOC|7) /* set current signal */
69 #define PIOCKILL (PIOC|8) /* send signal */
70 #define PIOCUNKILL (PIOC|9) /* delete a signal */
71 #define PIOCGHOLD (PIOC|10) /* get held signal set */
72 #define PIOCSHOLD (PIOC|11) /* set held signal set */
73 #define PIOCMAXSIG (PIOC|12) /* get max signal number */
74 #define PIOCACTION (PIOC|13) /* get signal action structs */
75 #define PIOCGFAULT (PIOC|14) /* get traced fault set */
76 #define PIOCSFAULT (PIOC|15) /* set traced fault set */
77 #define PIOCCFAULT (PIOC|16) /* clear current fault */
78 #define PIOCGENTRY (PIOC|17) /* get syscall entry set */
79 #define PIOCSENTRY (PIOC|18) /* set syscall entry set */
80 #define PIOCGEXIT (PIOC|19) /* get syscall exit set */
81 #define PIOCSEXIT (PIOC|20) /* set syscall exit set */
84 * These four are obsolete (replaced by PIOCSET/PIOCRESET).
86 #define PIOCSFORK (PIOC|21) /* set inherit-on-fork flag */
87 #define PIOCRFORK (PIOC|22) /* reset inherit-on-fork flag */
88 #define PIOCSRLC (PIOC|23) /* set run-on-last-close flag */
89 #define PIOCRRLC (PIOC|24) /* reset run-on-last-close flag */
91 #define PIOCGREG (PIOC|25) /* get general registers */
92 #define PIOCSREG (PIOC|26) /* set general registers */
93 #define PIOCGFPREG (PIOC|27) /* get floating-point registers */
94 #define PIOCSFPREG (PIOC|28) /* set floating-point registers */
95 #define PIOCNICE (PIOC|29) /* set nice priority */
96 #define PIOCPSINFO (PIOC|30) /* get ps(1) information */
97 #define PIOCNMAP (PIOC|31) /* get number of memory mappings */
98 #define PIOCMAP (PIOC|32) /* get memory map information */
99 #define PIOCOPENM (PIOC|33) /* open mapped object for reading */
100 #define PIOCCRED (PIOC|34) /* get process credentials */
101 #define PIOCGROUPS (PIOC|35) /* get supplementary groups */
102 #define PIOCGETPR (PIOC|36) /* read struct proc */
103 #define PIOCGETU (PIOC|37) /* read user area */
106 * These are new with SunOS5.0.
108 #define PIOCSET (PIOC|38) /* set process flags */
109 #define PIOCRESET (PIOC|39) /* reset process flags */
110 #define PIOCUSAGE (PIOC|43) /* get resource usage */
111 #define PIOCOPENPD (PIOC|44) /* get page data file descriptor */
114 * Lightweight process interfaces.
116 #define PIOCLWPIDS (PIOC|45) /* get lwp identifiers */
117 #define PIOCOPENLWP (PIOC|46) /* get lwp file descriptor */
118 #define PIOCLSTATUS (PIOC|47) /* get status of all lwps */
119 #define PIOCLUSAGE (PIOC|48) /* get resource usage of all lwps */
122 * SVR4 run-time loader interfaces.
124 #define PIOCNAUXV (PIOC|49) /* get number of aux vector entries */
125 #define PIOCAUXV (PIOC|50) /* get aux vector (see sys/auxv.h) */
128 * extra register state interfaces
130 #define PIOCGXREGSIZE (PIOC|51) /* get extra register state size */
131 #define PIOCGXREG (PIOC|52) /* get extra register state */
132 #define PIOCSXREG (PIOC|53) /* set extra register state */
135 * Intel-specific interfaces.
137 #define PIOCNLDT (PIOC|103) /* get number of LDT entries */
138 #define PIOCLDT (PIOC|104) /* get LDT (see sys/sysi86.h) */
140 /* Process/lwp status structure */
142 #define PRCLSZ 8 /* maximum size of scheduling class name */
143 #define PRSYSARGS 8 /* maximum number of syscall arguments */
145 #endif /* _STRUCTURED_PROC == 0 */
147 typedef struct prstatus {
148 int pr_flags; /* Flags (see below) */
149 short pr_why; /* Reason for process stop (if stopped) */
150 short pr_what; /* More detailed reason */
151 siginfo_t pr_info; /* Info associated with signal or fault */
152 short pr_cursig; /* Current signal */
153 ushort_t pr_nlwp; /* Number of lwps in the process */
154 sigset_t pr_sigpend; /* Set of signals pending to the process */
155 sigset_t pr_sighold; /* Set of signals held (blocked) by the lwp */
156 struct sigaltstack pr_altstack; /* Alternate signal stack info */
157 struct sigaction pr_action; /* Signal action for current signal */
158 pid_t pr_pid; /* Process id */
159 pid_t pr_ppid; /* Parent process id */
160 pid_t pr_pgrp; /* Process group id */
161 pid_t pr_sid; /* Session id */
162 timestruc_t pr_utime; /* Process user cpu time */
163 timestruc_t pr_stime; /* Process system cpu time */
164 timestruc_t pr_cutime; /* Sum of children's user times */
165 timestruc_t pr_cstime; /* Sum of children's system times */
166 char pr_clname[PRCLSZ]; /* Scheduling class name */
167 short pr_syscall; /* System call number (if in syscall) */
168 short pr_nsysarg; /* Number of arguments to this syscall */
169 long pr_sysarg[PRSYSARGS]; /* Arguments to this syscall */
170 id_t pr_who; /* Specific lwp identifier */
171 sigset_t pr_lwppend; /* Set of signals pending to the lwp */
172 struct ucontext *pr_oldcontext; /* Address of previous ucontext */
173 caddr_t pr_brkbase; /* Address of the process heap */
174 size_t pr_brksize; /* Size of the process heap, in bytes */
175 caddr_t pr_stkbase; /* Address of the process stack */
176 size_t pr_stksize; /* Size of the process stack, in bytes */
177 short pr_processor; /* processor which last ran this LWP */
178 short pr_bind; /* processor LWP bound to or PBIND_NONE */
179 long pr_instr; /* Current instruction */
180 prgregset_t pr_reg; /* General registers */
181 } prstatus_t;
183 #if _STRUCTURED_PROC == 0
185 /* pr_flags */
187 #define PR_STOPPED 0x0001 /* lwp is stopped */
188 #define PR_ISTOP 0x0002 /* lwp is stopped on an event of interest */
189 #define PR_DSTOP 0x0004 /* lwp has a stop directive in effect */
190 #define PR_ASLEEP 0x0008 /* lwp is sleeping in a system call */
191 #define PR_FORK 0x0010 /* inherit-on-fork is in effect */
192 #define PR_RLC 0x0020 /* run-on-last-close is in effect */
193 #define PR_PTRACE 0x0040 /* obsolete, never set in SunOS5.0 */
194 #define PR_PCINVAL 0x0080 /* contents of pr_instr undefined */
195 #define PR_ISSYS 0x0100 /* system process */
196 #define PR_STEP 0x0200 /* lwp has a single-step directive in effect */
197 #define PR_KLC 0x0400 /* kill-on-last-close is in effect */
198 #define PR_ASYNC 0x0800 /* asynchronous-stop is in effect */
199 #define PR_PCOMPAT 0x1000 /* ptrace-compatibility mode is in effect */
200 #define PR_MSACCT 0x2000 /* micro-state usage accounting is in effect */
201 #define PR_BPTADJ 0x4000 /* breakpoint trap pc adjustment is in effect */
202 #define PR_ASLWP 0x8000 /* obsolete flag; never set */
204 /* Reasons for stopping */
206 #define PR_REQUESTED 1
207 #define PR_SIGNALLED 2
208 #define PR_SYSENTRY 3
209 #define PR_SYSEXIT 4
210 #define PR_JOBCONTROL 5
211 #define PR_FAULTED 6
212 #define PR_SUSPENDED 7
213 #define PR_CHECKPOINT 8
215 /* Information for the ps(1) command */
217 #define PRFNSZ 16 /* max size of execed filename */
218 #define PRARGSZ 80 /* Number of chars of arguments */
220 #endif /* _STRUCTURED_PROC == 0 */
222 typedef struct prpsinfo {
223 char pr_state; /* numeric process state (see pr_sname) */
224 char pr_sname; /* printable character representing pr_state */
225 char pr_zomb; /* !=0: process terminated but not waited for */
226 char pr_nice; /* nice for cpu usage */
227 uint_t pr_flag; /* process flags */
228 uid_t pr_uid; /* real user id */
229 gid_t pr_gid; /* real group id */
230 pid_t pr_pid; /* unique process id */
231 pid_t pr_ppid; /* process id of parent */
232 pid_t pr_pgrp; /* pid of process group leader */
233 pid_t pr_sid; /* session id */
234 caddr_t pr_addr; /* physical address of process */
235 size_t pr_size; /* size of process image in pages */
236 size_t pr_rssize; /* resident set size in pages */
237 caddr_t pr_wchan; /* wait addr for sleeping process */
238 timestruc_t pr_start; /* process start time, sec+nsec since epoch */
239 timestruc_t pr_time; /* usr+sys cpu time for this process */
240 int pr_pri; /* priority, high value is high priority */
241 char pr_oldpri; /* pre-SVR4, low value is high priority */
242 char pr_cpu; /* pre-SVR4, cpu usage for scheduling */
243 o_dev_t pr_ottydev; /* short tty device number */
244 dev_t pr_lttydev; /* controlling tty device (PRNODEV if none) */
245 char pr_clname[PRCLSZ]; /* scheduling class name */
246 char pr_fname[PRFNSZ]; /* last component of execed pathname */
247 char pr_psargs[PRARGSZ]; /* initial characters of arg list */
248 short pr_syscall; /* system call number (if in syscall) */
249 short pr_fill;
250 timestruc_t pr_ctime; /* usr+sys cpu time for reaped children */
251 size_t pr_bysize; /* size of process image in bytes */
252 size_t pr_byrssize; /* resident set size in bytes */
253 int pr_argc; /* initial argument count */
254 char **pr_argv; /* initial argument vector */
255 char **pr_envp; /* initial environment vector */
256 int pr_wstat; /* if zombie, the wait() status */
257 /* The following percent numbers are 16-bit binary */
258 /* fractions [0 .. 1] with the binary point to the */
259 /* right of the high-order bit (one == 0x8000) */
260 ushort_t pr_pctcpu; /* % of recent cpu time, one or all lwps */
261 ushort_t pr_pctmem; /* % of of system memory used by the process */
262 uid_t pr_euid; /* effective user id */
263 gid_t pr_egid; /* effective group id */
264 id_t pr_aslwpid; /* historical; now always zero */
265 char pr_dmodel; /* data model of the process */
266 char pr_pad[3];
267 int pr_filler[6]; /* for future expansion */
268 } prpsinfo_t;
270 #if _STRUCTURED_PROC == 0
272 #if !defined(_STYPES)
273 #define pr_ttydev pr_lttydev
274 #else
275 #define pr_ttydev pr_ottydev
276 #endif
278 #define PRNODEV (dev_t)(-1l) /* non-existent device */
281 * See <sys/procfs_isa.h> for possible values of pr_dmodel.
284 /* Optional actions to take when process continues */
286 typedef struct prrun {
287 int pr_flags; /* Flags */
288 sigset_t pr_trace; /* Set of signals to be traced */
289 sigset_t pr_sighold; /* Set of signals to be held */
290 fltset_t pr_fault; /* Set of faults to be traced */
291 caddr_t pr_vaddr; /* Virtual address at which to resume */
292 int pr_filler[8]; /* Filler area for future expansion */
293 } prrun_t;
295 #define PRCSIG 0x001 /* Clear current signal */
296 #define PRCFAULT 0x002 /* Clear current fault */
297 #define PRSTRACE 0x004 /* Use traced-signal set in pr_trace */
298 #define PRSHOLD 0x008 /* Use held-signal set in pr_sighold */
299 #define PRSFAULT 0x010 /* Use traced-fault set in pr_fault */
300 #define PRSVADDR 0x020 /* Resume at virtual address in pr_vaddr */
301 #define PRSTEP 0x040 /* Direct the lwp to single-step */
302 #define PRSABORT 0x080 /* Abort syscall */
303 #define PRSTOP 0x100 /* Set directed stop request */
305 /* Memory-management interface */
307 typedef struct prmap {
308 caddr_t pr_vaddr; /* Virtual address */
309 size_t pr_size; /* Size of mapping in bytes */
310 off_t pr_off; /* Offset into mapped object, if any */
311 uint_t pr_mflags; /* Protection and attribute flags */
312 uint_t pr_pagesize; /* pagesize (bytes) for this mapping */
313 long pr_filler[3]; /* Filler for future expansion */
314 } prmap_t;
316 /* Protection and attribute flags */
318 #define MA_READ 0x04 /* Readable by the traced process */
319 #define MA_WRITE 0x02 /* Writable by the traced process */
320 #define MA_EXEC 0x01 /* Executable by the traced process */
321 #define MA_SHARED 0x08 /* Changes are shared by mapped object */
323 * These are obsolete and unreliable.
324 * They are included here only for historical compatibility.
326 #define MA_BREAK 0x10 /* Grown by brk(2) */
327 #define MA_STACK 0x20 /* Grown automatically on stack faults */
329 /* Process credentials */
331 typedef struct prcred {
332 uid_t pr_euid; /* Effective user id */
333 uid_t pr_ruid; /* Real user id */
334 uid_t pr_suid; /* Saved user id (from exec) */
335 gid_t pr_egid; /* Effective group id */
336 gid_t pr_rgid; /* Real group id */
337 gid_t pr_sgid; /* Saved group id (from exec) */
338 uint_t pr_ngroups; /* Number of supplementary groups */
339 } prcred_t;
341 /* Resource usage */
343 typedef struct prusage {
344 id_t pr_lwpid; /* lwp id. 0: process or defunct */
345 int pr_count; /* number of contributing lwps */
346 timestruc_t pr_tstamp; /* current time stamp */
347 timestruc_t pr_create; /* process/lwp creation time stamp */
348 timestruc_t pr_term; /* process/lwp termination time stamp */
349 timestruc_t pr_rtime; /* total lwp real (elapsed) time */
350 timestruc_t pr_utime; /* user level CPU time */
351 timestruc_t pr_stime; /* system call CPU time */
352 timestruc_t pr_ttime; /* other system trap CPU time */
353 timestruc_t pr_tftime; /* text page fault sleep time */
354 timestruc_t pr_dftime; /* data page fault sleep time */
355 timestruc_t pr_kftime; /* kernel page fault sleep time */
356 timestruc_t pr_ltime; /* user lock wait sleep time */
357 timestruc_t pr_slptime; /* all other sleep time */
358 timestruc_t pr_wtime; /* wait-cpu (latency) time */
359 timestruc_t pr_stoptime; /* stopped time */
360 timestruc_t filltime[6]; /* filler for future expansion */
361 ulong_t pr_minf; /* minor page faults */
362 ulong_t pr_majf; /* major page faults */
363 ulong_t pr_nswap; /* swaps */
364 ulong_t pr_inblk; /* input blocks */
365 ulong_t pr_oublk; /* output blocks */
366 ulong_t pr_msnd; /* messages sent */
367 ulong_t pr_mrcv; /* messages received */
368 ulong_t pr_sigs; /* signals received */
369 ulong_t pr_vctx; /* voluntary context switches */
370 ulong_t pr_ictx; /* involuntary context switches */
371 ulong_t pr_sysc; /* system calls */
372 ulong_t pr_ioch; /* chars read and written */
373 ulong_t filler[10]; /* filler for future expansion */
374 } prusage_t;
376 /* Page data */
378 /* page data file header */
379 typedef struct prpageheader {
380 timestruc_t pr_tstamp; /* real time stamp */
381 ulong_t pr_nmap; /* number of address space mappings */
382 ulong_t pr_npage; /* total number of pages */
383 } prpageheader_t;
385 /* page data mapping header */
386 typedef struct prasmap {
387 caddr_t pr_vaddr; /* virtual address */
388 size_t pr_npage; /* number of pages in mapping */
389 off_t pr_off; /* offset into mapped object, if any */
390 uint_t pr_mflags; /* protection and attribute flags */
391 uint_t pr_pagesize; /* pagesize (bytes) for this mapping */
392 long pr_filler[3]; /* filler for future expansion */
393 } prasmap_t;
396 * npage bytes (rounded up to a sizeof (long)-byte boundary) follow
397 * each mapping header, containing zero or more of these flags.
399 #define PG_REFERENCED 0x02 /* page referenced since last read */
400 #define PG_MODIFIED 0x01 /* page modified since last read */
401 #define PG_HWMAPPED 0x04 /* page is present and mapped */
404 * Macros for manipulating sets of flags.
405 * sp must be a pointer to one of sigset_t, fltset_t, or sysset_t.
406 * flag must be a member of the enumeration corresponding to *sp.
409 /* turn on all flags in set */
410 #define prfillset(sp) \
411 { register int _i_ = sizeof (*(sp))/sizeof (uint32_t); \
412 while (_i_) ((uint32_t *)(sp))[--_i_] = (uint32_t)0xFFFFFFFF; }
414 /* turn off all flags in set */
415 #define premptyset(sp) \
416 { register int _i_ = sizeof (*(sp))/sizeof (uint32_t); \
417 while (_i_) ((uint32_t *)(sp))[--_i_] = (uint32_t)0; }
419 /* turn on specified flag in set */
420 #define praddset(sp, flag) \
421 ((void)(((unsigned)((flag)-1) < 32*sizeof (*(sp))/sizeof (uint32_t)) ? \
422 (((uint32_t *)(sp))[((flag)-1)/32] |= (1UL<<(((flag)-1)%32))) : 0))
424 /* turn off specified flag in set */
425 #define prdelset(sp, flag) \
426 ((void)(((unsigned)((flag)-1) < 32*sizeof (*(sp))/sizeof (uint32_t)) ? \
427 (((uint32_t *)(sp))[((flag)-1)/32] &= ~(1UL<<(((flag)-1)%32))) : 0))
429 /* query: != 0 iff flag is turned on in set */
430 #define prismember(sp, flag) \
431 (((unsigned)((flag)-1) < 32*sizeof (*(sp))/sizeof (uint32_t)) && \
432 (((uint32_t *)(sp))[((flag)-1)/32] & (1UL<<(((flag)-1)%32))))
434 #endif /* _STRUCTURED_PROC == 0 */
436 #ifdef _SYSCALL32
438 #if _STRUCTURED_PROC == 0
441 * dev32_t version of PRNODEV
443 #define PRNODEV32 (dev32_t)(-1)
446 * Kernel view of structures used by _ILP32 programs.
449 #endif /* _STRUCTURED_PROC == 0 */
451 typedef struct prstatus32 {
452 int32_t pr_flags; /* Flags */
453 short pr_why; /* Reason for process stop (if stopped) */
454 short pr_what; /* More detailed reason */
455 siginfo32_t pr_info; /* Info associated with signal or fault */
456 short pr_cursig; /* Current signal */
457 ushort_t pr_nlwp; /* Number of lwps in the process */
458 sigset_t pr_sigpend; /* Set of signals pending to the process */
459 sigset_t pr_sighold; /* Set of signals held (blocked) by the lwp */
460 struct sigaltstack32 pr_altstack; /* Alternate signal stack info */
461 struct sigaction32 pr_action; /* Signal action for current signal */
462 pid32_t pr_pid; /* Process id */
463 pid32_t pr_ppid; /* Parent process id */
464 pid32_t pr_pgrp; /* Process group id */
465 pid32_t pr_sid; /* Session id */
466 timestruc32_t pr_utime; /* Process user cpu time */
467 timestruc32_t pr_stime; /* Process system cpu time */
468 timestruc32_t pr_cutime; /* Sum of children's user times */
469 timestruc32_t pr_cstime; /* Sum of children's system times */
470 char pr_clname[PRCLSZ]; /* Scheduling class name */
471 short pr_syscall; /* System call number (if in syscall) */
472 short pr_nsysarg; /* Number of arguments to this syscall */
473 int32_t pr_sysarg[PRSYSARGS]; /* Arguments to this syscall */
474 id32_t pr_who; /* Specific lwp identifier */
475 sigset_t pr_lwppend; /* Set of signals pending to the lwp */
476 caddr32_t pr_oldcontext; /* Address of previous ucontext */
477 caddr32_t pr_brkbase; /* Address of the process heap */
478 size32_t pr_brksize; /* Size of the process heap, in bytes */
479 caddr32_t pr_stkbase; /* Address of the process stack */
480 size32_t pr_stksize; /* Size of the process stack, in bytes */
481 short pr_processor; /* processor which last ran this LWP */
482 short pr_bind; /* processor LWP bound to or PBIND_NONE */
483 int32_t pr_instr; /* Current instruction */
484 prgregset32_t pr_reg; /* General registers */
485 } prstatus32_t;
487 typedef struct prpsinfo32 {
488 char pr_state; /* numeric process state (see pr_sname) */
489 char pr_sname; /* printable character representing pr_state */
490 char pr_zomb; /* !=0: process terminated but not waited for */
491 char pr_nice; /* nice for cpu usage */
492 uint32_t pr_flag; /* process flags */
493 uid32_t pr_uid; /* real user id */
494 gid32_t pr_gid; /* real group id */
495 pid32_t pr_pid; /* unique process id */
496 pid32_t pr_ppid; /* process id of parent */
497 pid32_t pr_pgrp; /* pid of process group leader */
498 pid32_t pr_sid; /* session id */
499 caddr32_t pr_addr; /* physical address of process */
500 size32_t pr_size; /* size of process image in pages */
501 size32_t pr_rssize; /* resident set size in pages */
502 caddr32_t pr_wchan; /* wait addr for sleeping process */
503 timestruc32_t pr_start; /* process start time, sec+nsec since epoch */
504 timestruc32_t pr_time; /* usr+sys cpu time for this process */
505 int32_t pr_pri; /* priority, high value is high priority */
506 char pr_oldpri; /* pre-SVR4, low value is high priority */
507 char pr_cpu; /* pre-SVR4, cpu usage for scheduling */
508 o_dev_t pr_ottydev; /* short tty device number */
509 dev32_t pr_lttydev; /* controlling tty device (PRNODEV if none) */
510 char pr_clname[PRCLSZ]; /* scheduling class name */
511 char pr_fname[PRFNSZ]; /* last component of execed pathname */
512 char pr_psargs[PRARGSZ]; /* initial characters of arg list */
513 short pr_syscall; /* system call number (if in syscall) */
514 short pr_fill;
515 timestruc32_t pr_ctime; /* usr+sys cpu time for reaped children */
516 size32_t pr_bysize; /* size of process image in bytes */
517 size32_t pr_byrssize; /* resident set size in bytes */
518 int pr_argc; /* initial argument count */
519 caddr32_t pr_argv; /* initial argument vector */
520 caddr32_t pr_envp; /* initial environment vector */
521 int pr_wstat; /* if zombie, the wait() status */
522 ushort_t pr_pctcpu; /* % of recent cpu time, one or all lwps */
523 ushort_t pr_pctmem; /* % of of system memory used by the process */
524 uid32_t pr_euid; /* effective user id */
525 gid32_t pr_egid; /* effective group id */
526 id32_t pr_aslwpid; /* historical; now always zero */
527 char pr_dmodel; /* data model of the process */
528 char pr_pad[3];
529 int32_t pr_filler[6]; /* for future expansion */
530 } prpsinfo32_t;
532 #if _STRUCTURED_PROC == 0
534 typedef struct prrun32 {
535 int32_t pr_flags; /* Flags */
536 sigset_t pr_trace; /* Set of signals to be traced */
537 sigset_t pr_sighold; /* Set of signals to be held */
538 fltset_t pr_fault; /* Set of faults to be traced */
539 caddr32_t pr_vaddr; /* Virtual address at which to resume */
540 int32_t pr_filler[8]; /* Filler area for future expansion */
541 } prrun32_t;
543 typedef struct ioc_prmap32 {
544 caddr32_t pr_vaddr; /* Virtual address */
545 size32_t pr_size; /* Size of mapping in bytes */
546 off32_t pr_off; /* Offset into mapped object, if any */
547 uint32_t pr_mflags; /* Protection and attribute flags */
548 uint32_t pr_pagesize; /* pagesize (bytes) for this mapping */
549 int32_t pr_filler[3]; /* Filler for future expansion */
550 } ioc_prmap32_t;
552 typedef struct prusage32 {
553 id32_t pr_lwpid; /* lwp id. 0: process or defunct */
554 int32_t pr_count; /* number of contributing lwps */
555 timestruc32_t pr_tstamp; /* current time stamp */
556 timestruc32_t pr_create; /* process/lwp creation time stamp */
557 timestruc32_t pr_term; /* process/lwp termination time stamp */
558 timestruc32_t pr_rtime; /* total lwp real (elapsed) time */
559 timestruc32_t pr_utime; /* user level cpu time */
560 timestruc32_t pr_stime; /* system call cpu time */
561 timestruc32_t pr_ttime; /* other system trap cpu time */
562 timestruc32_t pr_tftime; /* text page fault sleep time */
563 timestruc32_t pr_dftime; /* data page fault sleep time */
564 timestruc32_t pr_kftime; /* kernel page fault sleep time */
565 timestruc32_t pr_ltime; /* user lock wait sleep time */
566 timestruc32_t pr_slptime; /* all other sleep time */
567 timestruc32_t pr_wtime; /* wait-cpu (latency) time */
568 timestruc32_t pr_stoptime; /* stopped time */
569 timestruc32_t filltime[6]; /* filler for future expansion */
570 uint32_t pr_minf; /* minor page faults */
571 uint32_t pr_majf; /* major page faults */
572 uint32_t pr_nswap; /* swaps */
573 uint32_t pr_inblk; /* input blocks */
574 uint32_t pr_oublk; /* output blocks */
575 uint32_t pr_msnd; /* messages sent */
576 uint32_t pr_mrcv; /* messages received */
577 uint32_t pr_sigs; /* signals received */
578 uint32_t pr_vctx; /* voluntary context switches */
579 uint32_t pr_ictx; /* involuntary context switches */
580 uint32_t pr_sysc; /* system calls */
581 uint32_t pr_ioch; /* chars read and written */
582 uint32_t filler[10]; /* filler for future expansion */
583 } prusage32_t;
585 typedef struct ioc_prpageheader32 {
586 timestruc32_t pr_tstamp; /* real time stamp */
587 uint32_t pr_nmap; /* number of address space mappings */
588 uint32_t pr_npage; /* total number of pages */
589 } ioc_prpageheader32_t;
591 typedef struct ioc_prasmap32 {
592 caddr32_t pr_vaddr; /* virtual address */
593 size32_t pr_npage; /* number of pages in mapping */
594 off32_t pr_off; /* offset into mapped object, if any */
595 uint32_t pr_mflags; /* protection and attribute flags */
596 uint32_t pr_pagesize; /* pagesize (bytes) for this mapping */
597 int32_t pr_filler[3]; /* filler for future expansion */
598 } ioc_prasmap32_t;
600 #endif /* _STRUCTURED_PROC == 0 */
602 #endif /* _SYSCALL32 */
604 #ifdef __cplusplus
606 #endif
608 #endif /* _SYS_OLD_PROCFS_H */