From: Matthew Dillon Date: Sat, 18 Dec 2010 08:35:13 +0000 (-0800) Subject: utilities - Print the cpu id for running and runnable threads X-Git-Tag: v2.11.0~450 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/6bffb878897909dd8d8ba974fb4e44c1c0b04fa1 utilities - Print the cpu id for running and runnable threads * The cpuid was only being printed for the currently running thread on a cpu. Also print it for any scheduled (runnable) threads on that cpu even if they aren't the currently running thread. --- diff --git a/bin/ps/print.c b/bin/ps/print.c index 0a409be6ae..52aee5fcb7 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -194,7 +194,7 @@ state(const KINFO *k, const struct varent *vent) case LSRUN: *cp = 'R'; - if (KI_LWP(k, tdflags) & TDF_RUNNING) { + if (KI_LWP(k, tdflags) & (TDF_RUNNING | TDF_RUNQ)) { ++cp; sprintf(cp, "%d", KI_LWP(k, cpuid)); while (cp[1])