1
Description: Change formal of IRix mode when showing threads
2
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
3
Bug-Debian: http://bugs.debian.org/459890
4
Reviewed-by: Craig Small <csmall@debian.org>
6
===================================================================
7
--- a/top.c 2009-11-24 20:53:05.000000000 +1100
8
+++ b/top.c 2009-11-24 21:00:33.000000000 +1100
10
confighlp(Winstk[i].rc.fieldscur);
13
- if(Rc.mode_irixps && smp_num_cpus>1){
14
+ if(Rc.mode_irixps && smp_num_cpus>1 &&
15
+ !(CHKw(Curwin, Show_THREADS))) {
16
// good for 100 CPUs per process
17
pcpu_max_value = 9999.0;
18
Fieldstab[P_CPU].fmts = " %4.0f";
19
@@ -2570,6 +2571,15 @@
22
TOGw(Curwin, Show_THREADS);
23
+ if(Rc.mode_irixps && smp_num_cpus>1 &&
24
+ !(CHKw(Curwin, Show_THREADS))){
25
+ // good for 100 CPUs per process
26
+ pcpu_max_value = 9999.0;
27
+ Fieldstab[P_CPU].fmts = " %4.0f";
29
+ pcpu_max_value = 99.9;
30
+ Fieldstab[P_CPU].fmts = " %#4.1f";
32
show_msg(fmtmk("Show threads %s"
33
, CHKw(Curwin, Show_THREADS) ? "On" : "Off"));
36
Rc.mode_irixps = !Rc.mode_irixps;
37
show_msg(fmtmk("Irix mode %s", Rc.mode_irixps ? "On" : "Off"));
39
- if(Rc.mode_irixps && smp_num_cpus>1){
40
+ if(Rc.mode_irixps && smp_num_cpus>1 &&
41
+ !(CHKw(Curwin, Show_THREADS))){
42
// good for 100 CPUs per process
43
pcpu_max_value = 9999.0;
44
Fieldstab[P_CPU].fmts = " %4.0f";