aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/opencl.c
diff options
context:
space:
mode:
authorMatt Oliver <protogonoi@gmail.com>2014-05-10 21:00:32 +1000
committerMichael Niedermayer <michaelni@gmx.at>2014-05-10 15:07:33 +0200
commitc6bf660bef8f3a9430d46a0b5b45ccc2846b6194 (patch)
tree0b3b60da6990840dc5d924c3602ad90d42982c12 /libavutil/opencl.c
parentfa23190a7ac96d17f03a352239a7ddaaadf8d559 (diff)
downloadffmpeg-c6bf660bef8f3a9430d46a0b5b45ccc2846b6194.tar.gz
opencl: Make init_mtx static with volatile lock
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/opencl.c')
-rw-r--r--libavutil/opencl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/opencl.c b/libavutil/opencl.c
index 3eb0ed015e..a92bce76b4 100644
--- a/libavutil/opencl.c
+++ b/libavutil/opencl.c
@@ -37,7 +37,7 @@
#endif
#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 UNLOCK_OPENCL pthread_mutex_unlock(atomic_opencl_lock)
#else
@@ -326,7 +326,7 @@ void av_opencl_free_device_list(AVOpenCLDeviceList **device_list)
av_freep(device_list);
}
-inline int init_opencl_mtx(void)
+static inline int init_opencl_mtx(void)
{
#if HAVE_THREADS
if (!atomic_opencl_lock) {