diff options
Diffstat (limited to 'unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h b/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h index 2cac2d0f1..22c952ae1 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h @@ -169,7 +169,9 @@ class EventCount { class Waiter { friend class EventCount; - std::atomic<Waiter*> next; + // Align to 128 byte boundary to prevent false sharing with other Waiter + // objects in the same vector. + EIGEN_ALIGN_TO_BOUNDARY(128) std::atomic<Waiter*> next; std::mutex mu; std::condition_variable cv; uint64_t epoch; @@ -179,9 +181,6 @@ class EventCount { kWaiting, kSignaled, }; - // Pad past 128 byte boundary to prevent false sharing with other Waiter - // objects in the same vector. - char pad_[128]; }; private: |