Module: xenomai-gch
Branch: for-head
Commit: 554e2b716f98d69b5d61de006fc9f3c1e38f2bc7
URL:    
http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=554e2b716f98d69b5d61de006fc9f3c1e38f2bc7

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Thu Dec  3 21:13:54 2009 +0100

posix: cosmetic cleanup of pthread_cond_*wait

---

 src/skins/posix/cond.c |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/src/skins/posix/cond.c b/src/skins/posix/cond.c
index 0582367..7b99c92 100644
--- a/src/skins/posix/cond.c
+++ b/src/skins/posix/cond.c
@@ -124,12 +124,8 @@ int __wrap_pthread_cond_wait(pthread_cond_t *cond, 
pthread_mutex_t *mutex)
 
        pthread_cleanup_pop(0);
 
-       while (err == EINTR)
-               err = -XENOMAI_SKINCALL3(__pse51_muxid,
-                                        __pse51_cond_wait_epilogue,
-                                        &c.cond->shadow_cond,
-                                        &c.mutex->shadow_mutex,
-                                        c.count);
+       if (err == EINTR)
+               __pthread_cond_cleanup(&c);
 
        cb_read_unlock(&c.mutex->shadow_mutex.lock, s);
 
@@ -163,12 +159,8 @@ int __wrap_pthread_cond_timedwait(pthread_cond_t * cond,
 
        pthread_cleanup_pop(0);
 
-       while (err == EINTR)
-               err = -XENOMAI_SKINCALL3(__pse51_muxid,
-                                        __pse51_cond_wait_epilogue,
-                                        &c.cond->shadow_cond,
-                                        &c.mutex->shadow_mutex,
-                                        c.count);
+       if (err == EINTR)
+               __pthread_cond_cleanup(&c);
 
        cb_read_unlock(&c.mutex->shadow_mutex.lock, s);
 


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

Reply via email to