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

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

posix: always reschedule after unlocking the scheduler

---

 ksrc/skins/posix/thread.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/ksrc/skins/posix/thread.c b/ksrc/skins/posix/thread.c
index 853ea53..cf26706 100644
--- a/ksrc/skins/posix/thread.c
+++ b/ksrc/skins/posix/thread.c
@@ -682,6 +682,10 @@ int pthread_set_mode_np(int clrmask, int setmask)
                              clrmask & ~XNTHREAD_STATE_SPARE1,
                              setmask & ~XNTHREAD_STATE_SPARE1);
 
+       if ((clrmask & ~setmask) & XNLOCK)
+               /* Reschedule if the scheduler has been unlocked. */
+               xnpod_schedule();
+
 #ifdef CONFIG_XENO_OPT_PERVASIVE
        if (xnthread_test_state(cur, XNSHADOW) && (clrmask & 
XNTHREAD_STATE_SPARE1) != 0)
                xnshadow_relax(0, 0);


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

Reply via email to