Module: xenomai-forge Branch: next Commit: b265eec4211314d58f91aa853e6f9dfb3e8fc08c URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=b265eec4211314d58f91aa853e6f9dfb3e8fc08c
Author: Philippe Gerum <r...@xenomai.org> Date: Mon Jun 10 10:46:32 2013 +0200 lib/cobalt: set high constructor priority We give the Cobalt library constructor a high priority, so that extension libraries may assume the core services are available when their own constructor runs. --- lib/cobalt/init.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c index 208bd1e..09eaaea 100644 --- a/lib/cobalt/init.c +++ b/lib/cobalt/init.c @@ -144,7 +144,14 @@ static int bind_interface(void) return muxid; } -static __attribute__ ((constructor)) +/* + * We give the Cobalt library constructor a high priority, so that + * extension libraries may assume the core services are available when + * their own constructor runs. Priorities 0-100 may be reserved by the + * implementation on some platforms, and we may want to keep some + * levels free for very high priority inits, so pick 200. + */ +static __attribute__ ((constructor(200))) void __init_cobalt_interface(void) { pthread_t tid = pthread_self(); _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git