diff options
author | Jay Civelli <jcivelli@google.com> | 2018-03-22 10:38:22 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2018-03-26 19:31:00 +0000 |
commit | fdad6299d6be4d39b45f42a6074b8a8bb066f124 (patch) | |
tree | 8cb14353a98ab4999e255d629ef93de92f820983 /source/cpu_id.cc | |
parent | 6ecd76ae8da49b22ca380c7bb9fe9256730f031e (diff) | |
download | libyuv-fdad6299d6be4d39b45f42a6074b8a8bb066f124.tar.gz |
Add a method to force the CPU flags
Adds a method that forces the CPU flags. Useful when using libyuv inside
a sandboxed process which may not have access to the file system.
Bug: libyuv:787
Change-Id: I01f71e39a7301085d9de388eba930b4cac0fd7be
Reviewed-on: https://chromium-review.googlesource.com/972338
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'source/cpu_id.cc')
-rw-r--r-- | source/cpu_id.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source/cpu_id.cc b/source/cpu_id.cc index 36cde933..31e24b67 100644 --- a/source/cpu_id.cc +++ b/source/cpu_id.cc @@ -261,11 +261,7 @@ static SAFEBUFFERS int GetCpuFlags(void) { LIBYUV_API int MaskCpuFlags(int enable_flags) { int cpu_info = GetCpuFlags() & enable_flags; -#ifdef __ATOMIC_RELAXED - __atomic_store_n(&cpu_info_, cpu_info, __ATOMIC_RELAXED); -#else - cpu_info_ = cpu_info; -#endif + SetCpuFlags(cpu_info); return cpu_info; } |