From 8d8c23f4cae6eb9de188d7261a23adff0b14954c Mon Sep 17 00:00:00 2001 From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz Date: Fri, 19 Mar 2010 21:58:45 +0100 Subject: [PATCH 12/70] top_irix =================================================================== --- top.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/top.c b/top.c index 6d4a7cc..c7e7553 100644 --- a/top.c +++ b/top.c @@ -1783,7 +1783,8 @@ static void configs_read (void) confighlp(Winstk[i].rc.fieldscur); } - if(Rc.mode_irixps && smp_num_cpus>1){ + if(Rc.mode_irixps && smp_num_cpus>1 && + !(CHKw(Curwin, Show_THREADS))) { // good for 100 CPUs per process pcpu_max_value = 9999.0; Fieldstab[P_CPU].fmts = " %4.0f"; @@ -2570,6 +2571,15 @@ static void do_key (unsigned c) case 'H': if (VIZCHKc) { TOGw(Curwin, Show_THREADS); + if(Rc.mode_irixps && smp_num_cpus>1 && + !(CHKw(Curwin, Show_THREADS))){ + // good for 100 CPUs per process + pcpu_max_value = 9999.0; + Fieldstab[P_CPU].fmts = " %4.0f"; + } else { + pcpu_max_value = 99.9; + Fieldstab[P_CPU].fmts = " %#4.1f"; + } show_msg(fmtmk("Show threads %s" , CHKw(Curwin, Show_THREADS) ? "On" : "Off")); } @@ -2626,7 +2636,8 @@ static void do_key (unsigned c) Rc.mode_irixps = !Rc.mode_irixps; show_msg(fmtmk("Irix mode %s", Rc.mode_irixps ? "On" : "Off")); #endif - if(Rc.mode_irixps && smp_num_cpus>1){ + if(Rc.mode_irixps && smp_num_cpus>1 && + !(CHKw(Curwin, Show_THREADS))){ // good for 100 CPUs per process pcpu_max_value = 9999.0; Fieldstab[P_CPU].fmts = " %4.0f"; -- 1.7.0