summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-03-15 01:03:17 +0000
committerMiles Bader <miles@gnu.org>1995-03-15 01:03:17 +0000
commit307c966086fcf2b65ac168d1cf3ef335a2ed5310 (patch)
treef689beee2bc76b2a3d7c790003009b1470c1acd7
parent5a8232e58e62ae6e84f1b0d1c6a02af8f5a627fe (diff)
Set the PSTAT_STATE_PRIORITY and PSTAT_STATE_NICED flags when appropiate.
-rw-r--r--libps/procstat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libps/procstat.c b/libps/procstat.c
index cd9708c3..f610cce1 100644
--- a/libps/procstat.c
+++ b/libps/procstat.c
@@ -62,6 +62,11 @@ thread_state(thread_basic_info_t bi)
break;
}
+ if (bi->base_priority < 12)
+ state |= PSTAT_STATE_PRIORITY;
+ else if (bi->base_priority > 12)
+ state |= PSTAT_STATE_NICED;
+
if (bi->flags & TH_FLAGS_SWAPPED)
state |= PSTAT_STATE_SWAPPED;