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

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

psos/init: assign explicit priority to constructor

---

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

diff --git a/lib/psos/Makefile.am b/lib/psos/Makefile.am
index 4eb7ad8..6abaf95 100644
--- a/lib/psos/Makefile.am
+++ b/lib/psos/Makefile.am
@@ -4,6 +4,7 @@ libpsos_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 
 libpsos_la_SOURCES =   \
        init.c          \
+       init.h          \
        internal.h      \
        pt.c            \
        pt.h            \
diff --git a/lib/psos/Makefile.in b/lib/psos/Makefile.in
index c9af455..708de4a 100644
--- a/lib/psos/Makefile.in
+++ b/lib/psos/Makefile.in
@@ -374,6 +374,7 @@ lib_LTLIBRARIES = libpsos.la
 libpsos_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 libpsos_la_SOURCES = \
        init.c          \
+       init.h          \
        internal.h      \
        pt.c            \
        pt.h            \
diff --git a/lib/psos/init.c b/lib/psos/init.c
index 016534e..9d90eb8 100644
--- a/lib/psos/init.c
+++ b/lib/psos/init.c
@@ -27,6 +27,7 @@
 #include <copperplate/clockobj.h>
 #include <copperplate/debug.h>
 #include <psos/psos.h>
+#include "init.h"
 #include "internal.h"
 #include "tm.h"
 #include "task.h"
@@ -126,7 +127,7 @@ static struct copperskin psos_skin = {
        .help = psos_help,
 };
 
-static __attribute__ ((constructor)) void register_psos(void)
+static __libpsos_ctor void register_psos(void)
 {
        copperplate_register_skin(&psos_skin);
 }
diff --git a/lib/psos/init.h b/lib/psos/init.h
new file mode 100644
index 0000000..eaaf265
--- /dev/null
+++ b/lib/psos/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 _PSOS_INIT_H
+#define _PSOS_INIT_H
+
+#define __LIBPSOS_CTOR_PRIO  300
+
+#define __libpsos_ctor  __attribute__ ((constructor(__LIBPSOS_CTOR_PRIO)))
+
+#endif /* _PSOS_INIT_H */


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

Reply via email to