aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/ThreadPool
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2018-09-21 23:02:33 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2018-09-21 23:02:33 +0200
commitc696dbcaa6e17cdfa6c9ff37dadf89cf4b707504 (patch)
tree841add75dbe983f02568e9bff416c90eb905e050 /unsupported/Eigen/CXX11/src/ThreadPool
parente3c82890474fa3ab4b49a0c97b8b4eccce93a77a (diff)
Fiw shadowing of last and all
Diffstat (limited to 'unsupported/Eigen/CXX11/src/ThreadPool')
-rw-r--r--unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h b/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h
index 22c952ae1..7a71f89fd 100644
--- a/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h
+++ b/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h
@@ -128,7 +128,7 @@ class EventCount {
// Notify wakes one or all waiting threads.
// Must be called after changing the associated wait predicate.
- void Notify(bool all) {
+ void Notify(bool notifyAll) {
std::atomic_thread_fence(std::memory_order_seq_cst);
uint64_t state = state_.load(std::memory_order_acquire);
for (;;) {
@@ -137,7 +137,7 @@ class EventCount {
return;
uint64_t waiters = (state & kWaiterMask) >> kWaiterShift;
uint64_t newstate;
- if (all) {
+ if (notifyAll) {
// Reset prewait counter and empty wait list.
newstate = (state & kEpochMask) + (kEpochInc * waiters) + kStackMask;
} else if (waiters) {
@@ -157,10 +157,10 @@ class EventCount {
}
if (state_.compare_exchange_weak(state, newstate,
std::memory_order_acquire)) {
- if (!all && waiters) return; // unblocked pre-wait thread
+ if (!notifyAll && waiters) return; // unblocked pre-wait thread
if ((state & kStackMask) == kStackMask) return;
Waiter* w = &waiters_[state & kStackMask];
- if (!all) w->next.store(nullptr, std::memory_order_relaxed);
+ if (!notifyAll) w->next.store(nullptr, std::memory_order_relaxed);
Unpark(w);
return;
}