aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--unsupported/test/cxx11_eventcount.cpp2
-rw-r--r--unsupported/test/cxx11_runqueue.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/unsupported/test/cxx11_eventcount.cpp b/unsupported/test/cxx11_eventcount.cpp
index 2f250338c..f16cc6f07 100644
--- a/unsupported/test/cxx11_eventcount.cpp
+++ b/unsupported/test/cxx11_eventcount.cpp
@@ -95,7 +95,7 @@ static void test_stress_eventcount()
ec.Notify(false);
continue;
}
- std::this_thread::yield();
+ EIGEN_THREAD_YIELD();
j--;
}
}));
diff --git a/unsupported/test/cxx11_runqueue.cpp b/unsupported/test/cxx11_runqueue.cpp
index 4207824bf..6c99eb981 100644
--- a/unsupported/test/cxx11_runqueue.cpp
+++ b/unsupported/test/cxx11_runqueue.cpp
@@ -184,7 +184,7 @@ void test_stress_runqueue()
sum += j;
continue;
}
- std::this_thread::yield();
+ EIGEN_THREAD_YIELD();
j--;
}
total += sum;
@@ -194,7 +194,7 @@ void test_stress_runqueue()
std::vector<int> stolen;
for (int j = 1; j < kEvents;) {
if (q.PopBackHalf(&stolen) == 0) {
- std::this_thread::yield();
+ EIGEN_THREAD_YIELD();
continue;
}
while (stolen.size() && j < kEvents) {
@@ -209,7 +209,7 @@ void test_stress_runqueue()
int v = stolen.back();
stolen.pop_back();
VERIFY_IS_NOT_EQUAL(v, 0);
- while ((v = q.PushBack(v)) != 0) std::this_thread::yield();
+ while ((v = q.PushBack(v)) != 0) EIGEN_THREAD_YIELD();
}
total -= sum;
}));