summaryrefslogtreecommitdiffstats
path: root/googletest/src/gtest-port.cc
diff options
context:
space:
mode:
authorFabrice de Gans-Riberi <fdegans@chromium.org>2018-05-01 23:20:31 (GMT)
committerFabrice de Gans-Riberi <fdegans@chromium.org>2018-05-01 23:22:09 (GMT)
commitd4b5281d110f0c8e7cb794737a7832a2408e8e0c (patch)
treee1cea1acc097f0b49f65dbba013acdbc3365c454 /googletest/src/gtest-port.cc
parent278aba369c41e90e9e77a6f51443beb3692919cf (diff)
downloadgoogletest-d4b5281d110f0c8e7cb794737a7832a2408e8e0c.zip
googletest-d4b5281d110f0c8e7cb794737a7832a2408e8e0c.tar.gz
googletest-d4b5281d110f0c8e7cb794737a7832a2408e8e0c.tar.bz2
Add Fuchsia support for death test.
Diffstat (limited to 'googletest/src/gtest-port.cc')
-rw-r--r--googletest/src/gtest-port.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc
index d32afb1..d632089 100644
--- a/googletest/src/gtest-port.cc
+++ b/googletest/src/gtest-port.cc
@@ -63,6 +63,10 @@
# include <sys/types.h>
#endif // GTEST_OS_AIX
+#if GTEST_OS_FUCHSIA
+# include <zircon/syscalls.h>
+#endif
+
#include "gtest/gtest-spi.h"
#include "gtest/gtest-message.h"
#include "gtest/internal/gtest-internal.h"
@@ -156,6 +160,12 @@ size_t GetThreadCount() {
}
}
+#elif GTEST_OS_FUCHSIA
+
+size_t GetThreadCount() {
+ return static_cast<size_t>(zx_system_get_num_cpus());
+}
+
#else
size_t GetThreadCount() {