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
214d0cff
Commit
214d0cff
authored
Oct 06, 2015
by
Martin "eto" Misuth
Browse files
merge with 'upstream/master'
parents
3ea7b347
cc0fc365
Changes
3
Show whitespace changes
Inline
Side-by-side
darwin/Platform.c
View file @
214d0cff
...
@@ -27,6 +27,44 @@ in the source distribution for its full text.
...
@@ -27,6 +27,44 @@ in the source distribution for its full text.
ProcessField
Platform_defaultFields
[]
=
{
PID
,
USER
,
PRIORITY
,
NICE
,
M_SIZE
,
M_RESIDENT
,
STATE
,
PERCENT_CPU
,
PERCENT_MEM
,
TIME
,
COMM
,
0
};
ProcessField
Platform_defaultFields
[]
=
{
PID
,
USER
,
PRIORITY
,
NICE
,
M_SIZE
,
M_RESIDENT
,
STATE
,
PERCENT_CPU
,
PERCENT_MEM
,
TIME
,
COMM
,
0
};
SignalItem
Platform_signals
[]
=
{
{
.
name
=
" 0 Cancel"
,
.
number
=
0
},
{
.
name
=
" 1 SIGHUP"
,
.
number
=
1
},
{
.
name
=
" 2 SIGINT"
,
.
number
=
2
},
{
.
name
=
" 3 SIGQUIT"
,
.
number
=
3
},
{
.
name
=
" 4 SIGILL"
,
.
number
=
4
},
{
.
name
=
" 5 SIGTRAP"
,
.
number
=
5
},
{
.
name
=
" 6 SIGABRT"
,
.
number
=
6
},
{
.
name
=
" 6 SIGIOT"
,
.
number
=
6
},
{
.
name
=
" 7 SIGEMT"
,
.
number
=
7
},
{
.
name
=
" 8 SIGFPE"
,
.
number
=
8
},
{
.
name
=
" 9 SIGKILL"
,
.
number
=
9
},
{
.
name
=
"10 SIGBUS"
,
.
number
=
10
},
{
.
name
=
"11 SIGSEGV"
,
.
number
=
11
},
{
.
name
=
"12 SIGSYS"
,
.
number
=
12
},
{
.
name
=
"13 SIGPIPE"
,
.
number
=
13
},
{
.
name
=
"14 SIGALRM"
,
.
number
=
14
},
{
.
name
=
"15 SIGTERM"
,
.
number
=
15
},
{
.
name
=
"16 SIGURG"
,
.
number
=
16
},
{
.
name
=
"17 SIGSTOP"
,
.
number
=
17
},
{
.
name
=
"18 SIGTSTP"
,
.
number
=
18
},
{
.
name
=
"19 SIGCONT"
,
.
number
=
19
},
{
.
name
=
"20 SIGCHLD"
,
.
number
=
20
},
{
.
name
=
"21 SIGTTIN"
,
.
number
=
21
},
{
.
name
=
"22 SIGTTOU"
,
.
number
=
22
},
{
.
name
=
"23 SIGIO"
,
.
number
=
23
},
{
.
name
=
"24 SIGXCPU"
,
.
number
=
24
},
{
.
name
=
"25 SIGXFSZ"
,
.
number
=
25
},
{
.
name
=
"26 SIGVTALRM"
,
.
number
=
26
},
{
.
name
=
"27 SIGPROF"
,
.
number
=
27
},
{
.
name
=
"28 SIGWINCH"
,
.
number
=
28
},
{
.
name
=
"29 SIGINFO"
,
.
number
=
29
},
{
.
name
=
"30 SIGUSR1"
,
.
number
=
30
},
{
.
name
=
"31 SIGUSR2"
,
.
number
=
31
},
};
unsigned
int
Platform_numberOfSignals
=
sizeof
(
Platform_signals
)
/
sizeof
(
SignalItem
);
ProcessFieldData
Process_fields
[]
=
{
ProcessFieldData
Process_fields
[]
=
{
[
0
]
=
{
.
name
=
""
,
.
title
=
NULL
,
.
description
=
NULL
,
.
flags
=
0
,
},
[
0
]
=
{
.
name
=
""
,
.
title
=
NULL
,
.
description
=
NULL
,
.
flags
=
0
,
},
[
PID
]
=
{
.
name
=
"PID"
,
.
title
=
" PID "
,
.
description
=
"Process/thread ID"
,
.
flags
=
0
,
},
[
PID
]
=
{
.
name
=
"PID"
,
.
title
=
" PID "
,
.
description
=
"Process/thread ID"
,
.
flags
=
0
,
},
...
...
openbsd/Platform.c
View file @
214d0cff
...
@@ -16,6 +16,7 @@ in the source distribution for its full text.
...
@@ -16,6 +16,7 @@ in the source distribution for its full text.
#include "UptimeMeter.h"
#include "UptimeMeter.h"
#include "ClockMeter.h"
#include "ClockMeter.h"
#include "HostnameMeter.h"
#include "HostnameMeter.h"
#include "SignalsPanel.h"
#include "OpenBSDProcess.h"
#include "OpenBSDProcess.h"
#include "OpenBSDProcessList.h"
#include "OpenBSDProcessList.h"
...
@@ -94,6 +95,48 @@ ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_R
...
@@ -94,6 +95,48 @@ ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_R
int
Platform_numberOfFields
=
LAST_PROCESSFIELD
;
int
Platform_numberOfFields
=
LAST_PROCESSFIELD
;
/*
* See /usr/include/sys/signal.h
*/
SignalItem
Platform_signals
[]
=
{
{
.
name
=
" 0 Cancel"
,
.
number
=
0
},
{
.
name
=
" 1 SIGHUP"
,
.
number
=
1
},
{
.
name
=
" 2 SIGINT"
,
.
number
=
2
},
{
.
name
=
" 3 SIGQUIT"
,
.
number
=
3
},
{
.
name
=
" 4 SIGILL"
,
.
number
=
4
},
{
.
name
=
" 5 SIGTRAP"
,
.
number
=
5
},
{
.
name
=
" 6 SIGABRT"
,
.
number
=
6
},
{
.
name
=
" 6 SIGIOT"
,
.
number
=
6
},
{
.
name
=
" 7 SIGEMT"
,
.
number
=
7
},
{
.
name
=
" 8 SIGFPE"
,
.
number
=
8
},
{
.
name
=
" 9 SIGKILL"
,
.
number
=
9
},
{
.
name
=
"10 SIGBUS"
,
.
number
=
10
},
{
.
name
=
"11 SIGSEGV"
,
.
number
=
11
},
{
.
name
=
"12 SIGSYS"
,
.
number
=
12
},
{
.
name
=
"13 SIGPIPE"
,
.
number
=
13
},
{
.
name
=
"14 SIGALRM"
,
.
number
=
14
},
{
.
name
=
"15 SIGTERM"
,
.
number
=
15
},
{
.
name
=
"16 SIGURG"
,
.
number
=
16
},
{
.
name
=
"17 SIGSTOP"
,
.
number
=
17
},
{
.
name
=
"18 SIGTSTP"
,
.
number
=
18
},
{
.
name
=
"19 SIGCONT"
,
.
number
=
19
},
{
.
name
=
"20 SIGCHLD"
,
.
number
=
20
},
{
.
name
=
"21 SIGTTIN"
,
.
number
=
21
},
{
.
name
=
"22 SIGTTOU"
,
.
number
=
22
},
{
.
name
=
"23 SIGIO"
,
.
number
=
23
},
{
.
name
=
"24 SIGXCPU"
,
.
number
=
24
},
{
.
name
=
"25 SIGXFSZ"
,
.
number
=
25
},
{
.
name
=
"26 SIGVTALRM"
,
.
number
=
26
},
{
.
name
=
"27 SIGPROF"
,
.
number
=
27
},
{
.
name
=
"28 SIGWINCH"
,
.
number
=
28
},
{
.
name
=
"29 SIGINFO"
,
.
number
=
29
},
{
.
name
=
"30 SIGUSR1"
,
.
number
=
30
},
{
.
name
=
"31 SIGUSR2"
,
.
number
=
31
},
{
.
name
=
"32 SIGTHR"
,
.
number
=
32
},
};
unsigned
int
Platform_numberOfSignals
=
sizeof
(
Platform_signals
)
/
sizeof
(
SignalItem
);
void
Platform_setBindings
(
Htop_Action
*
keys
)
{
void
Platform_setBindings
(
Htop_Action
*
keys
)
{
(
void
)
keys
;
(
void
)
keys
;
}
}
...
...
openbsd/Platform.h
View file @
214d0cff
...
@@ -12,6 +12,7 @@ in the source distribution for its full text.
...
@@ -12,6 +12,7 @@ in the source distribution for its full text.
#include "Action.h"
#include "Action.h"
#include "BatteryMeter.h"
#include "BatteryMeter.h"
#include "SignalsPanel.h"
extern
ProcessFieldData
Process_fields
[];
extern
ProcessFieldData
Process_fields
[];
...
@@ -35,6 +36,10 @@ extern ProcessField Platform_defaultFields[];
...
@@ -35,6 +36,10 @@ extern ProcessField Platform_defaultFields[];
extern
int
Platform_numberOfFields
;
extern
int
Platform_numberOfFields
;
extern
SignalItem
Platform_signals
[];
extern
unsigned
int
Platform_numberOfSignals
;
void
Platform_setBindings
(
Htop_Action
*
keys
);
void
Platform_setBindings
(
Htop_Action
*
keys
);
extern
MeterClass
*
Platform_meterTypes
[];
extern
MeterClass
*
Platform_meterTypes
[];
...
...
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