webrtc_m130/system_wrappers
Mirko Bonadei a8cf3b7cbd Ensure CpuInfo::DetectNumberOfCores is > 0 and thread safe.
This CL adds error handling for sysconf, which can return -1 and
adds an RTC_CHECK_GT to ensure the value returned is always greater
than 0.

On top of that CpuInfo::DetectNumberOfCores is made thread safe because
the static local variable is initialized with the right values istead
of 0.

Bug: None
Change-Id: I294684e7380b12cda55ec8d6c7a90e132dc3af85
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138210
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28057}
2019-05-24 12:59:14 +00:00
..
2018-10-18 09:41:22 +00:00