Dmitry Lohansky wrote:
But is more better mark process as sleeping only if _all_ of this lwps are in sleeping state.
I'm not sure. Maybe we should display all lwps for the time being. This for sure is an area of discussion.
int process_states[6];
char *procstatenames[] = {
- "", " starting, ", " running, ", " sleeping, ", " stopped, ",
- " zombie, ",
+ "", " starting, ", " running, ", " stopped, ", " zombie, ",
+ " sleeping, ",
NULL
};
well caught!
{
total_procs++;
+ if (LP(pp, stat) == LSSLEEP)
+ PP(pp, stat) = SZOMB + 1;
process_states[(unsigned char) PP(pp, stat)]++;
I don't really like this. Maybe something like int state; state = PP(pp, stat); if (LP(pp, stat) == LSSLEEP) state = SZOMB + 1; process_states[state]++; what do you think? 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 / \
signature.asc
Description: OpenPGP digital signature
