]> git.sesse.net Git - vlc/commitdiff
vlc_threads: Use OSMemoryBarrier() on Mac OS X cause __sync_synchronize() doesn't...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 5 Jul 2008 12:21:34 +0000 (14:21 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 5 Jul 2008 12:22:46 +0000 (14:22 +0200)
include/vlc_threads.h

index 5779ee8758a54feb30ee66c28ff175bdc666f8c8..a491daa90aa7fece111a5105c832e7421319e2f3 100644 (file)
@@ -564,7 +564,9 @@ static inline int vlc_spin_init (vlc_spinlock_t *spin)
  */
 static inline void barrier (void)
 {
-#if defined (__GNUC__) /* FIXME: || defined (ICC_whatever) */
+#if defined (__APPLE__)
+    OSMemoryBarrier();
+#elif defined (__GNUC__) /* FIXME: || defined (ICC_whatever) */
     __sync_synchronize ();
 #elif defined (LIBVLC_USE_PTHREAD)
     static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;