Commit 3afcc0bb authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove unused barrier()

parent a09b86ce
...@@ -148,7 +148,6 @@ typedef struct vlc_timer *vlc_timer_t; ...@@ -148,7 +148,6 @@ typedef struct vlc_timer *vlc_timer_t;
/* Unnamed POSIX semaphores not supported on Mac OS X */ /* Unnamed POSIX semaphores not supported on Mac OS X */
# include <mach/semaphore.h> # include <mach/semaphore.h>
# include <mach/task.h> # include <mach/task.h>
# include <libkern/OSAtomic.h> /* OSMemoryBarrier() */
# define LIBVLC_USE_PTHREAD 1 # define LIBVLC_USE_PTHREAD 1
# define LIBVLC_USE_PTHREAD_CLEANUP 1 # define LIBVLC_USE_PTHREAD_CLEANUP 1
# define LIBVLC_USE_PTHREAD_CANCEL 1 # define LIBVLC_USE_PTHREAD_CANCEL 1
...@@ -486,29 +485,6 @@ static inline void vlc_spin_init (vlc_spinlock_t *spin) ...@@ -486,29 +485,6 @@ static inline void vlc_spin_init (vlc_spinlock_t *spin)
# define vlc_spin_destroy vlc_mutex_destroy # define vlc_spin_destroy vlc_mutex_destroy
#endif #endif
/**
* Issues a full memory barrier.
*/
static inline void barrier (void)
{
#if defined (__GNUC__) && !defined (__APPLE__) && \
((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
__sync_synchronize ();
#elif defined(__APPLE__)
OSMemoryBarrier ();
#elif defined(__powerpc__)
asm volatile ("sync":::"memory");
#elif 0 // defined(__i386__) /* Requires SSE2 support */
asm volatile ("mfence":::"memory");
#else
vlc_spinlock_t spin;
vlc_spin_init (&spin);
vlc_spin_lock (&spin);
vlc_spin_unlock (&spin);
vlc_spin_destroy (&spin);
#endif
}
#ifdef __cplusplus #ifdef __cplusplus
/** /**
* Helper C++ class to lock a mutex. * Helper C++ class to lock a mutex.
......
...@@ -75,7 +75,6 @@ static void block_Invalidate (block_t *block) ...@@ -75,7 +75,6 @@ static void block_Invalidate (block_t *block)
block->p_next = NULL; block->p_next = NULL;
block_Check (block); block_Check (block);
block->pf_release = BlockNoRelease; block->pf_release = BlockNoRelease;
barrier (); /* prevent compiler from optimizing this assignment out */
} }
#else #else
# define block_Check(b) ((void)(b)) # define block_Check(b) ((void)(b))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment