From c3dcc18006f4f2af377855764883404935c0f726 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Tue, 10 Jun 1997 18:22:30 +0000 Subject: Fri May 23 10:08:48 1997 Thomas Bushnell, n/BSG * kern/thread.c (thread_info): Set flags word correctly; TH_FLAGS_SWAPPED and TH_FLAGS_IDLE are not exclusive. --- kern/thread.c | 9 ++++----- 1 file 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; -- cgit v1.2.3