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

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 d19999f..8ad6f04 100644
--- a/ksrc/nucleus/pod.c
+++ b/ksrc/nucleus/pod.c
@@ -1399,6 +1399,10 @@ void xnpod_suspend_thread(xnthread_t *thread, xnflags_t 
mask,
                 */
                if ((mask & XNRELAX) == 0 &&
                    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@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to