This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Thread states
- To: ecos-discuss at sourceware dot cygnus dot com
- Subject: Re: [ECOS] Thread states
- From: Nick Garnett <nickg at cygnus dot co dot uk>
- Date: 10 Jan 2001 11:21:55 +0000
- Newsgroups: cygnus.sourceware.ecos.d
- Organization: Red Hat UK
- References: <Pine.GSO.4.10.10101100009230.19243-100000@sierra.ee.ucla.edu>
Paleologos Spanos <paleolog@ee.ucla.edu> writes:
> From what I have understood ,the wait_queue is a number of bits with
> every bit to represent a specific thread which is on the scheduler.So
> every bit is 1 if the corresponding thread is waiting for execution or 0
> if it has finished(EXITED state).Is this correct?
The bit will also be zero if the thread is waiting for some reason, or
has been suspended. The bit is only ever 1 if the thread is ready to
execute.
> So,in my previous mail I was asking if after a thread has completed its
> execution ,will the corresponding bit on the wait_queue become 0.
>
Yes, since the thread in no-longer runnable. In addition it also
deregisters itself from the scheduler so another thread could be
created with it's priority. So, if you restart the thread it may be
given a different priority.
--
Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK