Module: xenomai-forge
Branch: rtdm-api-waitqueues
Commit: cf0d65376576a4f0e8151b2bd48f70980e457d45
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=cf0d65376576a4f0e8151b2bd48f70980e457d45

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Apr 16 18:35:06 2014 +0200

build: drop __XENO_DEBUG__, XENO_DEBUG_FULL__ from built-in CFLAGS

These are redundant with CONFIG_XENO_DEBUG, CONFIG_XENO_DEBUG_FULL
respectively, available from xeno_config.h.

---

 README.INSTALL                   |    6 +++---
 configure                        |    4 ++--
 configure.ac                     |    4 ++--
 doc/asciidoc/README.INSTALL.adoc |   12 ++++++------
 include/boilerplate/debug.h      |    7 ++++---
 include/boilerplate/lock.h       |    2 +-
 include/copperplate/debug.h      |    6 +++---
 include/copperplate/syncobj.h    |    6 +++---
 include/copperplate/threadobj.h  |    6 +++---
 lib/boilerplate/ancillaries.c    |    4 ++--
 lib/copperplate/init.c           |    4 ++--
 11 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/README.INSTALL b/README.INSTALL
index 4ec8330..d9de2ec 100644
--- a/README.INSTALL
+++ b/README.INSTALL
@@ -360,7 +360,7 @@ partial]           available, with varying overhead:
                        running the application at nominal speed.
                      * partial includes symbols, and also turns on internal
                        consistency checks within the Xenomai code (mostly
-                       present in the Copperplate layer). The __XENO_DEBUG__
+                       present in the Copperplate layer). The CONFIG_XENO_DEBUG
                        macro is defined, for both the Xenomai libraries and the
                        applications getting their C compilation flags from the
                        xeno-config script (i.e. xeno-config --cflags). The
@@ -370,8 +370,8 @@ partial]           available, with varying overhead:
                        with no level specification.
                      * full includes partial settings, but the optimizer is
                        disabled (-O0), and even more consistency checks may be
-                       performed. In addition to __XENO_DEBUG__, the macro
-                       __XENO_DEBUG_FULL__ is defined. This level introduces
+                       performed. In addition to CONFIG_XENO_DEBUG, the macro
+                       CONFIG_XENO_DEBUG_FULL is defined. This level introduces
                        the most overhead, which may triple the worst-case
                        latency, or even more.
 
diff --git a/configure b/configure
index 9605e6e..8cb3f17 100755
--- a/configure
+++ b/configure
@@ -14108,9 +14108,9 @@ XENO_USER_CFLAGS="$XENO_USER_APP_CFLAGS -pipe 
-fstrict-aliasing \
 XENO_USER_LDADD="$XENO_USER_APP_LDFLAGS"
 
 if test x$debug_mode = xpartial; then
-   XENO_USER_CFLAGS="-g -O2 -D__XENO_DEBUG__ $XENO_USER_CFLAGS"
+   XENO_USER_CFLAGS="-g -O2 $XENO_USER_CFLAGS"
 elif test x$debug_mode = xfull; then
-   XENO_USER_CFLAGS="-g -O0 -D__XENO_DEBUG__ -D__XENO_DEBUG_FULL__ 
$XENO_USER_CFLAGS"
+   XENO_USER_CFLAGS="-g -O0 $XENO_USER_CFLAGS"
 elif test x$debug_symbols = xy; then
    XENO_USER_CFLAGS="-g -O2 $XENO_USER_CFLAGS"
 else
diff --git a/configure.ac b/configure.ac
index a2dbc05..837477f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -609,9 +609,9 @@ XENO_USER_CFLAGS="$XENO_USER_APP_CFLAGS -pipe 
-fstrict-aliasing \
 XENO_USER_LDADD="$XENO_USER_APP_LDFLAGS"
 
 if test x$debug_mode = xpartial; then
-   XENO_USER_CFLAGS="-g -O2 -D__XENO_DEBUG__ $XENO_USER_CFLAGS"
+   XENO_USER_CFLAGS="-g -O2 $XENO_USER_CFLAGS"
 elif test x$debug_mode = xfull; then
-   XENO_USER_CFLAGS="-g -O0 -D__XENO_DEBUG__ -D__XENO_DEBUG_FULL__ 
$XENO_USER_CFLAGS"
+   XENO_USER_CFLAGS="-g -O0 $XENO_USER_CFLAGS"
 elif test x$debug_symbols = xy; then
    XENO_USER_CFLAGS="-g -O2 $XENO_USER_CFLAGS"
 else
diff --git a/doc/asciidoc/README.INSTALL.adoc b/doc/asciidoc/README.INSTALL.adoc
index 4b79f4f..031feaa 100644
--- a/doc/asciidoc/README.INSTALL.adoc
+++ b/doc/asciidoc/README.INSTALL.adoc
@@ -360,10 +360,10 @@ Generic configuration options (both cores)
 
        - _partial_ includes _symbols_, and also turns on internal
        consistency checks within the Xenomai code (mostly present in
-       the Copperplate layer). The `__XENO_DEBUG__` macro is defined,
-       for both the Xenomai libraries and the applications getting
-       their C compilation flags from the +xeno-config+ script
-       (i.e. +xeno-config --cflags+). The partial debug mode
+       the Copperplate layer). The `CONFIG_XENO_DEBUG` macro is
+       defined, for both the Xenomai libraries and the applications
+       getting their C compilation flags from the +xeno-config+
+       script (i.e. +xeno-config --cflags+). The partial debug mode
        implicitly turns on +--enable-assert+. A measurable overhead
        is introduced by this level.  This is the default level when
        +--enable-debug+ is mentioned with no level specification.
@@ -371,8 +371,8 @@ Generic configuration options (both cores)
        - _full_ includes _partial_ settings, but the optimizer is
        disabled (-O0), and even more consistency checks may be
        performed.  In addition to `__XENO_DEBUG__`, the macro
-       `__XENO_DEBUG_FULL__` is defined. This level introduces
-       the most overhead, which may triple the worst-case latency, or
+       `CONFIG_XENO_DEBUG_FULL` is defined. This level introduces the
+       most overhead, which may triple the worst-case latency, or
        even more.
 
 [normal]
diff --git a/include/boilerplate/debug.h b/include/boilerplate/debug.h
index 649c721..556396c 100644
--- a/include/boilerplate/debug.h
+++ b/include/boilerplate/debug.h
@@ -20,8 +20,9 @@
 
 #include <stdint.h>
 #include <stddef.h>
+#include <xeno_config.h>
 
-#ifdef __XENO_DEBUG__
+#ifdef CONFIG_XENO_DEBUG
 
 #include <pthread.h>
 #include <boilerplate/compiler.h>
@@ -81,7 +82,7 @@ int debug_init(void);
                __ret;                                          \
        })
 
-#else /* !__XENO_DEBUG__ */
+#else /* !CONFIG_XENO_DEBUG */
 
 static inline int must_check(void)
 {
@@ -119,7 +120,7 @@ struct backtrace_data {
 
 #define debug_init()   ({ 0; })
 
-#endif /* !__XENO_DEBUG__ */
+#endif /* !CONFIG_XENO_DEBUG */
 
 static inline int bad_pointer(const void *ptr)
 {
diff --git a/include/boilerplate/lock.h b/include/boilerplate/lock.h
index 879f736..6f0218c 100644
--- a/include/boilerplate/lock.h
+++ b/include/boilerplate/lock.h
@@ -89,7 +89,7 @@ struct cleanup_block {
 #define pop_cleanup_lock(__lock)       \
        pthread_cleanup_pop(0)
 
-#ifdef __XENO_DEBUG__
+#ifdef CONFIG_XENO_DEBUG
 int __check_cancel_type(const char *locktype);
 #else
 #define __check_cancel_type(__locktype)                                \
diff --git a/include/copperplate/debug.h b/include/copperplate/debug.h
index 64be5e0..39bcfba 100644
--- a/include/copperplate/debug.h
+++ b/include/copperplate/debug.h
@@ -21,7 +21,7 @@
 
 #include <boilerplate/debug.h>
 
-#ifdef __XENO_DEBUG__
+#ifdef CONFIG_XENO_DEBUG
 
 struct threadobj;
 
@@ -33,10 +33,10 @@ struct threadobj;
                        __debug(__thobj->name, __fmt, ##__args);        \
        } while (0)
 
-#else /* !__XENO_DEBUG__ */
+#else /* !CONFIG_XENO_DEBUG */
 
 #define debug(fmt, args...)  do { } while (0)
 
-#endif /* !__XENO_DEBUG__ */
+#endif /* !CONFIG_XENO_DEBUG */
 
 #endif /* _COPPERPLATE_DEBUG_H */
diff --git a/include/copperplate/syncobj.h b/include/copperplate/syncobj.h
index 1b14b7a..88321ad 100644
--- a/include/copperplate/syncobj.h
+++ b/include/copperplate/syncobj.h
@@ -88,7 +88,7 @@ struct syncobj {
 void __syncobj_cleanup_wait(struct syncobj *sobj,
                            struct threadobj *thobj);
 
-#ifdef __XENO_DEBUG__
+#ifdef CONFIG_XENO_DEBUG
 
 static inline void __syncobj_tag_locked(struct syncobj *sobj)
 {
@@ -106,7 +106,7 @@ static inline void __syncobj_check_locked(struct syncobj 
*sobj)
        assert(sobj->flags & SYNCOBJ_LOCKED);
 }
 
-#else /* !__XENO_DEBUG__ */
+#else /* !CONFIG_XENO_DEBUG */
 
 static inline void __syncobj_tag_locked(struct syncobj *sobj)
 {
@@ -120,7 +120,7 @@ static inline void __syncobj_check_locked(struct syncobj 
*sobj)
 {
 }
 
-#endif /* !__XENO_DEBUG__ */
+#endif /* !CONFIG_XENO_DEBUG */
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/include/copperplate/threadobj.h b/include/copperplate/threadobj.h
index 7e5f7de..2c6794f 100644
--- a/include/copperplate/threadobj.h
+++ b/include/copperplate/threadobj.h
@@ -238,7 +238,7 @@ static inline struct threadobj *threadobj_current(void)
        return thobj == NULL || thobj == THREADOBJ_IRQCONTEXT ? NULL : thobj;
 }
 
-#ifdef __XENO_DEBUG__
+#ifdef CONFIG_XENO_DEBUG
 
 static inline void __threadobj_tag_locked(struct threadobj *thobj)
 {
@@ -256,7 +256,7 @@ static inline void __threadobj_check_locked(struct 
threadobj *thobj)
        assert(thobj->status & __THREAD_S_LOCKED);
 }
 
-#else /* !__XENO_DEBUG__ */
+#else /* !CONFIG_XENO_DEBUG */
 
 static inline void __threadobj_tag_locked(struct threadobj *thobj)
 {
@@ -270,7 +270,7 @@ static inline void __threadobj_check_locked(struct 
threadobj *thobj)
 {
 }
 
-#endif /* !__XENO_DEBUG__ */
+#endif /* !CONFIG_XENO_DEBUG */
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/lib/boilerplate/ancillaries.c b/lib/boilerplate/ancillaries.c
index f613a8e..390369c 100644
--- a/lib/boilerplate/ancillaries.c
+++ b/lib/boilerplate/ancillaries.c
@@ -207,7 +207,7 @@ __attribute__ ((weak)) void *__main_heap = NULL;
 
 #endif /* !CONFIG_XENO_PSHARED */
 
-#ifdef __XENO_DEBUG__
+#ifdef CONFIG_XENO_DEBUG
 
 int __check_cancel_type(const char *locktype)
 {
@@ -222,7 +222,7 @@ int __check_cancel_type(const char *locktype)
        return 0;
 }
 
-#endif /* !__XENO_DEBUG__ */
+#endif /* CONFIG_XENO_DEBUG */
 
 static void __boilerplate_init(void)
 {
diff --git a/lib/copperplate/init.c b/lib/copperplate/init.c
index 8f9f33a..4cb0c6f 100644
--- a/lib/copperplate/init.c
+++ b/lib/copperplate/init.c
@@ -603,12 +603,12 @@ void copperplate_init(int *argcp, char *const **argvp)
                }
        }
 
-#ifdef __XENO_DEBUG__
+#ifdef CONFIG_XENO_DEBUG
        if (__node_info.silent_mode == 0) {
                warning("Xenomai compiled with %s debug enabled,\n"
                        "                              "
                        "%shigh latencies expected [--enable-debug=%s]",
-#ifdef __XENO_DEBUG_FULL__
+#ifdef CONFIG_XENO_DEBUG_FULL
                        "full", "very ", "full"
 #else
                        "partial", "", "partial"


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

Reply via email to