Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



Mindaugas R. wrote:
Hello,

Module Name:    src
Committed By:   tnn
Date:           Tue Jul 31 00:52:05 UTC 2007

Modified Files:
        src/sys/kern: kern_lwp.c

Log Message:
proc_representative_lwp:
 - Correct expression for checking if the lwp is running.
 - Remove dead code. Ok'd by Andrew Doran.

-                       *nrlwps = (l->l_stat == LSONPROC || LSRUN);
+                       *nrlwps = (l->l_stat & (LSONPROC | LSRUN)) ? 1 : 0;

LWP status values are not flags - this is not correct. I think it should be:
        *nrlwps = (l->l_stat == LSONPROC || l->l_stat == LSRUN) ? 1 : 0;

        *nrlwps = (l->l_stat == LSONPROC || l->l_stat == LSRUN);

should seem to be the most correct.



Home | Main Index | Thread Index | Old Index