Module: xenomai-forge
Branch: next
Commit: 77d08ed9fea6486c28eb04d5026f493376f8dbd2
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=77d08ed9fea6486c28eb04d5026f493376f8dbd2

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Jul 10 11:39:53 2014 +0200

cobalt/kernel/monitor: fix EINTR handling in wait operation

See http://www.xenomai.org/pipermail/xenomai/2014-July/031236.html.

---

 kernel/cobalt/posix/monitor.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/cobalt/posix/monitor.c b/kernel/cobalt/posix/monitor.c
index 0ecaa6a..a61d028 100644
--- a/kernel/cobalt/posix/monitor.c
+++ b/kernel/cobalt/posix/monitor.c
@@ -283,9 +283,11 @@ int cobalt_monitor_wait(struct cobalt_monitor_shadow 
__user *u_mon,
                if (list_empty(&mon->waiters) && !xnsynch_pended_p(&mon->drain))
                        datp->flags &= ~COBALT_MONITOR_PENDED;
 
-               if (info & XNBREAK)
+               if (info & XNBREAK) {
                        opret = -EINTR;
-               else if (info & XNTIMEO)
+                       goto out;
+               }
+               if (info & XNTIMEO)
                        opret = -ETIMEDOUT;
        }
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to