wchan for multithreaded process is now ~0ull or "*"

This commit is contained in:
albert
2004-07-21 21:17:35 +00:00
parent 9e52b5aa29
commit 266d5b708a
7 changed files with 23 additions and 12 deletions

View File

@ -502,7 +502,7 @@ static int pr_wchan(char *restrict const outbuf, const proc_t *restrict const pp
*/
if(!(pp->wchan & 0xffffff)) return snprintf(outbuf, COLWID, "%s", "-");
if(wchan_is_number) return snprintf(outbuf, COLWID, "%x", (unsigned)(pp->wchan) & 0xffffffu);
return snprintf(outbuf, COLWID, "%s", wchan(pp->wchan, pp->XXXID));
return snprintf(outbuf, COLWID, "%s", lookup_wchan(pp->wchan, pp->XXXID));
}
/* Terrible trunctuation, like BSD crap uses: I999 J999 K999 */
@ -704,7 +704,7 @@ static int pr_wname(char *restrict const outbuf, const proc_t *restrict const pp
* more than one thread waiting in the kernel.
*/
if(!(pp->wchan & 0xffffff)) return snprintf(outbuf, COLWID, "%s", "-");
return snprintf(outbuf, COLWID, "%s", wchan(pp->wchan, pp->XXXID));
return snprintf(outbuf, COLWID, "%s", lookup_wchan(pp->wchan, pp->XXXID));
}
static int pr_nwchan(char *restrict const outbuf, const proc_t *restrict const pp){