Module: xenomai-forge
Branch: master
Commit: 7846ffd0d11cd7e6e39624d046049c60da532b6d
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=7846ffd0d11cd7e6e39624d046049c60da532b6d

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Dec  4 18:23:08 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.

---

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

diff --git a/kernel/cobalt/nucleus/pod.c b/kernel/cobalt/nucleus/pod.c
index efcb7e5..642ae1b 100644
--- a/kernel/cobalt/nucleus/pod.c
+++ b/kernel/cobalt/nucleus/pod.c
@@ -1304,6 +1304,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