Commit 9d009d0d by Ben Clayton

Squashed 'third_party/marl/' changes from c5127112545..5c6c1532220

5c6c1532220 Fix Android build git-subtree-dir: third_party/marl git-subtree-split: 5c6c1532220096dd470549312053a445d7d95a2c
parent 32b1d4b9
...@@ -51,7 +51,8 @@ class Thread { ...@@ -51,7 +51,8 @@ class Thread {
struct Affinity { struct Affinity {
// supported is true if marl supports controlling thread affinity for this // supported is true if marl supports controlling thread affinity for this
// platform. // platform.
#if defined(_WIN32) || defined(__linux__) || defined(__FreeBSD__) #if defined(_WIN32) || (defined(__linux__) && !defined(__ANDROID__)) || \
defined(__FreeBSD__)
static constexpr bool supported = true; static constexpr bool supported = true;
#else #else
static constexpr bool supported = false; static constexpr bool supported = false;
......
...@@ -145,7 +145,7 @@ Thread::Affinity Thread::Affinity::all( ...@@ -145,7 +145,7 @@ Thread::Affinity Thread::Affinity::all(
} }
} }
} }
#elif defined(__linux__) #elif defined(__linux__) && !defined(__ANDROID__)
auto thread = pthread_self(); auto thread = pthread_self();
cpu_set_t cpuset; cpu_set_t cpuset;
CPU_ZERO(&cpuset); CPU_ZERO(&cpuset);
...@@ -374,7 +374,7 @@ class Thread::Impl { ...@@ -374,7 +374,7 @@ class Thread::Impl {
return; return;
} }
#if defined(__linux__) #if defined(__linux__) && !defined(__ANDROID__)
cpu_set_t cpuset; cpu_set_t cpuset;
CPU_ZERO(&cpuset); CPU_ZERO(&cpuset);
for (size_t i = 0; i < count; i++) { for (size_t i = 0; i < count; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment