[Fuchsia] Implement detection of available cores.
Bug: webrtc:10135 Change-Id: I958276f4bbf5fa1a77335d4b7a279cb6c3344abc Reviewed-on: https://webrtc-review.googlesource.com/c/114504 Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Commit-Queue: Fabrice de Gans-Riberi <fdegans@chromium.org> Cr-Commit-Position: refs/heads/master@{#26033}
This commit is contained in:
parent
68586e80fc
commit
7d8c27e12a
@ -14,9 +14,10 @@
|
||||
#include <windows.h>
|
||||
#elif defined(WEBRTC_LINUX)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#if defined(WEBRTC_MAC)
|
||||
#elif defined(WEBRTC_MAC)
|
||||
#include <sys/sysctl.h>
|
||||
#elif defined(WEBRTC_FUCHSIA)
|
||||
#include <zircon/syscalls.h>
|
||||
#endif
|
||||
|
||||
#include "rtc_base/logging.h"
|
||||
@ -39,6 +40,8 @@ static int DetectNumberOfCores() {
|
||||
RTC_LOG(LS_ERROR) << "Failed to get number of cores";
|
||||
number_of_cores = 1;
|
||||
}
|
||||
#elif defined(WEBRTC_FUCHSIA)
|
||||
number_of_cores = zx_system_get_num_cpus();
|
||||
#else
|
||||
RTC_LOG(LS_ERROR) << "No function to get number of cores";
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user