From 0f751e991d399769fb8d7800f7c4bccec2ca7f60 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Tue, 22 Aug 2023 16:11:05 +1000 Subject: Introduce Row and Table classes for screens beyond top-processes This commit refactors the Process and ProcessList structures such they each have a new parent - Row and Table, respectively. These new classes handle screen updates relating to anything that could be represented in tabular format, e.g. cgroups, filesystems, etc, without us having to reimplement the display logic repeatedly for each new entity. --- TasksMeter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'TasksMeter.c') diff --git a/TasksMeter.c b/TasksMeter.c index b5563fca..7dd6fdb4 100644 --- a/TasksMeter.c +++ b/TasksMeter.c @@ -25,7 +25,8 @@ static const int TasksMeter_attributes[] = { static void TasksMeter_updateValues(Meter* this) { const Machine* host = this->host; - const ProcessList* pl = host->pl; + const ProcessList* pl = (const ProcessList*) host->processTable; + this->values[0] = pl->kernelThreads; this->values[1] = pl->userlandThreads; this->values[2] = pl->totalTasks - pl->kernelThreads - pl->userlandThreads; -- cgit v1.2.3