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

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Thu Feb  4 17:55:36 2010 +0100

RTDM: Split up application and driver debugging

There are use cases where you prefer to leave driver-level debugging
checks on while preventing that user space can flood the log via unclean
terminations. Split up the RTDM debug switch to reflect this.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 ksrc/skins/rtdm/Kconfig    |    9 +++++++++
 ksrc/skins/rtdm/core.c     |    2 +-
 ksrc/skins/rtdm/internal.h |    4 ++++
 3 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/ksrc/skins/rtdm/Kconfig b/ksrc/skins/rtdm/Kconfig
index 5eeb2f3..f0741d6 100644
--- a/ksrc/skins/rtdm/Kconfig
+++ b/ksrc/skins/rtdm/Kconfig
@@ -55,4 +55,13 @@ config XENO_OPT_DEBUG_RTDM
        It is a recommended option for analysing potential issues in RTDM
        drivers. A minor runtime overhead is added.
 
+config XENO_OPT_DEBUG_RTDM_APPL
+       bool "RTDM application debugging support"
+       depends on XENO_OPT_DEBUG
+       default y
+       help
+
+       When enabled, this option makes the RTDM skin warn about
+       auto-clean operations executed upon application termination.
+
 endif
diff --git a/ksrc/skins/rtdm/core.c b/ksrc/skins/rtdm/core.c
index bc3dccc..3bc13f1 100644
--- a/ksrc/skins/rtdm/core.c
+++ b/ksrc/skins/rtdm/core.c
@@ -396,7 +396,7 @@ void cleanup_owned_contexts(void *owner)
                xnlock_put_irqrestore(&rt_fildes_lock, s);
 
                if (context) {
-                       if (XENO_DEBUG(RTDM))
+                       if (XENO_DEBUG(RTDM_APPL))
                                xnprintf("RTDM: closing file descriptor %d.\n",
                                         fd);
 
diff --git a/ksrc/skins/rtdm/internal.h b/ksrc/skins/rtdm/internal.h
index 64e5b47..69299f8 100644
--- a/ksrc/skins/rtdm/internal.h
+++ b/ksrc/skins/rtdm/internal.h
@@ -28,6 +28,10 @@
 #include <nucleus/ppd.h>
 #include <rtdm/rtdm_driver.h>
 
+#ifndef CONFIG_XENO_OPT_DEBUG_RTDM_APPL
+#define CONFIG_XENO_OPT_DEBUG_RTDM_APPL        0
+#endif
+
 #define RTDM_FD_MAX                    CONFIG_XENO_OPT_RTDM_FILDES
 
 #define DEF_DEVNAME_HASHTAB_SIZE       256     /* entries in name hash table */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to