Module: xenomai-rpm
Branch: for-upstream
Commit: 9c7544768b2ccd834aefe988031f72b9fcc33ada
URL:    
http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=9c7544768b2ccd834aefe988031f72b9fcc33ada

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Dec  4 18:14:25 2011 +0100

nucleus/pod: dequeue kicked threads from any synch wait list

Threads pending a linux signal on entry to xnsynch_acquire/sleep_on()
will be prevented from waiting in xnpod_suspend_thread() as XNKICK is
raised for them, and will return immediately to the caller.

In such a case, we have to call xnsynch_forget_sleeper() for them, to
update the synch wait list, preventing stale linkage.

---

 ksrc/nucleus/pod.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/ksrc/nucleus/pod.c b/ksrc/nucleus/pod.c
index b5ddbaa..4abcf83 100644
--- a/ksrc/nucleus/pod.c
+++ b/ksrc/nucleus/pod.c
@@ -1409,6 +1409,10 @@ void xnpod_suspend_thread(xnthread_t *thread, xnflags_t 
mask,
                if ((mask & XNRELAX) == 0
                    && (xnthread_sigpending(thread)
                        || xnthread_test_info(thread, XNKICKED))) {
+                       if (wchan) {
+                               thread->wchan = wchan;
+                               xnsynch_forget_sleeper(thread);
+                       }
                        xnthread_clear_info(thread, XNRMID | XNTIMEO);
                        xnthread_set_info(thread, XNBREAK);
                        goto unlock_and_exit;


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

Reply via email to