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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Apr 15 10:40:40 2014 +0200

vxworks/init: assign explicit priority to constructor

---

 lib/vxworks/Makefile.am |    1 +
 lib/vxworks/Makefile.in |    1 +
 lib/vxworks/init.c      |    3 ++-
 lib/vxworks/init.h      |   25 +++++++++++++++++++++++++
 4 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/lib/vxworks/Makefile.am b/lib/vxworks/Makefile.am
index a99af87..f012f3e 100644
--- a/lib/vxworks/Makefile.am
+++ b/lib/vxworks/Makefile.am
@@ -4,6 +4,7 @@ libvxworks_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 
 libvxworks_la_SOURCES = \
        init.c          \
+       init.h          \
        errnoLib.c      \
        intLib.c        \
        kernLib.c       \
diff --git a/lib/vxworks/Makefile.in b/lib/vxworks/Makefile.in
index 21c7d4a..600210e 100644
--- a/lib/vxworks/Makefile.in
+++ b/lib/vxworks/Makefile.in
@@ -379,6 +379,7 @@ lib_LTLIBRARIES = libvxworks.la
 libvxworks_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 libvxworks_la_SOURCES = \
        init.c          \
+       init.h          \
        errnoLib.c      \
        intLib.c        \
        kernLib.c       \
diff --git a/lib/vxworks/init.c b/lib/vxworks/init.c
index 45ae6b9..46372b9 100644
--- a/lib/vxworks/init.c
+++ b/lib/vxworks/init.c
@@ -23,6 +23,7 @@
 #include <getopt.h>
 #include <copperplate/init.h>
 #include <vxworks/errnoLib.h>
+#include "init.h"
 #include "tickLib.h"
 #include "taskLib.h"
 
@@ -95,7 +96,7 @@ static struct copperskin vxworks_skin = {
        .help = vxworks_help,
 };
 
-static __attribute__ ((constructor)) void register_vxworks(void)
+static __libvxworks_ctor void register_vxworks(void)
 {
        copperplate_register_skin(&vxworks_skin);
 }
diff --git a/lib/vxworks/init.h b/lib/vxworks/init.h
new file mode 100644
index 0000000..a45bfc1
--- /dev/null
+++ b/lib/vxworks/init.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2014 Philippe Gerum <r...@xenomai.org>.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+ */
+#ifndef _VXWORKS_INIT_H
+#define _VXWORKS_INIT_H
+
+#define __LIBVXWORKS_CTOR_PRIO  300
+
+#define __libvxworks_ctor  __attribute__ 
((constructor(__LIBVXWORKS_CTOR_PRIO)))
+
+#endif /* _VXWORKS_INIT_H */


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

Reply via email to