This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Threads never called in twothreads example
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: Chris Hanna <chris at lexra dot com>
- Cc: Robert Oglesby <bob at hosteng dot com>, ecos-discuss at sources dot redhat dot com
- Date: Wed, 13 Feb 2002 13:35:12 +0000
- Subject: Re: [ECOS] Threads never called in twothreads example
- Organization: Red Hat UK Ltd.
- References: <036801c1b0d2$707e7140$020ba8c0@BOBP4> <0c5a01c1b0f9$bbe5a820$3b08a8c0@lexra.com>
Chris Hanna wrote:
>
> I might be seeing the same thing. I see simple_program() get called (for
> threadA i guess), which calls cyg_thread_delay(200), then simple_program()
> is called again (for threadB i guess) which calls cyg_thread_delay(200), but
> neither of them ever get to the for (;;) loop. I see main() get invoked,
> which i guess is just some stub since exit() is called. It looks like the
> scheduer does something after that, which ultimately ends up at the
> idle_thread_main() which is a infinite loop.
In GDB you can use "info threads" to list the threads and find out their
state. You can use "thread N" to switch to thread number N.
If this is a new board port, perhaps the timer interrupt isn't working -
otherwise the kernel will never know to stop delaying!
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss