Module: xenomai-jki
Branch: queues/ftrace
Commit: 403c9c88ea61d81ae6ec6cfeae87dbdf46cc90a3
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=403c9c88ea61d81ae6ec6cfeae87dbdf46cc90a3

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Wed Jan  9 14:07:52 2013 +0100

nucleus: Use separate SIGDEBUG reason code for rescnt imbalance

If user space caused an imbalance of the resource counter that the
kernel tracks for XNOTHER threads, report this error via a separate
SIGDEBUG reason code to avoid confusions.

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

---

 include/asm-generic/syscall.h |    1 +
 ksrc/nucleus/synch.c          |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/asm-generic/syscall.h b/include/asm-generic/syscall.h
index a9cdc87..38658da 100644
--- a/include/asm-generic/syscall.h
+++ b/include/asm-generic/syscall.h
@@ -61,6 +61,7 @@ typedef struct xnsysinfo {
 #define SIGDEBUG_MIGRATE_PRIOINV       4
 #define SIGDEBUG_NOMLOCK               5
 #define SIGDEBUG_WATCHDOG              6
+#define SIGDEBUG_RESCNT_IMBALANCE      7
 
 #ifdef __KERNEL__
 
diff --git a/ksrc/nucleus/synch.c b/ksrc/nucleus/synch.c
index e10be47..0926045 100644
--- a/ksrc/nucleus/synch.c
+++ b/ksrc/nucleus/synch.c
@@ -689,7 +689,7 @@ xnsynch_release_thread(struct xnsynch *synch, struct 
xnthread *lastowner)
        if (xnthread_test_state(lastowner, XNOTHER)) {
                if (xnthread_get_rescnt(lastowner) == 0)
                        xnshadow_send_sig(lastowner, SIGDEBUG,
-                                         SIGDEBUG_MIGRATE_PRIOINV, 1);
+                                         SIGDEBUG_RESCNT_IMBALANCE, 1);
                else
                        xnthread_dec_rescnt(lastowner);
        }


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

Reply via email to