From e7f447b6a3473a572d3e6c191128f1796477860d Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Tue, 4 Apr 2023 16:24:37 +1000 Subject: Refactor and consolidate dynamic meters/columns pointers This removes the duplication of dynamic meter/column hashtable pointers that has come in between the Settings and ProcessList structures - only one copy of these is needed. With the future planned dynamic screens feature adding another pointer, let us first clean this up before any further duplication happens. --- ProcessList.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'ProcessList.h') diff --git a/ProcessList.h b/ProcessList.h index 419dea89..eab122a3 100644 --- a/ProcessList.h +++ b/ProcessList.h @@ -51,9 +51,6 @@ typedef struct ProcessList_ { bool needsSort; - Hashtable* dynamicMeters; /* runtime-discovered meters */ - Hashtable* dynamicColumns; /* runtime-discovered Columns */ - struct timeval realtime; /* time of the current sample */ uint64_t realtimeMs; /* current time in milliseconds */ uint64_t monotonicMs; /* same, but from monotonic clock */ @@ -90,13 +87,13 @@ typedef struct ProcessList_ { } ProcessList; /* Implemented by platforms */ -ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* dynamicMeters, Hashtable* dynamicColumns, Hashtable* pidMatchList, uid_t userId); +ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId); void ProcessList_delete(ProcessList* pl); void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate); bool ProcessList_isCPUonline(const ProcessList* super, unsigned int id); -ProcessList* ProcessList_init(ProcessList* this, const ObjectClass* klass, UsersTable* usersTable, Hashtable* dynamicMeters, Hashtable* dynamicColumns, Hashtable* pidMatchList, uid_t userId); +ProcessList* ProcessList_init(ProcessList* this, const ObjectClass* klass, UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId); void ProcessList_done(ProcessList* this); -- cgit v1.2.3