[vlc-commits] Include <stdatomic.h> or <atomic> directly where applicable
Rémi Denis-Courmont
git at videolan.org
Tue Dec 19 18:38:06 CET 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Dec 19 19:32:16 2017 +0200| [72bfe44f986a0dab383d2754aa8ac5d47be82843] | committer: Rémi Denis-Courmont
Include <stdatomic.h> or <atomic> directly where applicable
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=72bfe44f986a0dab383d2754aa8ac5d47be82843
---
modules/access/bluray.c | 2 +-
modules/access/decklink.cpp | 3 ++-
modules/access/dsm/sd.c | 3 ++-
modules/audio_filter/scaletempo.c | 2 +-
modules/audio_output/coreaudio_common.h | 2 +-
modules/audio_output/tizen_audio.c | 2 +-
modules/codec/avcodec/video.c | 3 ++-
modules/codec/vt_utils.c | 2 +-
modules/demux/adaptive/http/Downloader.cpp | 3 ++-
modules/demux/adaptive/plumbing/CommandsQueue.hpp | 2 +-
modules/gui/macosx/VLCMain.h | 2 +-
modules/gui/macosx/VLCMain.m | 3 ++-
modules/hw/d3d11/d3d11_filters.c | 2 +-
modules/hw/d3d9/d3d9_filters.c | 2 +-
modules/hw/mmal/codec.c | 3 ++-
modules/hw/mmal/deinterlace.c | 5 +++--
modules/hw/mmal/vout.c | 2 +-
modules/hw/vaapi/vlc_vaapi.c | 2 +-
modules/hw/vdpau/avcodec.c | 2 +-
modules/hw/vdpau/sharpen.c | 2 +-
modules/hw/vdpau/vlc_vdpau.h | 2 +-
modules/services_discovery/microdns.c | 2 +-
modules/video_filter/adjust.c | 1 +
modules/video_filter/antiflicker.c | 3 ++-
modules/video_filter/colorthres.c | 2 +-
modules/video_filter/mirror.c | 2 +-
modules/video_filter/motionblur.c | 3 ++-
modules/video_filter/posterize.c | 2 +-
modules/video_filter/rotate.c | 2 +-
modules/video_filter/sepia.c | 2 +-
modules/video_filter/sharpen.c | 2 +-
modules/video_output/win32/events.c | 2 +-
src/android/thread.c | 2 +-
src/audio_output/aout_internal.h | 3 ++-
src/audio_output/volume.c | 1 +
src/input/decoder.c | 3 +--
src/input/item.h | 2 +-
src/input/resource.c | 2 +-
src/misc/addons.c | 3 ++-
src/misc/interrupt.h | 3 ++-
src/misc/picture.h | 3 ++-
src/misc/picture_pool.c | 2 +-
src/misc/renderer_discovery.c | 2 +-
src/misc/threads.c | 4 ++--
src/misc/update.h | 3 ++-
src/misc/variables.h | 2 +-
src/modules/modules.h | 2 +-
src/playlist/fetcher.c | 3 ++-
src/posix/thread.c | 2 +-
src/posix/timer.c | 2 +-
src/video_output/opengl.c | 2 +-
src/video_output/statistic.h | 2 +-
src/win32/thread.c | 2 +-
53 files changed, 70 insertions(+), 54 deletions(-)
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 3b982fb1ee..990caba88e 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -26,6 +26,7 @@
#endif
#include <assert.h>
+#include <stdatomic.h>
#if defined (HAVE_MNTENT_H) && defined(HAVE_SYS_STAT_H)
# include <mntent.h>
@@ -44,7 +45,6 @@
#include <vlc_plugin.h>
#include <vlc_demux.h> /* demux_t */
#include <vlc_input.h> /* Seekpoints, chapters */
-#include <vlc_atomic.h>
#include <vlc_dialog.h> /* BD+/AACS warnings */
#include <vlc_vout.h> /* vout_PutSubpicture / subpicture_t */
#include <vlc_url.h> /* vlc_path2uri */
diff --git a/modules/access/decklink.cpp b/modules/access/decklink.cpp
index 96b55a1145..fa67d2325a 100644
--- a/modules/access/decklink.cpp
+++ b/modules/access/decklink.cpp
@@ -26,10 +26,11 @@
# include "config.h"
#endif
+#include <stdatomic.h>
+
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_demux.h>
-#include <vlc_atomic.h>
#include <arpa/inet.h>
diff --git a/modules/access/dsm/sd.c b/modules/access/dsm/sd.c
index ce157d2e56..276e01fe9a 100644
--- a/modules/access/dsm/sd.c
+++ b/modules/access/dsm/sd.c
@@ -30,8 +30,9 @@
# include "config.h"
#endif
+#include <stdatomic.h>
+
#include <vlc_common.h>
-#include <vlc_atomic.h>
#include <vlc_services_discovery.h>
#include <bdsm/bdsm.h>
diff --git a/modules/audio_filter/scaletempo.c b/modules/audio_filter/scaletempo.c
index 5b2c408b97..97e9b0d7cc 100644
--- a/modules/audio_filter/scaletempo.c
+++ b/modules/audio_filter/scaletempo.c
@@ -31,9 +31,9 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_aout.h>
+#include <vlc_atomic.h>
#include <vlc_filter.h>
#include <vlc_modules.h>
-#include <vlc_atomic.h>
#include <string.h> /* for memset */
#include <limits.h> /* form INT_MIN */
diff --git a/modules/audio_output/coreaudio_common.h b/modules/audio_output/coreaudio_common.h
index 75b50a53d0..1f81c1c608 100644
--- a/modules/audio_output/coreaudio_common.h
+++ b/modules/audio_output/coreaudio_common.h
@@ -27,7 +27,7 @@
#endif
#import <vlc_common.h>
-#import <vlc_atomic.h>
+#import <stdatomic.h>
#import <vlc_aout.h>
#import <vlc_threads.h>
diff --git a/modules/audio_output/tizen_audio.c b/modules/audio_output/tizen_audio.c
index a9ace0f6cf..4139df1ddc 100644
--- a/modules/audio_output/tizen_audio.c
+++ b/modules/audio_output/tizen_audio.c
@@ -27,11 +27,11 @@
#include <assert.h>
#include <dlfcn.h>
#include <stdbool.h>
+#include <stdatomic.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_aout.h>
-#include <vlc_atomic.h>
#include "audio_io.h"
#include "sound_manager.h"
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index b056c1b86f..6d2cf4458a 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -29,11 +29,12 @@
# include "config.h"
#endif
+#include <stdatomic.h>
+
#include <vlc_common.h>
#include <vlc_codec.h>
#include <vlc_avcodec.h>
#include <vlc_cpu.h>
-#include <vlc_atomic.h>
#include <assert.h>
#include <libavcodec/avcodec.h>
diff --git a/modules/codec/vt_utils.c b/modules/codec/vt_utils.c
index 0b428fabda..ca6769b5f4 100644
--- a/modules/codec/vt_utils.c
+++ b/modules/codec/vt_utils.c
@@ -22,7 +22,7 @@
# include "config.h"
#endif
-#include <vlc_atomic.h>
+#include <stdatomic.h>
#include "vt_utils.h"
diff --git a/modules/demux/adaptive/http/Downloader.cpp b/modules/demux/adaptive/http/Downloader.cpp
index ba8172740c..7d0ec6e741 100644
--- a/modules/demux/adaptive/http/Downloader.cpp
+++ b/modules/demux/adaptive/http/Downloader.cpp
@@ -24,7 +24,8 @@
#include "Downloader.hpp"
#include <vlc_threads.h>
-#include <vlc_atomic.h>
+
+#include <atomic>
using namespace adaptive::http;
diff --git a/modules/demux/adaptive/plumbing/CommandsQueue.hpp b/modules/demux/adaptive/plumbing/CommandsQueue.hpp
index b730340ce8..fe5abbd497 100644
--- a/modules/demux/adaptive/plumbing/CommandsQueue.hpp
+++ b/modules/demux/adaptive/plumbing/CommandsQueue.hpp
@@ -22,8 +22,8 @@
#include <vlc_common.h>
#include <vlc_es.h>
-#include <vlc_atomic.h>
+#include <atomic>
#include <list>
namespace adaptive
diff --git a/modules/gui/macosx/VLCMain.h b/modules/gui/macosx/VLCMain.h
index 5ffd2a5649..ffe2b4c0d4 100644
--- a/modules/gui/macosx/VLCMain.h
+++ b/modules/gui/macosx/VLCMain.h
@@ -35,7 +35,7 @@
#import <vlc_aout.h>
#import <vlc_input.h>
#import <vlc_vout_window.h>
-#import <vlc_atomic.h>
+#import <stdatomic.h>
#import <Cocoa/Cocoa.h>
#import "misc.h"
diff --git a/modules/gui/macosx/VLCMain.m b/modules/gui/macosx/VLCMain.m
index 16e8656b05..2a60cc184e 100644
--- a/modules/gui/macosx/VLCMain.m
+++ b/modules/gui/macosx/VLCMain.m
@@ -35,8 +35,9 @@
#include <stdlib.h> /* malloc(), free() */
#include <string.h>
+#include <stdatomic.h>
+
#include <vlc_common.h>
-#include <vlc_atomic.h>
#include <vlc_actions.h>
#include <vlc_dialog.h>
#include <vlc_url.h>
diff --git a/modules/hw/d3d11/d3d11_filters.c b/modules/hw/d3d11/d3d11_filters.c
index df36a82a89..882b3b3053 100644
--- a/modules/hw/d3d11/d3d11_filters.c
+++ b/modules/hw/d3d11/d3d11_filters.c
@@ -24,6 +24,7 @@
# include "config.h"
#endif
+#include <stdatomic.h>
#include <stdlib.h>
#include <assert.h>
@@ -32,7 +33,6 @@
#include <vlc_plugin.h>
#include <vlc_filter.h>
#include <vlc_picture.h>
-#include <vlc_atomic.h>
#define COBJMACROS
#include <initguid.h>
diff --git a/modules/hw/d3d9/d3d9_filters.c b/modules/hw/d3d9/d3d9_filters.c
index 0fd40fb02a..42a869a479 100644
--- a/modules/hw/d3d9/d3d9_filters.c
+++ b/modules/hw/d3d9/d3d9_filters.c
@@ -24,6 +24,7 @@
# include "config.h"
#endif
+#include <stdatomic.h>
#include <stdlib.h>
#include <assert.h>
@@ -31,7 +32,6 @@
#include <vlc_plugin.h>
#include <vlc_filter.h>
#include <vlc_picture.h>
-#include <vlc_atomic.h>
#define COBJMACROS
#include <initguid.h>
diff --git a/modules/hw/mmal/codec.c b/modules/hw/mmal/codec.c
index 99ff21ca70..1b82c4d270 100644
--- a/modules/hw/mmal/codec.c
+++ b/modules/hw/mmal/codec.c
@@ -26,8 +26,9 @@
#include "config.h"
#endif
+#include <stdatomic.h>
+
#include <vlc_common.h>
-#include <vlc_atomic.h>
#include <vlc_plugin.h>
#include <vlc_codec.h>
#include <vlc_threads.h>
diff --git a/modules/hw/mmal/deinterlace.c b/modules/hw/mmal/deinterlace.c
index 4b08eee9b6..be70c0d4b4 100644
--- a/modules/hw/mmal/deinterlace.c
+++ b/modules/hw/mmal/deinterlace.c
@@ -26,11 +26,12 @@
#include "config.h"
#endif
-#include <vlc_picture_pool.h>
+#include <stdatomic.h>
+
#include <vlc_common.h>
+#include <vlc_picture_pool.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
-#include <vlc_atomic.h>
#include "mmal_picture.h"
diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index 76188a457c..8083b15e5f 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -27,9 +27,9 @@
#endif
#include <math.h>
+#include <stdatomic.h>
#include <vlc_common.h>
-#include <vlc_atomic.h>
#include <vlc_plugin.h>
#include <vlc_threads.h>
#include <vlc_vout_display.h>
diff --git a/modules/hw/vaapi/vlc_vaapi.c b/modules/hw/vaapi/vlc_vaapi.c
index 6af4932dd5..1f1f384c99 100644
--- a/modules/hw/vaapi/vlc_vaapi.c
+++ b/modules/hw/vaapi/vlc_vaapi.c
@@ -28,6 +28,7 @@
#include "vlc_vaapi.h"
+#include <stdatomic.h>
#include <stdint.h>
#include <stdlib.h>
#include <inttypes.h>
@@ -38,7 +39,6 @@
#include <vlc_common.h>
#include <vlc_fs.h>
-#include <vlc_atomic.h>
#include <vlc_fourcc.h>
#include <vlc_filter.h>
#include <vlc_picture_pool.h>
diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index c98832329a..2f28f167a5 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -23,6 +23,7 @@
#endif
#include <string.h>
+#include <stdatomic.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
@@ -34,7 +35,6 @@
#include <vlc_plugin.h>
#include <vlc_fourcc.h>
#include <vlc_picture.h>
-#include <vlc_atomic.h>
#include <vlc_xlib.h>
#include "vlc_vdpau.h"
#include "../../codec/avcodec/va.h"
diff --git a/modules/hw/vdpau/sharpen.c b/modules/hw/vdpau/sharpen.c
index 2f89c2b8ba..1dcc7aa088 100644
--- a/modules/hw/vdpau/sharpen.c
+++ b/modules/hw/vdpau/sharpen.c
@@ -22,13 +22,13 @@
# include "config.h"
#endif
+#include <stdatomic.h>
#include <stdlib.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
#include <vlc_picture.h>
-#include <vlc_atomic.h>
#include "vlc_vdpau.h"
struct filter_sys_t
diff --git a/modules/hw/vdpau/vlc_vdpau.h b/modules/hw/vdpau/vlc_vdpau.h
index 01289ffbae..f9d6b50eb1 100644
--- a/modules/hw/vdpau/vlc_vdpau.h
+++ b/modules/hw/vdpau/vlc_vdpau.h
@@ -204,10 +204,10 @@ vdp_t *vdp_hold_x11(vdp_t *vdp, VdpDevice *device);
void vdp_release_x11(vdp_t *);
/* VLC specifics */
+# include <stdatomic.h>
# include <stdbool.h>
# include <vlc_common.h>
# include <vlc_fourcc.h>
-# include <vlc_atomic.h>
# include <vlc_picture.h>
/** Converts VLC YUV format to VDPAU chroma type and YCbCr format */
diff --git a/modules/services_discovery/microdns.c b/modules/services_discovery/microdns.c
index e9b7ecc567..098505acac 100644
--- a/modules/services_discovery/microdns.c
+++ b/modules/services_discovery/microdns.c
@@ -25,10 +25,10 @@
# include <config.h>
#endif
+#include <stdatomic.h>
#include <assert.h>
#include <vlc_common.h>
-#include <vlc_atomic.h>
#include <vlc_plugin.h>
#include <vlc_modules.h>
#include <vlc_services_discovery.h>
diff --git a/modules/video_filter/adjust.c b/modules/video_filter/adjust.c
index fc12d66640..9947e4c707 100644
--- a/modules/video_filter/adjust.c
+++ b/modules/video_filter/adjust.c
@@ -32,6 +32,7 @@
#endif
#include <math.h>
+#include <stdatomic.h>
#include <vlc_common.h>
#include <vlc_atomic.h>
diff --git a/modules/video_filter/antiflicker.c b/modules/video_filter/antiflicker.c
index 4df37ab2c8..f2938312f7 100644
--- a/modules/video_filter/antiflicker.c
+++ b/modules/video_filter/antiflicker.c
@@ -29,10 +29,11 @@
# include "config.h"
#endif
+#include <stdatomic.h>
+
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
-#include <vlc_atomic.h>
#include <vlc_picture.h>
#include "filter_picture.h"
diff --git a/modules/video_filter/colorthres.c b/modules/video_filter/colorthres.c
index 314ac80f41..1900c56807 100644
--- a/modules/video_filter/colorthres.c
+++ b/modules/video_filter/colorthres.c
@@ -31,11 +31,11 @@
#endif
#include <math.h>
+#include <stdatomic.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_sout.h>
-#include <vlc_atomic.h>
#include <vlc_filter.h>
#include <vlc_picture.h>
#include "filter_picture.h"
diff --git a/modules/video_filter/mirror.c b/modules/video_filter/mirror.c
index f6137c508a..1f7126ab35 100644
--- a/modules/video_filter/mirror.c
+++ b/modules/video_filter/mirror.c
@@ -30,10 +30,10 @@
#endif
#include <assert.h>
+#include <stdatomic.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
-#include <vlc_atomic.h>
#include <vlc_filter.h>
#include <vlc_picture.h>
#include "filter_picture.h"
diff --git a/modules/video_filter/motionblur.c b/modules/video_filter/motionblur.c
index fc3eee9343..803a288ac5 100644
--- a/modules/video_filter/motionblur.c
+++ b/modules/video_filter/motionblur.c
@@ -30,11 +30,12 @@
# include "config.h"
#endif
+#include <stdatomic.h>
+
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_sout.h>
#include <vlc_filter.h>
-#include <vlc_atomic.h>
#include <vlc_picture.h>
#include "filter_picture.h"
diff --git a/modules/video_filter/posterize.c b/modules/video_filter/posterize.c
index 2eab2d7019..bbb19927db 100644
--- a/modules/video_filter/posterize.c
+++ b/modules/video_filter/posterize.c
@@ -30,10 +30,10 @@
#endif
#include <assert.h>
+#include <stdatomic.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
-#include <vlc_atomic.h>
#include <vlc_filter.h>
#include <vlc_picture.h>
#include "filter_picture.h"
diff --git a/modules/video_filter/rotate.c b/modules/video_filter/rotate.c
index 84e66b0249..ffeb545da0 100644
--- a/modules/video_filter/rotate.c
+++ b/modules/video_filter/rotate.c
@@ -30,11 +30,11 @@
#endif
#include <math.h> /* sin(), cos() */
+#include <stdatomic.h>
#define VLC_MODULE_LICENSE VLC_LICENSE_GPL_2_PLUS
#include <vlc_common.h>
#include <vlc_plugin.h>
-#include <vlc_atomic.h>
#include <vlc_filter.h>
#include <vlc_picture.h>
#include "filter_picture.h"
diff --git a/modules/video_filter/sepia.c b/modules/video_filter/sepia.c
index 2a00130fbf..51e25c87ed 100644
--- a/modules/video_filter/sepia.c
+++ b/modules/video_filter/sepia.c
@@ -34,8 +34,8 @@
#include <vlc_filter.h>
#include <vlc_picture.h>
#include <vlc_cpu.h>
-#include <vlc_atomic.h>
+#include <stdatomic.h>
#include <assert.h>
#include "filter_picture.h"
diff --git a/modules/video_filter/sharpen.c b/modules/video_filter/sharpen.c
index e01fec0664..bd72ca6b1e 100644
--- a/modules/video_filter/sharpen.c
+++ b/modules/video_filter/sharpen.c
@@ -38,8 +38,8 @@
#endif
#include <assert.h>
+#include <stdatomic.h>
#include <vlc_common.h>
-#include <vlc_atomic.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
#include <vlc_picture.h>
diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c
index 3ed20a69ab..08814c3194 100644
--- a/modules/video_output/win32/events.c
+++ b/modules/video_output/win32/events.c
@@ -35,8 +35,8 @@
#include <vlc_common.h>
#include <vlc_vout_display.h>
-#include <vlc_atomic.h>
+#include <stdatomic.h>
#include <windows.h>
#include <windowsx.h> /* GET_X_LPARAM */
#include <shellapi.h> /* ExtractIcon */
diff --git a/src/android/thread.c b/src/android/thread.c
index 606f40ad12..3f8062753e 100644
--- a/src/android/thread.c
+++ b/src/android/thread.c
@@ -29,11 +29,11 @@
#endif
#include <vlc_common.h>
-#include <vlc_atomic.h>
#include "libvlc.h"
#include <signal.h>
#include <errno.h>
+#include <stdatomic.h>
#include <time.h>
#include <assert.h>
diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 77070e093b..e5b1842ef2 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -24,7 +24,8 @@
#ifndef LIBVLC_AOUT_INTERNAL_H
# define LIBVLC_AOUT_INTERNAL_H 1
-# include <vlc_atomic.h>
+# include <stdatomic.h>
+
# include <vlc_viewpoint.h>
/* Max input rate factor (1/4 -> 4) */
diff --git a/src/audio_output/volume.c b/src/audio_output/volume.c
index 8c2e12023c..530da707e2 100644
--- a/src/audio_output/volume.c
+++ b/src/audio_output/volume.c
@@ -31,6 +31,7 @@
#include <vlc_modules.h>
#include <vlc_aout.h>
#include <vlc_aout_volume.h>
+#include <vlc_atomic.h>
#include "aout_internal.h"
struct aout_volume
diff --git a/src/input/decoder.c b/src/input/decoder.c
index a34e9fb44f..da4f66b460 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -30,10 +30,9 @@
# include "config.h"
#endif
#include <assert.h>
+#include <stdatomic.h>
#include <vlc_common.h>
-
-#include <vlc_atomic.h>
#include <vlc_block.h>
#include <vlc_vout.h>
#include <vlc_aout.h>
diff --git a/src/input/item.h b/src/input/item.h
index f4b89a411f..dce1dfc058 100644
--- a/src/input/item.h
+++ b/src/input/item.h
@@ -25,7 +25,7 @@
#define LIBVLC_INPUT_ITEM_H 1
#include "input_interface.h"
-#include <vlc_atomic.h>
+#include <stdatomic.h>
void input_item_SetErrorWhenReading( input_item_t *p_i, bool b_error );
void input_item_UpdateTracksInfo( input_item_t *item, const es_format_t *fmt );
diff --git a/src/input/resource.c b/src/input/resource.c
index ac808f6e8a..4c376ae5a6 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -28,10 +28,10 @@
# include "config.h"
#endif
+#include <stdatomic.h>
#include <assert.h>
#include <vlc_common.h>
-#include <vlc_atomic.h>
#include <vlc_vout.h>
#include <vlc_spu.h>
#include <vlc_aout.h>
diff --git a/src/misc/addons.c b/src/misc/addons.c
index fd5ee96e56..3204fb3c8e 100644
--- a/src/misc/addons.c
+++ b/src/misc/addons.c
@@ -22,8 +22,9 @@
#include "config.h"
#endif
+#include <stdatomic.h>
+
#include <vlc_common.h>
-#include <vlc_atomic.h>
#include <vlc_modules.h>
#include <vlc_arrays.h>
#include <vlc_interrupt.h>
diff --git a/src/misc/interrupt.h b/src/misc/interrupt.h
index 77bb653473..6b4195b7c7 100644
--- a/src/misc/interrupt.h
+++ b/src/misc/interrupt.h
@@ -22,8 +22,9 @@
#ifndef LIBVLC_INPUT_SIGNAL_H
# define LIBVLC_INPUT_SIGNAL_H 1
+# include <stdatomic.h>
+
# include <vlc_interrupt.h>
-# include <vlc_atomic.h>
void vlc_interrupt_init(vlc_interrupt_t *);
void vlc_interrupt_deinit(vlc_interrupt_t *);
diff --git a/src/misc/picture.h b/src/misc/picture.h
index cf511139c9..70ee64878d 100644
--- a/src/misc/picture.h
+++ b/src/misc/picture.h
@@ -18,8 +18,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#include <stdatomic.h>
+
#include <vlc_picture.h>
-#include <vlc_atomic.h>
typedef struct
{
diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
index 7b5a82bfba..94b54c1c10 100644
--- a/src/misc/picture_pool.c
+++ b/src/misc/picture_pool.c
@@ -27,11 +27,11 @@
#endif
#include <assert.h>
#include <limits.h>
+#include <stdatomic.h>
#include <stdlib.h>
#include <vlc_common.h>
#include <vlc_picture_pool.h>
-#include <vlc_atomic.h>
#include "picture.h"
#define POOL_MAX (CHAR_BIT * sizeof (unsigned long long))
diff --git a/src/misc/renderer_discovery.c b/src/misc/renderer_discovery.c
index 6162c879aa..0cf22e524b 100644
--- a/src/misc/renderer_discovery.c
+++ b/src/misc/renderer_discovery.c
@@ -22,10 +22,10 @@
# include "config.h"
#endif
+#include <stdatomic.h>
#include <assert.h>
#include <vlc_common.h>
-#include <vlc_atomic.h>
#include <vlc_renderer_discovery.h>
#include <vlc_probe.h>
#include <vlc_modules.h>
diff --git a/src/misc/threads.c b/src/misc/threads.c
index 3d099db6cb..b1f16254fe 100644
--- a/src/misc/threads.c
+++ b/src/misc/threads.c
@@ -59,7 +59,7 @@ void vlc_global_mutex (unsigned n, bool acquire)
#endif
#if defined(LIBVLC_NEED_SLEEP) || defined(LIBVLC_NEED_CONDVAR)
-#include <vlc_atomic.h>
+#include <stdatomic.h>
static void vlc_cancel_addr_prepare(void *addr)
{
@@ -107,7 +107,7 @@ void (msleep)(mtime_t delay)
static inline atomic_uint *vlc_cond_value(vlc_cond_t *cond)
{
- /* XXX: ugly but avoids including vlc_atomic.h in vlc_threads.h */
+ /* XXX: ugly but avoids including stdatomic.h in vlc_threads.h */
static_assert (sizeof (cond->value) <= sizeof (atomic_uint),
"Size mismatch!");
static_assert ((alignof (cond->value) % alignof (atomic_uint)) == 0,
diff --git a/src/misc/update.h b/src/misc/update.h
index 0b209234fa..c5ca7d11c7 100644
--- a/src/misc/update.h
+++ b/src/misc/update.h
@@ -20,8 +20,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#include <stdatomic.h>
+
#include <vlc_update.h>
-#include <vlc_atomic.h>
enum /* Packet types */
{
diff --git a/src/misc/variables.h b/src/misc/variables.h
index dccd96bcb3..143a938080 100644
--- a/src/misc/variables.h
+++ b/src/misc/variables.h
@@ -24,7 +24,7 @@
# define LIBVLC_VARIABLES_H 1
# include <stdalign.h>
-# include <vlc_atomic.h>
+# include <stdatomic.h>
struct vlc_res;
diff --git a/src/modules/modules.h b/src/modules/modules.h
index 60a36e7d49..dd30db3495 100644
--- a/src/modules/modules.h
+++ b/src/modules/modules.h
@@ -24,7 +24,7 @@
#ifndef LIBVLC_MODULES_H
# define LIBVLC_MODULES_H 1
-# include <vlc_atomic.h>
+# include <stdatomic.h>
/** The plugin handle type */
typedef void *module_handle_t;
diff --git a/src/playlist/fetcher.c b/src/playlist/fetcher.c
index 44c13a55ca..d85bc06039 100644
--- a/src/playlist/fetcher.c
+++ b/src/playlist/fetcher.c
@@ -23,12 +23,13 @@
# include "config.h"
#endif
+#include <stdatomic.h>
+
#include <vlc_common.h>
#include <vlc_stream.h>
#include <vlc_modules.h>
#include <vlc_interrupt.h>
#include <vlc_arrays.h>
-#include <vlc_atomic.h>
#include <vlc_threads.h>
#include <vlc_memstream.h>
#include <vlc_meta_fetcher.h>
diff --git a/src/posix/thread.c b/src/posix/thread.c
index dab8b71f97..df7ce867b2 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -29,10 +29,10 @@
#endif
#include <vlc_common.h>
-#include <vlc_atomic.h>
#include "libvlc.h"
#include <stdarg.h>
+#include <stdatomic.h>
#include <signal.h>
#include <errno.h>
#include <time.h>
diff --git a/src/posix/timer.c b/src/posix/timer.c
index 9c2420e22d..7cae7b957e 100644
--- a/src/posix/timer.c
+++ b/src/posix/timer.c
@@ -22,13 +22,13 @@
# include "config.h"
#endif
+#include <stdatomic.h>
#include <stdnoreturn.h>
#include <stdlib.h>
#include <errno.h>
#include <assert.h>
#include <vlc_common.h>
-#include <vlc_atomic.h>
/*
* POSIX timers are essentially unusable from a library: there provide no safe
diff --git a/src/video_output/opengl.c b/src/video_output/opengl.c
index c9dcdab57b..99c830345c 100644
--- a/src/video_output/opengl.c
+++ b/src/video_output/opengl.c
@@ -23,10 +23,10 @@
#endif
#include <assert.h>
+#include <stdatomic.h>
#include <stdlib.h>
#include <vlc_common.h>
-#include <vlc_atomic.h>
#include <vlc_opengl.h>
#include "libvlc.h"
#include <vlc_modules.h>
diff --git a/src/video_output/statistic.h b/src/video_output/statistic.h
index 12f880d51b..5f555fc563 100644
--- a/src/video_output/statistic.h
+++ b/src/video_output/statistic.h
@@ -23,7 +23,7 @@
#ifndef LIBVLC_VOUT_STATISTIC_H
# define LIBVLC_VOUT_STATISTIC_H
-# include <vlc_atomic.h>
+# include <stdatomic.h>
/* NOTE: Both statistics are atomic on their own, so one might be older than
* the other one. Currently, only one of them is updated at a time, so this
diff --git a/src/win32/thread.c b/src/win32/thread.c
index d0f8d92c94..cf3c13eb49 100644
--- a/src/win32/thread.c
+++ b/src/win32/thread.c
@@ -30,10 +30,10 @@
#endif
#include <vlc_common.h>
-#include <vlc_atomic.h>
#include "libvlc.h"
#include <stdarg.h>
+#include <stdatomic.h>
#include <assert.h>
#include <limits.h>
#include <errno.h>
More information about the vlc-commits
mailing list