Module: xenomai-3
Branch: next
Commit: 88a61a2c3aff8552086fa7f6b1fa6ea560fa1336
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=88a61a2c3aff8552086fa7f6b1fa6ea560fa1336

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Jun 16 16:36:37 2015 +0200

copperplate/reference: register function exports at early init

---

 include/copperplate/reference.h |    2 +-
 lib/copperplate/reference.c     |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/copperplate/reference.h b/include/copperplate/reference.h
index 0a5e3b2..3297bd7 100644
--- a/include/copperplate/reference.h
+++ b/include/copperplate/reference.h
@@ -69,7 +69,7 @@ static inline int __fnref_nofn(void *fnaddr)
 #define fnref_get(v, r)                ((v) = (r) < 0 ? NULL : __refchk(v, r))
 #define fnref_register(l, s)                                           \
        int __refvar(l, s);                                             \
-       static void __attribute__ ((constructor)) __ifnref_ ## s(void)  \
+       static void __early_ctor __ifnref_ ## s(void)                   \
        {                                                               \
                __refvar(l, s) = __fnref_register(#l, l ## _tag,        \
                                                  l ## _cbi,            \
diff --git a/lib/copperplate/reference.c b/lib/copperplate/reference.c
index 32d35d8..09b845e 100644
--- a/lib/copperplate/reference.c
+++ b/lib/copperplate/reference.c
@@ -38,13 +38,13 @@ int __fnref_register(const char *libname,
        int pos;
 
        if ((unsigned int)libtag >= MAX_FNLIBS)
-               panic("reference table overflow for library %s",
-                     libname);
+               early_panic("reference table overflow for library %s",
+                           libname);
 
        pos = nrefs[libtag]++;
        if (pos >= MAX_FNREFS)
-               panic("too many function references in library %s (> %d)",
-                     libname, MAX_FNREFS);
+               early_panic("too many function references in library %s (> %d)",
+                           libname, MAX_FNREFS);
 
        assert(__fnrefs[libtag][pos].fn == NULL);
        __fnrefs[libtag][pos].fn = fn;


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to