Fixed 'ps' utility: now get process table addresses with getsysinfo() calls.
To be done: get copies of process tables instead of using /dev/(k)mem.
This commit is contained in:
@@ -88,11 +88,6 @@ struct sigmsg {
|
||||
#define MESS_SIZE (sizeof(message)) /* might need usizeof from fs here */
|
||||
#define NIL_MESS ((message *) 0)
|
||||
|
||||
struct psinfo { /* information for the ps(1) program */
|
||||
u16_t nr_tasks, nr_procs; /* NR_TASKS and NR_PROCS constants. */
|
||||
vir_bytes proc, mproc, fproc; /* addresses of the main process tables. */
|
||||
};
|
||||
|
||||
/* This is used to obtain system information through SYS_GETINFO. */
|
||||
struct kinfo {
|
||||
phys_bytes code_base; /* base of kernel code */
|
||||
|
||||
@@ -35,6 +35,11 @@
|
||||
#define RBT_RESET 4 /* hard reset the system */
|
||||
#endif
|
||||
|
||||
/* What system info to retrieve with sysgetinfo(). */
|
||||
#define SI_KINFO 0 /* get kernel info via PM */
|
||||
#define SI_PROC_ADDR 1 /* address of process table */
|
||||
#define SI_PROC_TAB 2 /* copy of entire process table */
|
||||
|
||||
/* NULL must be defined in <unistd.h> according to POSIX Sec. 2.7.1. */
|
||||
#define NULL ((void *)0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user