summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1997-06-10 18:22:30 +0000
committerThomas Bushnell <thomas@gnu.org>1997-06-10 18:22:30 +0000
commitc3dcc18006f4f2af377855764883404935c0f726 (patch)
tree6e4df1626fa3264ecdfdad31b7c8619e8af24ab7 /kern
parent0751daa837c383c270d94bbf468190b99bb64267 (diff)
Fri May 23 10:08:48 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* kern/thread.c (thread_info): Set flags word correctly; TH_FLAGS_SWAPPED and TH_FLAGS_IDLE are not exclusive.
Diffstat (limited to 'kern')
-rw-r--r--kern/thread.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kern/thread.c b/kern/thread.c
index 02969f3..1d7a378 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -1513,12 +1513,11 @@ kern_return_t thread_info(
(basic_info->cpu_usage * 1000000)/sched_usec;
#endif /* SIMPLE_CLOCK */
+ flags = 0;
if (thread->state & TH_SWAPPED)
- flags = TH_FLAGS_SWAPPED;
- else if (thread->state & TH_IDLE)
- flags = TH_FLAGS_IDLE;
- else
- flags = 0;
+ flags |= TH_FLAGS_SWAPPED;
+ if (thread->state & TH_IDLE)
+ flags |= TH_FLAGS_IDLE;
if (thread->state & TH_HALTED)
state = TH_STATE_HALTED;