aboutsummaryrefslogtreecommitdiffstats
path: root/fastos
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-10-04 00:20:02 +0200
committerTor Egge <Tor.Egge@broadpark.no>2020-10-04 00:55:18 +0200
commite7e868bb9dca1c11c83ea56d4bccee9f1440403a (patch)
tree2a87d88ffb1fc1243c0b5192a24d9c0e54defaaf /fastos
parent3b3896aac6b7ea6b5bace26c39647e2ec960fcf7 (diff)
Define _G_nextCpuId only on linux
Diffstat (limited to 'fastos')
-rw-r--r--fastos/src/vespa/fastos/unix_thread.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/fastos/src/vespa/fastos/unix_thread.cpp b/fastos/src/vespa/fastos/unix_thread.cpp
index 9e48727deb3..3fcba5e61b1 100644
--- a/fastos/src/vespa/fastos/unix_thread.cpp
+++ b/fastos/src/vespa/fastos/unix_thread.cpp
@@ -5,7 +5,9 @@
#include <unistd.h>
namespace {
+#ifdef __linux__
std::atomic_size_t _G_nextCpuId(0);
+#endif
volatile size_t _G_maxNumCpus=0; // Non zero means use cpu pinning.
}