mpv/common
wm4 8e7cf4bc99 atomics: switch to C11 stdatomic.h
In my opinion, we shouldn't use atomics at all, but ok.

This switches the mpv code to use C11 stdatomic.h, and for compilers
that don't support stdatomic.h yet, we emulate the subset used by mpv
using the builtins commonly provided by gcc and clang.

This supersedes an earlier similar attempt by Kovensky. That attempt
unfortunately relied on a big copypasted freebsd header (which also
depended on much more highly compiler-specific functionality, defined
reserved symbols, etc.), so it had to be NIH'ed.

Some issues:
- C11 says default initialization of atomics "produces a valid state",
  but it's not sure whether the stored value is really 0. But we rely on
  this.
- I'm pretty sure our use of the __atomic... builtins is/was incorrect.
  We don't use atomic load/store intrinsics, and access stuff directly.
- Our wrapper actually does stricter typechecking than the stdatomic.h
  implementation by gcc 4.9. We make the atomic types incompatible with
  normal types by wrapping them into structs. (The FreeBSD wrapper does
  the same.)
- I couldn't test on MinGW.
2014-05-21 02:21:18 +02:00
..
av_common.c Factor out setting AVCodecContext extradata 2014-01-11 01:25:49 +01:00
av_common.h Factor out setting AVCodecContext extradata 2014-01-11 01:25:49 +01:00
av_log.c av_log: add tons of warnings against mismatched ffmpeg/libav libraries 2014-02-10 23:28:10 +01:00
av_log.h av_log: mp_msg conversion 2013-12-21 21:43:16 +01:00
av_opts.c
av_opts.h
codecs.c msg: rename mp_msg_log -> mp_msg 2013-12-21 22:13:04 +01:00
codecs.h codecs: mp_msg conversion 2013-12-21 20:50:12 +01:00
common.c common: change mp_snprintf_append semantics 2014-05-05 23:56:12 +02:00
common.h common: change MP_NOPTS_VALUE definition 2014-05-10 10:44:16 +02:00
encode.h encode_lavc: copy metadata to output file 2014-03-30 20:04:20 +02:00
encode_lavc.c encoding: No error when the output format doesn't support a stream type at all. 2014-05-16 21:41:32 +02:00
encode_lavc.h encode_lavc: copy metadata to output file 2014-03-30 20:04:20 +02:00
global.h stream: remove interrupt callback global variables 2014-04-25 19:12:24 +02:00
msg.c atomics: switch to C11 stdatomic.h 2014-05-21 02:21:18 +02:00
msg.h options: remove deprecated --identify 2014-05-04 02:46:11 +02:00
msg_control.h player: add a --dump-stats option 2014-04-17 21:47:00 +02:00
playlist.c player: remove ASX, SMIL and NSC playlist parsers 2014-04-13 15:40:05 +02:00
playlist.h player: remove ASX, SMIL and NSC playlist parsers 2014-04-13 15:40:05 +02:00
tags.c mp_tags: move generic mp_tags stuff into its own .c/.h files in common/ 2014-04-13 18:03:01 +02:00
tags.h mp_tags: move generic mp_tags stuff into its own .c/.h files in common/ 2014-04-13 18:03:01 +02:00
version.c Don't include version.h from make options.c 2013-12-22 14:35:45 +01:00