This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Calling cyg_thread_create() from static constructors
- From: uwe dot kindler at cetoni dot de
- To: <ecos-discuss at sourceware dot org>
- Date: Mon, 06 Feb 2006 12:58:06 +0100
- Subject: [ECOS] Calling cyg_thread_create() from static constructors
Hello,
is it allowed in eCos to call cyg_thread_create() and cyg_thread_resume() from static constructors?
I have the following problem. My C++ application contains a static object. This object creates a thread with cyg_thread_create() and then calls cyg_thread_resume() in its constructor.
I single stepped the function cyg_hal_invoke_constructors(). As soon as this object is created (it is the last one that is constructed cyg_hal_invoke_constructors()) it is not possible to view the list of threads from insight or GDB any longer. If I select View, Thread List in insight, I get an empty thread list or an error message that it was not possible to get thread list. If I remove this object from my application, then this problem does not occur.
Is there any solution for this problem or should I simply not call these two function from a static constructor?.
Thank you for your help.
Uwe Kindler
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss