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