Commit 4e064e0d authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Build fixes to resync with FreeBSD changes.

parent 272e2d9b
......@@ -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;
......
......@@ -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);
}
......
......@@ -43,11 +43,6 @@ typedef struct CPUData_ {
typedef struct LinuxProcessList_ {
ProcessList super;
int totalTasks;
int userlandThreads;
int kernelThreads;
int runningTasks;
CPUData* cpus;
} LinuxProcessList;
......@@ -90,7 +85,6 @@ void ProcessList_delete(ProcessList* pl);
#endif
void ProcessList_scan(ProcessList* super);
void ProcessList_goThroughEntries(ProcessList* super);
#endif
......@@ -34,6 +34,4 @@ void Platform_setMemoryValues(Meter* this);
void Platform_setSwapValues(Meter* this);
void Platform_setTasksValues(Meter* this);
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment