summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-03-16 23:03:40 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-03-16 23:03:40 -0300
commit4e064e0db75f1c7fa51b8ae922bd8fe4483843fc (patch)
treefa431951b21c3db8b648f26665e21ecddd401d35 /linux
parent272e2d9b3459ceb3fe2f5ae34a07e44df6c45997 (diff)
Build fixes to resync with FreeBSD changes.
Diffstat (limited to 'linux')
-rw-r--r--linux/LinuxProcess.h2
-rw-r--r--linux/LinuxProcessList.c12
-rw-r--r--linux/LinuxProcessList.h8
-rw-r--r--linux/Platform.h2
4 files changed, 7 insertions, 17 deletions
diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h
index ebbddf36..55fa1b9e 100644
--- a/linux/LinuxProcess.h
+++ b/linux/LinuxProcess.h
@@ -43,7 +43,6 @@ typedef enum LinuxProcessFields {
STIME = 15,
CUTIME = 16,
CSTIME = 17,
- PROCESSOR = 38,
M_SHARE = 41,
M_TRS = 42,
M_DRS = 43,
@@ -89,7 +88,6 @@ typedef struct LinuxProcess_ {
unsigned long long int stime;
unsigned long long int cutime;
unsigned long long int cstime;
- int processor;
long m_share;
long m_trs;
long m_drs;
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index 09ad3cc3..1c5f2059 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -212,7 +212,7 @@ static bool LinuxProcessList_readStatFile(Process *process, const char* dirname,
process->exit_signal = strtol(location, &location, 10);
location += 1;
assert(location != NULL);
- lp->processor = strtol(location, &location, 10);
+ process->processor = strtol(location, &location, 10);
process->time = lp->utime + lp->stime;
@@ -597,22 +597,22 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, const char*
goto errorReadingProcess;
}
if (Process_isKernelThread(proc)) {
- this->kernelThreads++;
+ pl->kernelThreads++;
} else {
- this->userlandThreads++;
+ pl->userlandThreads++;
}
}
- this->totalTasks++;
+ pl->totalTasks++;
if (proc->state == 'R')
- this->runningTasks++;
+ pl->runningTasks++;
proc->updated = true;
continue;
// Exception handler.
errorReadingProcess: {
if (preExisting) {
- ProcessList_remove((pl, proc);
+ ProcessList_remove(pl, proc);
} else {
Process_delete((Object*)proc);
}
diff --git a/linux/LinuxProcessList.h b/linux/LinuxProcessList.h
index 5509bb50..2c833bae 100644
--- a/linux/LinuxProcessList.h
+++ b/linux/LinuxProcessList.h
@@ -42,11 +42,6 @@ typedef struct CPUData_ {
typedef struct LinuxProcessList_ {
ProcessList super;
-
- int totalTasks;
- int userlandThreads;
- int kernelThreads;
- int runningTasks;
CPUData* cpus;
@@ -90,7 +85,6 @@ void ProcessList_delete(ProcessList* pl);
#endif
-void ProcessList_scan(ProcessList* super);
-
+void ProcessList_goThroughEntries(ProcessList* super);
#endif
diff --git a/linux/Platform.h b/linux/Platform.h
index 3757855d..206fc812 100644
--- a/linux/Platform.h
+++ b/linux/Platform.h
@@ -34,6 +34,4 @@ void Platform_setMemoryValues(Meter* this);
void Platform_setSwapValues(Meter* this);
-void Platform_setTasksValues(Meter* this);
-
#endif

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