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; }