Commit 27296ffe authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

barrier: avoid staticity and pthread-specificity

parent 53aef42d
......@@ -565,12 +565,12 @@ static inline void barrier (void)
asm volatile ("sync":::"memory");
#elif defined(__i386__)
asm volatile ("mfence":::"memory");
#elif defined (LIBVLC_USE_PTHREAD)
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_lock (&lock);
pthread_mutex_unlock (&lock);
#else
# error barrier not implemented!
vlc_spin_t spin;
vlc_spin_init (&spin);
vlc_spin_lock (&spin);
vlc_spin_unlock (&spin);
vlc_spin_destroy (&spin);
#endif
}
......
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