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

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Sun Aug 16 17:56:18 2009 +0200

posix: Fix user-space migration after pthread_mutex_trylock succeeds

---

 src/skins/posix/mutex.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/skins/posix/mutex.c b/src/skins/posix/mutex.c
index ce7c8e1..4e7e35b 100644
--- a/src/skins/posix/mutex.c
+++ b/src/skins/posix/mutex.c
@@ -294,11 +294,11 @@ int __wrap_pthread_mutex_trylock(pthread_mutex_t *mutex)
 
        if (unlikely(xeno_get_current_mode() & XNRELAX)) {
                do {
-                       err = -XENOMAI_SYSCALL1(__xn_sys_migrate,
-                                               XENOMAI_XENO_DOMAIN);
-               } while (err == EINTR);
+                       err = XENOMAI_SYSCALL1(__xn_sys_migrate,
+                                              XENOMAI_XENO_DOMAIN);
+               } while (err == -EINTR);
 
-               if (err)
+               if (err < 0)
                        goto out;
        }
 


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

Reply via email to