summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio/out/ao_coreaudio_chmap.h2
-rw-r--r--audio/out/ao_coreaudio_exclusive.c2
-rw-r--r--audio/out/ao_coreaudio_utils.h2
-rw-r--r--audio/out/ao_jack.c2
-rw-r--r--audio/out/ao_wasapi.h2
-rw-r--r--audio/out/internal.h4
-rw-r--r--common/msg.c2
-rw-r--r--common/stats.c2
-rw-r--r--demux/demux.c2
-rw-r--r--filters/f_async_queue.c4
-rw-r--r--filters/filter.c2
-rw-r--r--misc/thread_tools.c2
-rw-r--r--options/m_config_core.c4
-rw-r--r--options/m_config_frontend.c2
-rw-r--r--options/m_config_frontend.h2
-rw-r--r--osdep/atomic.h31
-rw-r--r--osdep/windows_utils.c2
-rw-r--r--player/client.c2
-rw-r--r--player/core.h2
-rw-r--r--sub/osd_state.h4
-rw-r--r--video/out/cocoa_common.m2
-rw-r--r--video/out/dr_helper.c2
-rw-r--r--video/out/opengl/context_rpi.c2
-rw-r--r--video/out/vo.c2
-rw-r--r--video/out/vo_libmpv.c2
-rw-r--r--video/out/w32_common.c2
-rw-r--r--video/out/win32/droptarget.c2
-rw-r--r--video/out/x11_common.h2
28 files changed, 33 insertions, 60 deletions
diff --git a/audio/out/ao_coreaudio_chmap.h b/audio/out/ao_coreaudio_chmap.h
index d71dee02ce..b6d160c546 100644
--- a/audio/out/ao_coreaudio_chmap.h
+++ b/audio/out/ao_coreaudio_chmap.h
@@ -20,6 +20,8 @@
#include <AudioToolbox/AudioToolbox.h>
+#include "config.h"
+
struct mp_chmap;
int ca_label_to_mp_speaker_id(AudioChannelLabel label);
diff --git a/audio/out/ao_coreaudio_exclusive.c b/audio/out/ao_coreaudio_exclusive.c
index 821e9547f5..ccd8a7d3d0 100644
--- a/audio/out/ao_coreaudio_exclusive.c
+++ b/audio/out/ao_coreaudio_exclusive.c
@@ -43,7 +43,7 @@
#include "internal.h"
#include "audio/format.h"
#include "osdep/timer.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "options/m_option.h"
#include "common/msg.h"
#include "audio/out/ao_coreaudio_chmap.h"
diff --git a/audio/out/ao_coreaudio_utils.h b/audio/out/ao_coreaudio_utils.h
index d7532e3051..0e2b8b1f64 100644
--- a/audio/out/ao_coreaudio_utils.h
+++ b/audio/out/ao_coreaudio_utils.h
@@ -22,6 +22,8 @@
#include <AudioToolbox/AudioToolbox.h>
#include <inttypes.h>
#include <stdbool.h>
+
+#include "config.h"
#include "common/msg.h"
#include "audio/out/ao.h"
#include "internal.h"
diff --git a/audio/out/ao_jack.c b/audio/out/ao_jack.c
index 0c9ab8e0a5..5795e2b224 100644
--- a/audio/out/ao_jack.c
+++ b/audio/out/ao_jack.c
@@ -33,7 +33,7 @@
#include "ao.h"
#include "internal.h"
#include "audio/format.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "osdep/timer.h"
#include "options/m_config.h"
#include "options/m_option.h"
diff --git a/audio/out/ao_wasapi.h b/audio/out/ao_wasapi.h
index 3cf91f5418..58840f169d 100644
--- a/audio/out/ao_wasapi.h
+++ b/audio/out/ao_wasapi.h
@@ -29,7 +29,7 @@
#include <endpointvolume.h>
#include "common/msg.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "osdep/windows_utils.h"
#include "internal.h"
#include "ao.h"
diff --git a/audio/out/internal.h b/audio/out/internal.h
index 7736d3174b..646132634b 100644
--- a/audio/out/internal.h
+++ b/audio/out/internal.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
#include <pthread.h>
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "audio/out/ao.h"
/* global data used by ao.c and ao drivers */
@@ -63,7 +63,7 @@ struct ao {
atomic_uint events_;
// Float gain multiplicator
- mp_atomic_float gain;
+ _Atomic float gain;
int buffer;
double def_buffer;
diff --git a/common/msg.c b/common/msg.c
index 2dc4c1e7c2..0984cf0f5e 100644
--- a/common/msg.c
+++ b/common/msg.c
@@ -27,7 +27,7 @@
#include "mpv_talloc.h"
#include "misc/bstr.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "common/common.h"
#include "common/global.h"
#include "misc/bstr.h"
diff --git a/common/stats.c b/common/stats.c
index bd6c63e202..2336d80c75 100644
--- a/common/stats.c
+++ b/common/stats.c
@@ -8,7 +8,7 @@
#include "misc/node.h"
#include "msg.h"
#include "options/m_option.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "osdep/timer.h"
#include "stats.h"
diff --git a/demux/demux.c b/demux/demux.c
index f8a85f8387..2efbef270e 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -42,7 +42,7 @@
#include "common/stats.h"
#include "misc/charset_conv.h"
#include "misc/thread_tools.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "osdep/timer.h"
#include "osdep/threads.h"
diff --git a/filters/f_async_queue.c b/filters/f_async_queue.c
index 5ee32be5fa..ef8ae15946 100644
--- a/filters/f_async_queue.c
+++ b/filters/f_async_queue.c
@@ -4,7 +4,7 @@
#include "audio/aframe.h"
#include "common/common.h"
#include "common/msg.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "f_async_queue.h"
#include "filter_internal.h"
@@ -16,7 +16,7 @@ struct mp_async_queue {
};
struct async_queue {
- mp_atomic_uint64 refcount;
+ _Atomic uint64_t refcount;
pthread_mutex_t lock;
diff --git a/filters/filter.c b/filters/filter.c
index 0fd79b83e2..c3d8bc059c 100644
--- a/filters/filter.c
+++ b/filters/filter.c
@@ -6,7 +6,7 @@
#include "common/common.h"
#include "common/global.h"
#include "common/msg.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "osdep/timer.h"
#include "video/hwdec.h"
#include "video/img_format.h"
diff --git a/misc/thread_tools.c b/misc/thread_tools.c
index 55dd85c944..e97c51d07e 100644
--- a/misc/thread_tools.c
+++ b/misc/thread_tools.c
@@ -27,7 +27,7 @@
#include "common/common.h"
#include "misc/linked_list.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "osdep/io.h"
#include "osdep/timer.h"
diff --git a/options/m_config_core.c b/options/m_config_core.c
index 74a4aa00f7..3357d31ee6 100644
--- a/options/m_config_core.c
+++ b/options/m_config_core.c
@@ -31,13 +31,13 @@
#include "common/msg.h"
#include "common/msg_control.h"
#include "misc/dispatch.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
// For use with m_config_cache.
struct m_config_shadow {
pthread_mutex_t lock;
// Incremented on every option change.
- mp_atomic_uint64 ts;
+ _Atomic uint64_t ts;
// -- immutable after init
// List of m_sub_options instances.
// Index 0 is the top-level and is always present.
diff --git a/options/m_config_frontend.c b/options/m_config_frontend.c
index 8ad12e5d80..032f54803b 100644
--- a/options/m_config_frontend.c
+++ b/options/m_config_frontend.c
@@ -36,7 +36,7 @@
#include "common/msg_control.h"
#include "misc/dispatch.h"
#include "misc/node.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
extern const char mp_help_text[];
diff --git a/options/m_config_frontend.h b/options/m_config_frontend.h
index 72a5b81d94..3f0b25a5b2 100644
--- a/options/m_config_frontend.h
+++ b/options/m_config_frontend.h
@@ -29,7 +29,7 @@
#include "misc/bstr.h"
#include "misc/dispatch.h"
#include "options/m_option.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
// m_config provides an API to manipulate the config variables in MPlayer.
// It makes use of the Options API to provide a context stack that
diff --git a/osdep/atomic.h b/osdep/atomic.h
deleted file mode 100644
index ea00cea9b7..0000000000
--- a/osdep/atomic.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of mpv.
- * Copyright (c) 2013 Stefano Pigozzi <stefano.pigozzi@gmail.com>
- *
- * mpv is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * mpv is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef MP_ATOMIC_H
-#define MP_ATOMIC_H
-
-#include <inttypes.h>
-#include "config.h"
-
-#include <stdatomic.h>
-typedef _Atomic float mp_atomic_float;
-typedef _Atomic double mp_atomic_double;
-typedef _Atomic int64_t mp_atomic_int64;
-typedef _Atomic uint64_t mp_atomic_uint64;
-
-#endif
diff --git a/osdep/windows_utils.c b/osdep/windows_utils.c
index a647e9f00d..6a5abff291 100644
--- a/osdep/windows_utils.c
+++ b/osdep/windows_utils.c
@@ -25,7 +25,7 @@
#include <dxgi1_2.h>
#include "common/common.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "windows_utils.h"
char *mp_GUID_to_str_buf(char *buf, size_t buf_size, const GUID *guid)
diff --git a/player/client.c b/player/client.c
index cd0264e646..5c98938ce3 100644
--- a/player/client.c
+++ b/player/client.c
@@ -39,7 +39,7 @@
#include "options/m_property.h"
#include "options/path.h"
#include "options/parse_configfile.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "osdep/threads.h"
#include "osdep/timer.h"
#include "osdep/io.h"
diff --git a/player/core.h b/player/core.h
index 324dd01c87..12105c3da5 100644
--- a/player/core.h
+++ b/player/core.h
@@ -21,7 +21,7 @@
#include <pthread.h>
#include <stdbool.h>
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "libmpv/client.h"
diff --git a/sub/osd_state.h b/sub/osd_state.h
index fc6e515610..1f4e58b8f6 100644
--- a/sub/osd_state.h
+++ b/sub/osd_state.h
@@ -3,7 +3,7 @@
#include <pthread.h>
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "osd.h"
enum mp_osdtype {
@@ -71,7 +71,7 @@ struct osd_state {
struct osd_object *objs[MAX_OSD_PARTS];
bool render_subs_in_filter;
- mp_atomic_double force_video_pts;
+ _Atomic double force_video_pts;
bool want_redraw;
bool want_redraw_notification;
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m
index 63427ba652..6b6fe4ccb6 100644
--- a/video/out/cocoa_common.m
+++ b/video/out/cocoa_common.m
@@ -30,7 +30,7 @@
#import "video/out/cocoa/mpvadapter.h"
#include "osdep/threads.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "osdep/macosx_compat.h"
#include "osdep/macosx_events_objc.h"
diff --git a/video/out/dr_helper.c b/video/out/dr_helper.c
index 33b55e17c8..e681b1aa35 100644
--- a/video/out/dr_helper.c
+++ b/video/out/dr_helper.c
@@ -6,7 +6,7 @@
#include "mpv_talloc.h"
#include "misc/dispatch.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "video/mp_image.h"
#include "dr_helper.h"
diff --git a/video/out/opengl/context_rpi.c b/video/out/opengl/context_rpi.c
index d91723b392..815c3aa11f 100644
--- a/video/out/opengl/context_rpi.c
+++ b/video/out/opengl/context_rpi.c
@@ -24,7 +24,7 @@
#include <EGL/eglext.h>
#include "common/common.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "video/out/win_state.h"
#include "context.h"
#include "egl_helpers.h"
diff --git a/video/out/vo.c b/video/out/vo.c
index 4fab586dfd..fd2ccf9e17 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -26,7 +26,7 @@
#include "mpv_talloc.h"
#include "config.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "osdep/timer.h"
#include "osdep/threads.h"
#include "misc/dispatch.h"
diff --git a/video/out/vo_libmpv.c b/video/out/vo_libmpv.c
index 88c6804dfe..1af1fc72f0 100644
--- a/video/out/vo_libmpv.c
+++ b/video/out/vo_libmpv.c
@@ -19,7 +19,7 @@
#include "vo.h"
#include "video/mp_image.h"
#include "sub/osd.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "osdep/timer.h"
#include "common/global.h"
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 9764bdebfb..be9c5d250d 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -42,7 +42,7 @@
#include "osdep/io.h"
#include "osdep/threads.h"
#include "osdep/w32_keyboard.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "misc/dispatch.h"
#include "misc/rendezvous.h"
#include "mpv_talloc.h"
diff --git a/video/out/win32/droptarget.c b/video/out/win32/droptarget.c
index 3443f2eaba..67864cdc61 100644
--- a/video/out/win32/droptarget.c
+++ b/video/out/win32/droptarget.c
@@ -23,7 +23,7 @@
#include "common/common.h"
#include "input/input.h"
#include "input/event.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "osdep/io.h"
#include "osdep/windows_utils.h"
#include "mpv_talloc.h"
diff --git a/video/out/x11_common.h b/video/out/x11_common.h
index d4409f14e8..cf92de58f8 100644
--- a/video/out/x11_common.h
+++ b/video/out/x11_common.h
@@ -24,7 +24,7 @@
#include <X11/Xutil.h>
#include "common/common.h"
-#include "osdep/atomic.h"
+#include <stdatomic.h>
#include "config.h"
#if !HAVE_GPL