summaryrefslogtreecommitdiffstats
path: root/bin/ps/ps.h
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2000-12-12 07:25:57 +0000
committermckusick <mckusick@FreeBSD.org>2000-12-12 07:25:57 +0000
commitcba301121bc106aaff382428a55f31fef30844e6 (patch)
tree910e5652e5d16d5d0d4e8480f7e386aaf0ca310e /bin/ps/ps.h
parentd577ae457b219ac16b4e152a40ae4d7474c4622f (diff)
downloadFreeBSD-src-cba301121bc106aaff382428a55f31fef30844e6.zip
FreeBSD-src-cba301121bc106aaff382428a55f31fef30844e6.tar.gz
Change the proc information returned from the kernel so that it
no longer contains kernel specific data structures, but rather only scalar values and structures that are already part of the kernel/user interface, specifically rusage and rtprio. It no longer contains proc, session, pcred, ucred, procsig, vmspace, pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If any of these changed in size, ps, w, fstat, gcore, systat, and top would all stop working. The new structure has over 200 bytes of unassigned space for future values to be added, yet is nearly 100 bytes smaller per entry than the structure that it replaced.
Diffstat (limited to 'bin/ps/ps.h')
-rw-r--r--bin/ps/ps.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/bin/ps/ps.h b/bin/ps/ps.h
index f8d244c..c7769eb 100644
--- a/bin/ps/ps.h
+++ b/bin/ps/ps.h
@@ -37,22 +37,11 @@
#define UNLIMITED 0 /* unlimited terminal width */
enum type { CHAR, UCHAR, SHORT, USHORT, INT, UINT, LONG, ULONG, KPTR };
-struct usave {
- struct timeval u_start;
- struct rusage u_ru;
- struct rusage u_cru;
- char u_acflag;
- char u_valid;
-};
-
-#define KI_PROC(ki) (&(ki)->ki_p->kp_proc)
-#define KI_EPROC(ki) (&(ki)->ki_p->kp_eproc)
-
typedef struct kinfo {
- struct kinfo_proc *ki_p; /* proc structure */
- struct usave ki_u; /* interesting parts of user */
+ struct kinfo_proc *ki_p; /* kinfo_proc structure */
char *ki_args; /* exec args */
char *ki_env; /* environment */
+ int ki_valid; /* 1 => uarea stuff valid */
} KINFO;
/* Variables. */
@@ -77,8 +66,8 @@ typedef struct var {
short width; /* printing width */
/*
* The following (optional) elements are hooks for passing information
- * to the generic output routines: pvar, evar, uvar (those which print
- * simple elements from well known structures: proc, eproc, usave)
+ * to the generic output routine pvar (which prints simple elements
+ * from the well known kinfo_proc structure).
*/
int off; /* offset in structure */
enum type type; /* type of element */
OpenPOWER on IntegriCloud