This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Thread states


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]