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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sat Feb 14 16:37:44 2015 +0100

lib/cobalt: control auto-shadowing via __cobalt_no_shadow

---

 include/cobalt/sys/cobalt.h |    2 ++
 lib/cobalt/init.c           |    5 +++++
 2 files changed, 7 insertions(+)

diff --git a/include/cobalt/sys/cobalt.h b/include/cobalt/sys/cobalt.h
index 6a0aa3c..bd2dd36 100644
--- a/include/cobalt/sys/cobalt.h
+++ b/include/cobalt/sys/cobalt.h
@@ -141,6 +141,8 @@ void __libcobalt_init(void);
 
 extern int __cobalt_defer_init;
 
+extern int __cobalt_no_shadow;
+
 extern int __cobalt_main_prio;
 
 extern int __cobalt_print_bufsz;
diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c
index b31d0d1..178e807 100644
--- a/lib/cobalt/init.c
+++ b/lib/cobalt/init.c
@@ -45,6 +45,8 @@
 
 __weak int __cobalt_defer_init = 0;
 
+__weak int __cobalt_no_shadow = 0;
+
 __weak int __cobalt_main_prio = -1;
 
 struct sigaction __cobalt_orig_sigdebug;
@@ -211,6 +213,9 @@ static __libcobalt_ctor void __init_cobalt(void)
 
        __libcobalt_init();
 
+       if (__cobalt_no_shadow)
+               return;
+
        p = getenv("XENO_NOSHADOW");
        if (p && *p)
                return;


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

Reply via email to