diff options
author | Nathan Scott <nathans@redhat.com> | 2023-08-31 11:56:43 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2023-08-31 14:13:16 +1000 |
commit | b74673fe37fd379fc350789e696470556776d815 (patch) | |
tree | cbe4f036962c439f9c07a9c96302f5908f6410b0 /TasksMeter.c | |
parent | 214166a049c2a6ac454dbb37b85b04c039a6a17a (diff) |
Rename ProcessList to ProcessTable throughout
Following up with some discusson from a few months back,
where it was proposed that ProcessTable is a better name.
This data structure is definitely not a list ... if it
was one-dimensional it'd be a set, but in practice it has
much more in common with a two-dimensional table.
The Process table is a familiar operating system concept
for many people too so it resonates a little in that way
as well.
Diffstat (limited to 'TasksMeter.c')
-rw-r--r-- | TasksMeter.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/TasksMeter.c b/TasksMeter.c index 7dd6fdb4..6ea965b8 100644 --- a/TasksMeter.c +++ b/TasksMeter.c @@ -10,7 +10,7 @@ in the source distribution for its full text. #include "CRT.h" #include "Macros.h" #include "Object.h" -#include "ProcessList.h" +#include "ProcessTable.h" #include "RichString.h" #include "Settings.h" #include "XUtils.h" @@ -25,15 +25,15 @@ static const int TasksMeter_attributes[] = { static void TasksMeter_updateValues(Meter* this) { const Machine* host = this->host; - const ProcessList* pl = (const ProcessList*) host->processTable; + const ProcessTable* pt = (const ProcessTable*) host->processTable; - this->values[0] = pl->kernelThreads; - this->values[1] = pl->userlandThreads; - this->values[2] = pl->totalTasks - pl->kernelThreads - pl->userlandThreads; - this->values[3] = MINIMUM(pl->runningTasks, host->activeCPUs); - this->total = pl->totalTasks; + this->values[0] = pt->kernelThreads; + this->values[1] = pt->userlandThreads; + this->values[2] = pt->totalTasks - pt->kernelThreads - pt->userlandThreads; + this->values[3] = MINIMUM(pt->runningTasks, host->activeCPUs); + this->total = pt->totalTasks; - xSnprintf(this->txtBuffer, sizeof(this->txtBuffer), "%u/%u", MINIMUM(pl->runningTasks, host->activeCPUs), pl->totalTasks); + xSnprintf(this->txtBuffer, sizeof(this->txtBuffer), "%u/%u", MINIMUM(pt->runningTasks, host->activeCPUs), pt->totalTasks); } static void TasksMeter_display(const Object* cast, RichString* out) { |