Module: xenomai-head
Branch: master
Commit: 002b03f395cd2cd4fdbd693718769d197a951e46
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=002b03f395cd2cd4fdbd693718769d197a951e46

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Nov 18 11:01:35 2010 +0100

posix: reschedule upon SIGRESM/SIGRELS

---

 ksrc/skins/posix/signal.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/ksrc/skins/posix/signal.c b/ksrc/skins/posix/signal.c
index 59acf1e..31eaf55 100644
--- a/ksrc/skins/posix/signal.c
+++ b/ksrc/skins/posix/signal.c
@@ -561,12 +561,12 @@ int pthread_kill(pthread_t thread, int sig)
 
        if (sig == SIGRESM) {
                xnpod_resume_thread(&thread->threadbase, XNSUSP);
-               goto unlock_and_exit;
+               goto resched;
        }
 
        if (sig == SIGRELS) {
                xnpod_unblock_thread(&thread->threadbase);
-               goto unlock_and_exit;
+               goto resched;
        }
 
        if ((unsigned)sig > SIGRTMAX) {
@@ -580,10 +580,13 @@ int pthread_kill(pthread_t thread, int sig)
                goto unlock_and_exit;
        }
 
-       if (pse51_sigqueue_inner(thread, si))
-               xnpod_schedule();
+       if (!pse51_sigqueue_inner(thread, si))
+               goto unlock_and_exit;
+
+resched:
+       xnpod_schedule();
 
- unlock_and_exit:
+unlock_and_exit:
 
        xnlock_put_irqrestore(&nklock, s);
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to