From bb5aa9c2633fe63de14891fdde69252e02f339a0 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Tue, 22 Nov 2005 21:48:52 +0000 Subject: [PATCH] add proc_state.threads --- src/os/win32/sigar_os.h | 1 + src/os/win32/win32_sigar.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/os/win32/sigar_os.h b/src/os/win32/sigar_os.h index 8140bc48..fdce6b0f 100644 --- a/src/os/win32/sigar_os.h +++ b/src/os/win32/sigar_os.h @@ -273,6 +273,7 @@ typedef struct { char name[SIGAR_PROC_NAME_LEN]; char state; sigar_uint64_t handles; + sigar_uint64_t threads; } sigar_win32_pinfo_t; struct sigar_t { diff --git a/src/os/win32/win32_sigar.c b/src/os/win32/win32_sigar.c index fa3be9b9..78829064 100644 --- a/src/os/win32/win32_sigar.c +++ b/src/os/win32/win32_sigar.c @@ -948,6 +948,7 @@ SIGAR_DECLARE(int) sigar_proc_state_get(sigar_t *sigar, sigar_pid_t pid, procstate->priority = pinfo->priority; procstate->nice = SIGAR_FIELD_NOTIMPL; procstate->tty = SIGAR_FIELD_NOTIMPL; + procstate->threads = pinfo->threads; return SIGAR_OK; } @@ -1048,6 +1049,7 @@ static int get_proc_info(sigar_t *sigar, sigar_pid_t pid) pinfo->ppid = PERF_VAL(PERF_IX_PPID); pinfo->priority = PERF_VAL(PERF_IX_PRIORITY); pinfo->handles = PERF_VAL(PERF_IX_HANDLE_CNT); + pinfo->threads = PERF_VAL(PERF_IX_THREAD_CNT); return SIGAR_OK; }