[ECOS] Static constuctors
Boris V. Guzhov
borg@int.spb.ru
Fri Oct 6 09:39:00 GMT 2000
Hi All!
My host - RedHat Linux 6.2
My target - pc.
I work with latest eCos version from anoncvs.
I have some problems with elix template.
There is a simple test (test.cc):
// -------------
class A
{
public: A() { printf("A: %d\n", pthread_self());}
};
static A a;
int main(void)
{
printf("main: %d\n", pthread_self());
return 0;
}
// --------------
In Linux (not ecos) environment it prints:
A: 1024
main: 1024
And I see that static constructor is invoked in main() thread context.
In linux synthetic environment (linux elix template) there is prints:
A: 0
main: 1024
But I need to invoke static constructors in main() thread context.
Then I tried to make the following:
- I eddited ecos.ecc file:
CYGSEM_INVOKE_DEFAULT_STATIC_CONSTRUCTORS: user_value 1
CYGSEM_LIBC_STARTUP_MAIN_THREAD: user_value 1
- "ecosconfig resolve" prints:
"C CYGPKG_LIBC_STARTUP, "requires" constraint not satisfied:
CYGINT_LIBC_STARTUP_CONTEXT == 1"
And I cannot run "ecosconfig tree".
What's wrong?
Thanks in advance.
--
Boris Guzhov,
St.Petersburg, Russia
More information about the Ecos-discuss
mailing list