* fhandler_proc.cc (format_proc_loadavg): Add running/total

processes as fourth component of output.
* fhandler_process.cc (get_process_state): Make non-static.
Add FIXME about generating an 'O' flag.
This commit is contained in:
Yaakov Selkowitz
2011-04-01 09:00:21 +00:00
parent 40afcae356
commit 9ca65531e0
3 changed files with 24 additions and 5 deletions

View File

@ -79,8 +79,7 @@ static const virt_tab_t process_tab[] =
static const int PROCESS_LINK_COUNT =
(sizeof (process_tab) / sizeof (virt_tab_t)) - 1;
static int get_process_state (DWORD dwProcessId);
int get_process_state (DWORD dwProcessId);
static bool get_mem_values (DWORD dwProcessId, unsigned long *vmsize,
unsigned long *vmrss, unsigned long *vmtext,
unsigned long *vmdata, unsigned long *vmlib,
@ -928,7 +927,7 @@ format_process_mounts (void *data, char *&destbuf)
return len;
}
static int
int
get_process_state (DWORD dwProcessId)
{
/*
@ -975,6 +974,7 @@ get_process_state (DWORD dwProcessId)
state = 'S';
for (unsigned i = 0; i < sp->ThreadCount; i++)
{
/* FIXME: at some point we should consider generating 'O' */
if (st->State == StateRunning ||
st->State == StateReady)
{