From: | "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx> |
Date: | Fri, 23 Mar 2007 12:51:45 +0100 |
But is more better mark process as sleeping only if _all_ of this lwps are in sleeping state.
int process_states[6]; char *procstatenames[] = { - "", " starting, ", " running, ", " sleeping, ", " stopped, ", - " zombie, ", + "", " starting, ", " running, ", " stopped, ", " zombie, ", + " sleeping, ", NULL };
{ total_procs++; + if (LP(pp, stat) == LSSLEEP) + PP(pp, stat) = SZOMB + 1; process_states[(unsigned char) PP(pp, stat)]++;
state = PP(pp, stat); if (LP(pp, stat) == LSSLEEP) state = SZOMB + 1; process_states[state]++;
cheers simon
-- Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
Attachment:
signature.asc
Description: OpenPGP digital signature