[vlc-devel] commit: vlc_threads: Use OSMemoryBarrier() on Mac OS X cause __sync_synchronize() doesn't seems present. (Pierre d' Herbemont )
git version control
git at videolan.org
Sat Jul 5 14:22:24 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sat Jul 5 14:21:34 2008 +0200| [08f5c9dea42526a356e78bb3000400cde983de6f]
vlc_threads: Use OSMemoryBarrier() on Mac OS X cause __sync_synchronize() doesn't seems present.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=08f5c9dea42526a356e78bb3000400cde983de6f
---
include/vlc_threads.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index 5779ee8..a491daa 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;
More information about the vlc-devel
mailing list