Skip to content
Snippets Groups Projects
Commit c6bf660b authored by Matt Oliver's avatar Matt Oliver Committed by Michael Niedermayer
Browse files

opencl: Make init_mtx static with volatile lock

parent fa23190a
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#endif #endif
#include "atomic.h" #include "atomic.h"
static pthread_mutex_t *atomic_opencl_lock = NULL; static volatile pthread_mutex_t *atomic_opencl_lock = NULL;
#define LOCK_OPENCL pthread_mutex_lock(atomic_opencl_lock) #define LOCK_OPENCL pthread_mutex_lock(atomic_opencl_lock)
#define UNLOCK_OPENCL pthread_mutex_unlock(atomic_opencl_lock) #define UNLOCK_OPENCL pthread_mutex_unlock(atomic_opencl_lock)
#else #else
...@@ -326,7 +326,7 @@ void av_opencl_free_device_list(AVOpenCLDeviceList **device_list) ...@@ -326,7 +326,7 @@ void av_opencl_free_device_list(AVOpenCLDeviceList **device_list)
av_freep(device_list); av_freep(device_list);
} }
inline int init_opencl_mtx(void) static inline int init_opencl_mtx(void)
{ {
#if HAVE_THREADS #if HAVE_THREADS
if (!atomic_opencl_lock) { if (!atomic_opencl_lock) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment