]> git.sesse.net Git - vlc/commitdiff
vlc_cond_init() only needs clock setup if CS is available
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 4 Jan 2012 19:09:59 +0000 (21:09 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 4 Jan 2012 19:09:59 +0000 (21:09 +0200)
src/posix/thread.c

index 122e2012cc5944b412ddc6e182c9596ae3e1eab6..817a2b13b8ad1a88c5855b3cb61eb5c2a1ffcc5f 100644 (file)
@@ -349,10 +349,10 @@ void vlc_cond_init (vlc_cond_t *p_condvar)
 {
     pthread_condattr_t attr;
 
-    vlc_clock_setup ();
     if (unlikely(pthread_condattr_init (&attr)))
         abort ();
 #if (_POSIX_CLOCK_SELECTION > 0)
+    vlc_clock_setup ();
     pthread_condattr_setclock (&attr, vlc_clock_id);
 #endif
     if (unlikely(pthread_cond_init (p_condvar, &attr)))