[vlc-commits] Factor common code

Rémi Denis-Courmont git at videolan.org
Tue Jul 12 17:14:40 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jul 12 17:54:15 2011 +0300| [78a752b6404a8fb1bda6c5526fb8359a461eb346] | committer: Rémi Denis-Courmont

Factor common code

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=78a752b6404a8fb1bda6c5526fb8359a461eb346
---

 src/posix/thread.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/src/posix/thread.c b/src/posix/thread.c
index 561f93a..024d83b 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -405,17 +405,14 @@ int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex,
     struct timespec ts = { d.quot, d.rem * (1000000000 / CLOCK_FREQ) };
 
     int val = pthread_cond_timedwait_relative_np(p_condvar, p_mutex, &ts);
-    if (val != ETIMEDOUT)
-        VLC_THREAD_ASSERT ("timed-waiting on condition");
-    return val;
 #else
     lldiv_t d = lldiv( deadline, CLOCK_FREQ );
     struct timespec ts = { d.quot, d.rem * (1000000000 / CLOCK_FREQ) };
     int val = pthread_cond_timedwait (p_condvar, p_mutex, &ts);
+#endif
     if (val != ETIMEDOUT)
         VLC_THREAD_ASSERT ("timed-waiting on condition");
     return val;
-#endif
 }
 
 /**



More information about the vlc-commits mailing list