diff --git a/src/bthread/task_group.h b/src/bthread/task_group.h index 43c9115267..958f81d7d6 100644 --- a/src/bthread/task_group.h +++ b/src/bthread/task_group.h @@ -56,7 +56,7 @@ class ExitException : public std::exception { // Otherwise, use mutex to guarantee atomicity. class AtomicInteger128 { public: - struct Value { + struct BAIDU_CACHELINE_ALIGNMENT Value { int64_t v1; int64_t v2; }; @@ -72,7 +72,7 @@ class AtomicInteger128 { void store(Value value); private: - Value BAIDU_CACHELINE_ALIGNMENT _value{}; + Value _value{}; // Used to protect `_cpu_time_stat' when __x86_64__ and __ARM_NEON is not defined. FastPthreadMutex _mutex; };