Subject: misplaced parenthesis in proc_representative_lwp() ?
To: None <tech-kern@netbsd.org>
From: Stephan Uphoff <ups@stups.com>
List: tech-kern
Date: 01/27/2003 20:57:03
I think one of the parentheses is misplaced in file kern_lwp.c
function proc_representative_lwp().
case SACTIVE:
/* Pick the most live LWP */
onproc = running = sleeping = stopped = suspended = NULL;
LIST_FOREACH(l, &p->p_lwps, l_sibling) {
switch (l->l_stat) {
case LSONPROC:
onproc = l;
break;
......SNIP.....
case LSSUSPENDED:
suspended = l;
break;
}
if (onproc)
return onproc;
.....SNIP......
if (suspended)
return suspended;
------------> }
break;
Should probably read:
case SACTIVE:
/* Pick the most live LWP */
onproc = running = sleeping = stopped = suspended = NULL;
LIST_FOREACH(l, &p->p_lwps, l_sibling) {
switch (l->l_stat) {
case LSONPROC:
onproc = l;
break;
......SNIP.....
case LSSUSPENDED:
suspended = l;
break;
}
-------------> }
if (onproc)
return onproc;
.....SNIP......
if (suspended)
return suspended;
break;