[ECOS] Re: Unexpected exit from threads

Nick Garnett nickg@ecoscentric.com
Thu Nov 23 10:32:00 GMT 2006


David Luca <davidluca3000@yahoo.com> writes:

> Yes, the for loops are long enough for the leds to be
> visible.

It might be better to change the function so that each call toggles
the LED rather than turn it off and on.


> I traced the cyg_thread_delay and after the
> Cyg_Thread::unlock() call, nothing happens, the
> execution goes to the main function.

What do you mean by going to the main function? Which function is
that? In some configurations you might end up with a dummy main()
thread which will just exit, it won't have any effect on your program.

Can you still get this program running as it was originally intended,
with just the printf()s? If so, what then happens if you then add the
led functions? Try to work out what differs between the working
version and the non-working version.


-- 
Nick Garnett                                     eCos Kernel Architect
http://www.ecoscentric.com                The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list