From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Garnett To: ecos-discuss@sourceware.cygnus.com Subject: Re: [ECOS] Thread states Date: Wed, 10 Jan 2001 03:30:00 -0000 Message-id: References: X-SW-Source: 2001-01/msg00151.html Paleologos Spanos 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