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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu May 29 16:36:47 2014 +0200

cobalt/lock: OPT_DEBUG_XNLOCK -> OPT_DEBUG_LOCKING

---

 include/cobalt/kernel/assert.h |    6 +++---
 include/cobalt/kernel/lock.h   |   14 +++++++-------
 kernel/cobalt/Kconfig          |   10 +++++-----
 kernel/cobalt/debug.c          |    4 ++--
 kernel/cobalt/intr.c           |    4 ++--
 kernel/cobalt/lock.c           |    6 +++---
 kernel/cobalt/procfs.c         |    8 ++++----
 7 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/include/cobalt/kernel/assert.h b/include/cobalt/kernel/assert.h
index 6e00551..042ef78 100644
--- a/include/cobalt/kernel/assert.h
+++ b/include/cobalt/kernel/assert.h
@@ -61,8 +61,8 @@
 #define CONFIG_XENO_OPT_DEBUG_CONTEXT 0
 #endif
 
-#ifndef CONFIG_XENO_OPT_DEBUG_XNLOCK
-#define CONFIG_XENO_OPT_DEBUG_XNLOCK 0
+#ifndef CONFIG_XENO_OPT_DEBUG_LOCKING
+#define CONFIG_XENO_OPT_DEBUG_LOCKING 0
 #endif
 
 #ifndef CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX
@@ -86,7 +86,7 @@
 #define interrupt_only()       XENO_BUGON(CONTEXT, !xnsched_interrupt_p())
 #define realtime_cpu_only()    XENO_BUGON(CONTEXT, 
!xnsched_supported_cpu(ipipe_processor_id()))
 #define thread_only()          XENO_BUGON(CONTEXT, xnsched_interrupt_p())
-#if XENO_DEBUG(XNLOCK)
+#if XENO_DEBUG(LOCKING)
 #define atomic_only()          XENO_BUGON(CONTEXT, (xnlock_is_owner(&nklock) 
&& hard_irqs_disabled()) == 0)
 #define preemptible_only()     XENO_BUGON(CONTEXT, xnlock_is_owner(&nklock) || 
hard_irqs_disabled())
 #else
diff --git a/include/cobalt/kernel/lock.h b/include/cobalt/kernel/lock.h
index 6ad4910..c2775e8 100644
--- a/include/cobalt/kernel/lock.h
+++ b/include/cobalt/kernel/lock.h
@@ -41,7 +41,7 @@ typedef unsigned long spl_t;
 #define splnone()   ipipe_unstall_head()
 #define spltest()   ipipe_test_head()
 
-#if XENO_DEBUG(XNLOCK)
+#if XENO_DEBUG(LOCKING)
 
 struct xnlock {
        atomic_t owner;
@@ -92,7 +92,7 @@ int xnlock_dbg_release(struct xnlock *lock,
 
 DECLARE_PER_CPU(struct xnlockinfo, xnlock_stats);
 
-#else /* !XENO_DEBUG(XNLOCK) */
+#else /* !XENO_DEBUG(LOCKING) */
 
 struct xnlock {
        atomic_t owner;
@@ -130,9 +130,9 @@ static inline int xnlock_dbg_release(struct xnlock *lock)
        return 0;
 }
 
-#endif /* !XENO_DEBUG(XNLOCK) */
+#endif /* !XENO_DEBUG(LOCKING) */
 
-#if defined(CONFIG_SMP) || XENO_DEBUG(XNLOCK)
+#if defined(CONFIG_SMP) || XENO_DEBUG(LOCKING)
 
 #define xnlock_get(lock)               __xnlock_get(lock  XNLOCK_DBG_CONTEXT)
 #define xnlock_put(lock)               __xnlock_put(lock  XNLOCK_DBG_CONTEXT)
@@ -195,7 +195,7 @@ int ___xnlock_get(struct xnlock *lock /*, */ 
XNLOCK_DBG_CONTEXT_ARGS);
 void ___xnlock_put(struct xnlock *lock /*, */ XNLOCK_DBG_CONTEXT_ARGS);
 #endif /* out of line xnlock */
 
-#if XENO_DEBUG(XNLOCK)
+#if XENO_DEBUG(LOCKING)
 /* Disable UP-over-SMP kernel optimization in debug mode. */
 #define __locking_active__  1
 #else
@@ -249,7 +249,7 @@ static inline void __xnlock_put(struct xnlock *lock /*, */ 
XNLOCK_DBG_CONTEXT_AR
 
 #undef __locking_active__
 
-#else /* !(CONFIG_SMP || XENO_DEBUG(XNLOCK) */
+#else /* !(CONFIG_SMP || XENO_DEBUG(LOCKING) */
 
 #define xnlock_init(lock)              do { } while(0)
 #define xnlock_get(lock)               do { } while(0)
@@ -265,7 +265,7 @@ static inline void __xnlock_put(struct xnlock *lock /*, */ 
XNLOCK_DBG_CONTEXT_AR
 #define DEFINE_XNLOCK(lock)
 #define DEFINE_PRIVATE_XNLOCK(lock)
 
-#endif /* !(CONFIG_SMP || XENO_DEBUG(XNLOCK)) */
+#endif /* !(CONFIG_SMP || XENO_DEBUG(LOCKING)) */
 
 DECLARE_EXTERN_XNLOCK(nklock);
 
diff --git a/kernel/cobalt/Kconfig b/kernel/cobalt/Kconfig
index f27dfe4..8212c72 100644
--- a/kernel/cobalt/Kconfig
+++ b/kernel/cobalt/Kconfig
@@ -382,14 +382,14 @@ config XENO_OPT_DEBUG_CONTEXT
        Xenomai code, aimed at detecting when regular linux code is
        entered from a real-time context, and conversely.
 
-config XENO_OPT_DEBUG_XNLOCK
-       bool "Spinlock latency measurement"
+config XENO_OPT_DEBUG_LOCKING
+       bool "Spinlock debugging support"
        default y if SMP
        help
 
-       This option activates measurements of Xenomai spinlocks
-       spinning time and duration. It should have a low overhead, and
-       helps finding latency spots due to masking
+       This option activates runtime assertions, and measurements of
+       Xenomai spinlocks spinning time and duration. It should have a
+       low overhead, and helps finding latency spots due to masking
        sections. Statistics about the longest masking section may be
        found in /proc/xenomai/lock.
 
diff --git a/kernel/cobalt/debug.c b/kernel/cobalt/debug.c
index 10fbb53..c345250 100644
--- a/kernel/cobalt/debug.c
+++ b/kernel/cobalt/debug.c
@@ -520,7 +520,7 @@ static inline void init_thread_relax_trace(struct xnthread 
*thread)
 
 #endif /* !XENO_OPT_DEBUG_TRACE_RELAX */
 
-#if XENO_DEBUG(XNLOCK)
+#if XENO_DEBUG(LOCKING)
 
 #define XNLOCK_DBG_MAX_SPINS           10000000
 
@@ -612,7 +612,7 @@ int xnlock_dbg_release(struct xnlock *lock,
 }
 EXPORT_SYMBOL_GPL(xnlock_dbg_release);
 
-#endif /* !XENO_DEBUG(XNLOCK) */
+#endif /* !XENO_DEBUG(LOCKING) */
 
 void xndebug_shadow_init(struct xnthread *thread)
 {
diff --git a/kernel/cobalt/intr.c b/kernel/cobalt/intr.c
index 343bf8b..d885a99 100644
--- a/kernel/cobalt/intr.c
+++ b/kernel/cobalt/intr.c
@@ -386,13 +386,13 @@ static inline void xnintr_irq_detach(struct xnintr *intr)
 
 #else /* !CONFIG_XENO_OPT_SHIRQ */
 
-#if defined(CONFIG_SMP) || XENO_DEBUG(XNLOCK)
+#if defined(CONFIG_SMP) || XENO_DEBUG(LOCKING)
 struct xnintr_irq {
        DECLARE_XNLOCK(lock);
 } ____cacheline_aligned_in_smp;
 
 static struct xnintr_irq xnirqs[IPIPE_NR_IRQS];
-#endif /* CONFIG_SMP || XENO_DEBUG(XNLOCK) */
+#endif /* CONFIG_SMP || XENO_DEBUG(LOCKING) */
 
 static inline struct xnintr *xnintr_shirq_first(unsigned int irq)
 {
diff --git a/kernel/cobalt/lock.c b/kernel/cobalt/lock.c
index dd87c66..98f71dc 100644
--- a/kernel/cobalt/lock.c
+++ b/kernel/cobalt/lock.c
@@ -27,7 +27,7 @@
 #include <cobalt/kernel/lock.h>
 
 DEFINE_XNLOCK(nklock);
-#if defined(CONFIG_SMP) || XENO_DEBUG(XNLOCK)
+#if defined(CONFIG_SMP) || XENO_DEBUG(LOCKING)
 EXPORT_SYMBOL_GPL(nklock);
 
 void __xnlock_spin(int cpu, struct xnlock *lock /*, */ XNLOCK_DBG_CONTEXT_ARGS)
@@ -58,9 +58,9 @@ void ___xnlock_put(struct xnlock *lock /*, */ 
XNLOCK_DBG_CONTEXT_ARGS)
 }
 EXPORT_SYMBOL_GPL(___xnlock_put);
 #endif /* out of line xnlock */
-#endif /* CONFIG_SMP || XENO_DEBUG(XNLOCK) */
+#endif /* CONFIG_SMP || XENO_DEBUG(LOCKING) */
 
-#if XENO_DEBUG(XNLOCK)
+#if XENO_DEBUG(LOCKING)
 DEFINE_PER_CPU(struct xnlockinfo, xnlock_stats);
 EXPORT_PER_CPU_SYMBOL_GPL(xnlock_stats);
 #endif
diff --git a/kernel/cobalt/procfs.c b/kernel/cobalt/procfs.c
index 89ddf9b..83e43d7 100644
--- a/kernel/cobalt/procfs.c
+++ b/kernel/cobalt/procfs.c
@@ -27,7 +27,7 @@
 #include <xenomai/version.h>
 #include "debug.h"
 
-#if XENO_DEBUG(XNLOCK)
+#if XENO_DEBUG(LOCKING)
 
 static int lock_vfile_show(struct xnvfile_regular_iterator *it, void *data)
 {
@@ -90,7 +90,7 @@ static struct xnvfile_regular lock_vfile = {
        .ops = &lock_vfile_ops,
 };
 
-#endif /* XENO_DEBUG(XNLOCK) */
+#endif /* XENO_DEBUG(LOCKING) */
 
 static int latency_vfile_show(struct xnvfile_regular_iterator *it, void *data)
 {
@@ -216,7 +216,7 @@ static struct xnvfile_regular apc_vfile = {
 void xnprocfs_cleanup_tree(void)
 {
 #if XENO_DEBUG(NUCLEUS)
-#if XENO_DEBUG(XNLOCK)
+#if XENO_DEBUG(LOCKING)
        xnvfile_destroy_regular(&lock_vfile);
 #endif
        xnvfile_destroy_dir(&debug_vfroot);
@@ -255,7 +255,7 @@ int __init xnprocfs_init_tree(void)
        xnvfile_init_regular("apc", &apc_vfile, &nkvfroot);
 #ifdef CONFIG_XENO_OPT_DEBUG
        xnvfile_init_dir("debug", &debug_vfroot, &nkvfroot);
-#if XENO_DEBUG(XNLOCK)
+#if XENO_DEBUG(LOCKING)
        xnvfile_init_regular("lock", &lock_vfile, &debug_vfroot);
 #endif
 #endif /* XENO_DEBUG(NUCLEUS) */


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

Reply via email to