From: Pierre d'Herbemont Date: Sat, 5 Jul 2008 12:21:34 +0000 (+0200) Subject: vlc_threads: Use OSMemoryBarrier() on Mac OS X cause __sync_synchronize() doesn't... X-Git-Tag: 0.9.0-test2~253 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=08f5c9dea42526a356e78bb3000400cde983de6f;p=vlc vlc_threads: Use OSMemoryBarrier() on Mac OS X cause __sync_synchronize() doesn't seems present. --- diff --git a/include/vlc_threads.h b/include/vlc_threads.h index 5779ee8758..a491daa90a 100644 --- a/include/vlc_threads.h +++ b/include/vlc_threads.h @@ -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;