This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Thread states
- To: Paleologos Spanos <paleolog at ee dot ucla dot edu>
- Subject: Re: [ECOS] Thread states
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Wed, 10 Jan 2001 00:55:36 +0000
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <Pine.GSO.4.10.10101091545400.18211-100000@sierra.ee.ucla.edu>
Paleologos Spanos wrote:
>
> Hi,I have a question regarding the state of thread.
>
> -When a thread finishes its work what is its state? the "EXITED"?
> The question is if the "exited" state is showing that the thread has
> finished execution or it is the state after having exit(with the exit
> function) the thread?
The former - although from your description the latter would imply the
former anyway?
> -If I want to stop the execution of a thread and then start it again from
> the beggining again(not from the point it stopped) which
> are the appropriate functions? exit and then resume,or kill and then
> resume?
I think you are a bit confused: you call cyg_thread_exit() to exit the
calling thread; you call cyg_thread_kill() to request another thread exits.
When the thread exits you can call cyg_thread_resume() on it.
> -Will this thread be present on the wait_queue of the bitmap
> scheduler?(assuming that we have the bitmap scheduler)
At what point?
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Un cheval, pas du glue. Pas du cheval, beaucoup du glue. || Opinions==mine