commit | a8cf3b7cbd265856797526d391cf951019a2a66b | [log] [tgz] |
---|---|---|
author | Mirko Bonadei <mbonadei@webrtc.org> | Fri May 24 11:47:23 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Fri May 24 12:59:14 2019 |
tree | 650f82584f56c6dca2bd02fdbd84cd5cc2f99fe7 | |
parent | fadb1811a8c16c590d43c0e0d76806802e2c695c [diff] |
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}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See http://www.webrtc.org/native-code/development for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.