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

Author: Philippe Gerum <[email protected]>
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
[email protected]
https://mail.gna.org/listinfo/xenomai-git

Reply via email to