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

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Fri Mar  5 19:56:10 2010 +0100

POSIX: Fix signedness in mutex re-acquisition on cond wait

pse51_cond_timedwait_epilogue returns negative error codes.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

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

diff --git a/ksrc/skins/posix/cond.c b/ksrc/skins/posix/cond.c
index 1b74b80..f86e85e 100644
--- a/ksrc/skins/posix/cond.c
+++ b/ksrc/skins/posix/cond.c
@@ -423,8 +423,8 @@ int pthread_cond_wait(pthread_cond_t * cnd, pthread_mutex_t 
* mx)
                                            &count, 0, XN_INFINITE);
 
        if (!err || err == EINTR)
-               while (EINTR == pse51_cond_timedwait_epilogue(cur, cond,
-                                                             mutex, count))
+               while (-EINTR == pse51_cond_timedwait_epilogue(cur, cond,
+                                                              mutex, count))
                        ;
 
 #ifdef CONFIG_XENO_FASTSYNCH
@@ -491,8 +491,8 @@ int pthread_cond_timedwait(pthread_cond_t * cnd,
                                            ts2ticks_ceil(abstime) + 1);
 
        if (!err || err == EINTR || err == ETIMEDOUT)
-               while (EINTR == pse51_cond_timedwait_epilogue(cur, cond,
-                                                             mutex, count))
+               while (-EINTR == pse51_cond_timedwait_epilogue(cur, cond,
+                                                              mutex, count))
                        ;
 
 #ifdef CONFIG_XENO_FASTSYNCH


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

Reply via email to