Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
4e064e0d
Commit
4e064e0d
authored
Mar 16, 2015
by
Hisham Muhammad
Browse files
Build fixes to resync with FreeBSD changes.
parent
272e2d9b
Changes
4
Hide whitespace changes
Inline
Side-by-side
linux/LinuxProcess.h
View file @
4e064e0d
...
...
@@ -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
;
...
...
linux/LinuxProcessList.c
View file @
4e064e0d
...
...
@@ -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
);
l
p
->
processor
=
strtol
(
location
,
&
location
,
10
);
p
rocess
->
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
);
}
...
...
linux/LinuxProcessList.h
View file @
4e064e0d
...
...
@@ -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
linux/Platform.h
View file @
4e064e0d
...
...
@@ -34,6 +34,4 @@ void Platform_setMemoryValues(Meter* this);
void
Platform_setSwapValues
(
Meter
*
this
);
void
Platform_setTasksValues
(
Meter
*
this
);
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment