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. --- darwin/DarwinProcessList.c | 4 ++-- darwin/DarwinProcessList.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'darwin') diff --git a/darwin/DarwinProcessList.c b/darwin/DarwinProcessList.c index dae588ba..f7f1e592 100644 --- a/darwin/DarwinProcessList.c +++ b/darwin/DarwinProcessList.c @@ -89,10 +89,10 @@ static struct kinfo_proc* ProcessList_getKInfoProcs(size_t* count) { CRT_fatalError("Unable to get kinfo_procs"); } -ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* dynamicMeters, Hashtable* dynamicColumns, Hashtable* pidMatchList, uid_t userId) { +ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId) { DarwinProcessList* this = xCalloc(1, sizeof(DarwinProcessList)); - ProcessList_init(&this->super, Class(DarwinProcess), usersTable, dynamicMeters, dynamicColumns, pidMatchList, userId); + ProcessList_init(&this->super, Class(DarwinProcess), usersTable, pidMatchList, userId); /* Initialize the CPU information */ this->super.activeCPUs = ProcessList_allocateCPULoadInfo(&this->prev_load); diff --git a/darwin/DarwinProcessList.h b/darwin/DarwinProcessList.h index 393e6567..ec504bcf 100644 --- a/darwin/DarwinProcessList.h +++ b/darwin/DarwinProcessList.h @@ -28,7 +28,7 @@ typedef struct DarwinProcessList_ { ZfsArcStats zfs; } DarwinProcessList; -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* this); -- cgit v1.2.3