From 640dc7520362f540364e4fbe5c4b3d082cbf73cd Mon Sep 17 00:00:00 2001 From: icexin Date: Mon, 15 Sep 2025 18:29:12 +0800 Subject: [PATCH] bthread: fix simd memory align issue --- src/bthread/task_group.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; };