Module: xenomai-forge
Branch: next
Commit: 4605319924ff73b4381f66ab9c78f2b8eb0aa58b
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=4605319924ff73b4381f66ab9c78f2b8eb0aa58b

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

Reply via email to