From d8e1480a27e1e26b8dfa97681bf8e7f90946d336 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 22 Nov 2010 12:40:20 +0000 Subject: Remove arbitrary limit from rich strings Fix subtree hiding Fix reading of CPU values in hidden threads Fix hiding of zombie processes as kernel threads Remove "debug proc" code Code cleanup in processElements --- ProcessList.h | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) (limited to 'ProcessList.h') diff --git a/ProcessList.h b/ProcessList.h index 48456def..2442f351 100644 --- a/ProcessList.h +++ b/ProcessList.h @@ -58,10 +58,6 @@ in the source distribution for its full text. -#ifdef DEBUG_PROC -typedef int(*vxscanf)(void*, const char*, va_list); -#endif - typedef struct CPUData_ { unsigned long long int totalTime; unsigned long long int userTime; @@ -126,34 +122,16 @@ typedef struct ProcessList_ { bool highlightMegabytes; bool highlightThreads; bool detailedCPUTime; - #ifdef DEBUG_PROC - FILE* traceFile; - #endif } ProcessList; -#ifdef DEBUG_PROC - -#define ProcessList_read(this, buffer, format, ...) ProcessList_xread(this, (vxscanf) vsscanf, buffer, format, ## __VA_ARGS__ ) -#define ProcessList_fread(this, file, format, ...) ProcessList_xread(this, (vxscanf) vfscanf, file, format, ## __VA_ARGS__ ) - -#else - -#ifndef ProcessList_read -#define ProcessList_fopen(this, path, mode) fopen(path, mode) -#define ProcessList_read(this, buffer, format, ...) sscanf(buffer, format, ## __VA_ARGS__ ) -#define ProcessList_fread(this, file, format, ...) fscanf(file, format, ## __VA_ARGS__ ) -#endif - -#endif - ProcessList* ProcessList_new(UsersTable* usersTable); void ProcessList_delete(ProcessList* this); void ProcessList_invertSortOrder(ProcessList* this); -RichString ProcessList_printHeader(ProcessList* this); +void ProcessList_printHeader(ProcessList* this, RichString* header); Process* ProcessList_get(ProcessList* this, int idx); @@ -165,6 +143,19 @@ void ProcessList_sort(ProcessList* this); #endif +#ifdef HAVE_OPENVZ + +#endif + +#ifdef HAVE_CGROUP + +#endif + +#ifdef HAVE_VSERVER + +#endif + + void ProcessList_scan(ProcessList* this); ProcessField ProcessList_keyAt(ProcessList* this, int at); -- cgit v1.2.3