Commit 72bfe44f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Include <stdatomic.h> or <atomic> directly where applicable

parent c8c04d43
......@@ -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 */
......
......@@ -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>
......
......@@ -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>
......
......@@ -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 */
......
......@@ -27,7 +27,7 @@
#endif
#import <vlc_common.h>
#import <vlc_atomic.h>
#import <stdatomic.h>
#import <vlc_aout.h>
#import <vlc_threads.h>
......
......@@ -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"
......
......@@ -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>
......
......@@ -22,7 +22,7 @@
# include "config.h"
#endif
#include <vlc_atomic.h>
#include <stdatomic.h>
#include "vt_utils.h"
......
......@@ -24,7 +24,8 @@
#include "Downloader.hpp"
#include <vlc_threads.h>
#include <vlc_atomic.h>
#include <atomic>
using namespace adaptive::http;
......
......@@ -22,8 +22,8 @@
#include <vlc_common.h>
#include <vlc_es.h>
#include <vlc_atomic.h>
#include <atomic>
#include <list>
namespace adaptive
......
......@@ -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"
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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"
......
......@@ -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>
......
......@@ -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>
......
......@@ -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"
......
......@@ -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
......
......@@ -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 */
......
......@@ -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>
......
......@@ -32,6 +32,7 @@
#endif
#include <math.h>
#include <stdatomic.h>
#include <vlc_common.h>
#include <vlc_atomic.h>
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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>
......
......@@ -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 */
......
......@@ -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>
......
......@@ -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) */
......
......@@ -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
......
......@@ -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>
......
......@@ -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 );
......
......@@ -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>
......
......@@ -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>
......
......@@ -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 *);
......
......@@ -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
{
......
......@@ -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))
......
......@@ -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>
......
......@@ -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,
......
......@@ -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 */
{
......
......@@ -24,7 +24,7 @@
# define LIBVLC_VARIABLES_H 1
# include <stdalign.h>
# include <vlc_atomic.h>
# include <stdatomic.h>
struct vlc_res;
......
......@@ -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;
......
......@@ -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>
......
......@@ -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>
......
......@@ -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
......
......@@ -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>
......
......@@ -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
......
......@@ -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>
......
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