[FFmpeg-devel] [PATCH] avutil/cpu: remove the |checked| static variable

Michael Niedermayer michael at niedermayer.cc
Wed Nov 23 23:33:22 EET 2016


On Wed, Nov 23, 2016 at 11:21:56AM -0800, Wan-Teh Chang wrote:
> Remove the |checked| variable because the invalid value of -1 for
> |flags| can be used to indicate the same condition. Also rename |flags|
> to |cpu_flags| because there are a local variable and a function
> parameter named |flags| in the same file.
> 
> Add a test program libavutil/tests/cpu_init.c to check whether the
> one-time initialization in av_get_cpu_flags() has data races.
> 
> Co-author: Dmitry Vyukov of Google
> 
> Signed-off-by: Wan-Teh Chang <wtc at google.com>
> ---
>  libavutil/Makefile         |  1 +
>  libavutil/cpu.c            | 40 ++++++++++++++------------
>  libavutil/tests/cpu_init.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 94 insertions(+), 19 deletions(-)
>  create mode 100644 libavutil/tests/cpu_init.c

Patch split and applied

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161123/d0a74b78/attachment.sig>


More information about the ffmpeg-devel mailing list