[FFmpeg-devel] [PATCH] avutil: fix data race in av_get_cpu_flags().

Wan-Teh Chang wtc at google.com
Tue Nov 22 21:30:31 EET 2016


Here is a new version of my patch to address Michael's review comments.

Wan-Teh Chang (1):
  Make the one-time initialization in av_get_cpu_flags() thread-safe.

 libavutil/Makefile         |  1 +
 libavutil/atomic.c         | 40 ++++++++++++++++++++++++++
 libavutil/atomic.h         | 34 ++++++++++++++++++++--
 libavutil/atomic_gcc.h     | 33 +++++++++++++++++++++
 libavutil/atomic_suncc.h   | 19 ++++++++++++
 libavutil/atomic_win32.h   | 21 ++++++++++++++
 libavutil/cpu.c            | 41 ++++++++++++++------------
 libavutil/cpu.h            |  2 --
 libavutil/tests/atomic.c   | 13 +++++++++
 libavutil/tests/cpu_init.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++
 10 files changed, 253 insertions(+), 23 deletions(-)
 create mode 100644 libavutil/tests/cpu_init.c

-- 
2.8.0.rc3.226.g39d4020



More information about the ffmpeg-devel mailing list