summaryrefslogtreecommitdiffstats
path: root/TasksMeter.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-10-21 21:25:50 +0200
committercgzones <cgzones@googlemail.com>2020-10-26 19:30:38 +0100
commit72103e9613a4767a3aad2dd63c629f4a1384880c (patch)
treeec2424d702cb7009bd8d3584583659bd6b74485f /TasksMeter.c
parentf757810f489b12d2a98dcb09751003f4ed002538 (diff)
Hold only a const version of the ProcessList in Meters
Diffstat (limited to 'TasksMeter.c')
-rw-r--r--TasksMeter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/TasksMeter.c b/TasksMeter.c
index 2116e322..562cc8fc 100644
--- a/TasksMeter.c
+++ b/TasksMeter.c
@@ -24,7 +24,7 @@ static const int TasksMeter_attributes[] = {
};
static void TasksMeter_updateValues(Meter* this, char* buffer, int len) {
- ProcessList* pl = this->pl;
+ const ProcessList* pl = this->pl;
this->values[0] = pl->kernelThreads;
this->values[1] = pl->userlandThreads;
this->values[2] = pl->totalTasks - pl->kernelThreads - pl->userlandThreads;
@@ -32,7 +32,7 @@ static void TasksMeter_updateValues(Meter* this, char* buffer, int len) {
if (pl->totalTasks > this->total) {
this->total = pl->totalTasks;
}
- if (this->pl->settings->hideKernelThreads) {
+ if (pl->settings->hideKernelThreads) {
this->values[0] = 0;
}
xSnprintf(buffer, len, "%d/%d", (int) this->values[3], (int) this->total);

© 2014-2024 Faster IT GmbH | imprint | privacy policy