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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu May 29 10:22:04 2014 +0200

cobalt/posix: drop auto-cleanup messages for POSIX objects

Checking a registry base for lingering objects would be much more
helpful.

---

 kernel/cobalt/Kconfig        |    7 ++++---
 kernel/cobalt/posix/cond.c   |    3 ---
 kernel/cobalt/posix/mqueue.c |    7 -------
 kernel/cobalt/posix/mutex.c  |    4 ----
 kernel/cobalt/posix/sem.c    |    7 -------
 kernel/cobalt/posix/timer.c  |    3 ---
 6 files changed, 4 insertions(+), 27 deletions(-)

diff --git a/kernel/cobalt/Kconfig b/kernel/cobalt/Kconfig
index aad69bd..f27dfe4 100644
--- a/kernel/cobalt/Kconfig
+++ b/kernel/cobalt/Kconfig
@@ -453,12 +453,13 @@ config XENO_OPT_WATCHDOG_TIMEOUT
        Watchdog timeout value (in seconds).
 
 config XENO_OPT_DEBUG_COBALT
-       bool "Cobalt cleanup checks"
+       bool "Cobalt debugging support"
        default n
        help
 
-       When enabled, this option makes the Cobalt API warn about
-       auto-clean operations executed upon application termination.
+       This option activates various checks inside the Cobalt API,
+       mainly to help debugging applications. This option has no
+       significant overhead.
 
 config XENO_OPT_DEBUG_RTDM
        bool "RTDM debugging checks"
diff --git a/kernel/cobalt/posix/cond.c b/kernel/cobalt/posix/cond.c
index 5c3fd24..c573ea0 100644
--- a/kernel/cobalt/posix/cond.c
+++ b/kernel/cobalt/posix/cond.c
@@ -542,9 +542,6 @@ void cobalt_condq_cleanup(struct cobalt_kqueues *q)
        list_for_each_entry_safe(cond, tmp, &q->condq, link) {
                xnlock_put_irqrestore(&nklock, s);
                cond_destroy_internal(cond->handle, q);
-#if XENO_DEBUG(COBALT)
-               printk(XENO_INFO "deleting Cobalt condvar %p\n", cond);
-#endif /* XENO_DEBUG(COBALT) */
                xnlock_get_irqsave(&nklock, s);
        }
 out:
diff --git a/kernel/cobalt/posix/mqueue.c b/kernel/cobalt/posix/mqueue.c
index 7b8ac8d..6681901 100644
--- a/kernel/cobalt/posix/mqueue.c
+++ b/kernel/cobalt/posix/mqueue.c
@@ -172,10 +172,6 @@ static inline void mq_destroy(struct cobalt_mq *mq)
        int resched;
        spl_t s;
 
-#if XENO_DEBUG(COBALT)
-       printk(XENO_INFO "deleting Cobalt message queue \"/%s\"\n", mq->name);
-#endif
-
        xnlock_get_irqsave(&nklock, s);
        resched = (xnsynch_destroy(&mq->receivers) == XNSYNCH_RESCHED);
        resched = (xnsynch_destroy(&mq->senders) == XNSYNCH_RESCHED) || resched;
@@ -1270,9 +1266,6 @@ void cobalt_mq_pkg_cleanup(void)
        list_for_each_entry_safe(mq, tmp, &cobalt_mqq, link) {
                xnlock_put_irqrestore(&nklock, s);
                mq_destroy(mq);
-#if XENO_DEBUG(COBALT)
-               printk(XENO_INFO "unlinking Cobalt mq \"/%s\"\n", mq->name);
-#endif /* XENO_DEBUG(COBALT) */
                xnlock_get_irqsave(&nklock, s);
        }
 out:
diff --git a/kernel/cobalt/posix/mutex.c b/kernel/cobalt/posix/mutex.c
index 4015d23..caa89be 100644
--- a/kernel/cobalt/posix/mutex.c
+++ b/kernel/cobalt/posix/mutex.c
@@ -471,10 +471,6 @@ void cobalt_mutexq_cleanup(struct cobalt_kqueues *q)
        list_for_each_entry_safe(mutex, tmp, &q->mutexq, link) {
                xnlock_put_irqrestore(&nklock, s);
                cobalt_mutex_destroy_inner(mutex->handle, q);
-#if XENO_DEBUG(COBALT)
-               printk(XENO_INFO "deleting Cobalt mutex %p\n",
-                      mutex);
-#endif /* XENO_DEBUG(COBALT) */
                xnlock_get_irqsave(&nklock, s);
        }
 out:
diff --git a/kernel/cobalt/posix/sem.c b/kernel/cobalt/posix/sem.c
index 2d64785..0abbb0a 100644
--- a/kernel/cobalt/posix/sem.c
+++ b/kernel/cobalt/posix/sem.c
@@ -898,13 +898,6 @@ void cobalt_semq_cleanup(struct cobalt_kqueues *q)
 
        list_for_each_entry_safe(sem, tmp, &q->semq, link) {
                xnlock_put_irqrestore(&nklock, s);
-#if XENO_DEBUG(COBALT)
-               if (sem->flags & SEM_NAMED)
-                       printk(XENO_INFO "unlinking Cobalt semaphore \"%s\"\n",
-                               xnregistry_key(sem->handle));
-                else
-                       printk(XENO_INFO "deleting Cobalt semaphore %p\n", sem);
-#endif /* XENO_DEBUG(COBALT) */
                if (sem->flags & SEM_NAMED)
                        cobalt_nsem_unlink_inner(sem->handle);
                cobalt_sem_destroy_inner(sem->handle);
diff --git a/kernel/cobalt/posix/timer.c b/kernel/cobalt/posix/timer.c
index 4c9acbf..476ea77 100644
--- a/kernel/cobalt/posix/timer.c
+++ b/kernel/cobalt/posix/timer.c
@@ -701,9 +701,6 @@ void cobalt_timers_cleanup(struct cobalt_process *p)
                timer_cleanup(p, timer);
                xnlock_put_irqrestore(&nklock, s);
                xnfree(timer);
-#if XENO_DEBUG(COBALT)
-               printk(XENO_INFO "deleting Cobalt timer %u\n", id);
-#endif /* XENO_DEBUG(COBALT) */
                xnlock_get_irqsave(&nklock, s);
        }
 out:


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

Reply via email to