Skip to content

Commit 239508c

Browse files
committed
bthread: fix simd memory align issue
1 parent 0e7c644 commit 239508c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/bthread/task_group.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ExitException : public std::exception {
5656
// Otherwise, use mutex to guarantee atomicity.
5757
class AtomicInteger128 {
5858
public:
59-
struct Value {
59+
struct BAIDU_CACHELINE_ALIGNMENT Value {
6060
int64_t v1;
6161
int64_t v2;
6262
};
@@ -72,7 +72,7 @@ class AtomicInteger128 {
7272
void store(Value value);
7373

7474
private:
75-
Value BAIDU_CACHELINE_ALIGNMENT _value{};
75+
Value _value{};
7676
// Used to protect `_cpu_time_stat' when __x86_64__ and __ARM_NEON is not defined.
7777
FastPthreadMutex _mutex;
7878
};

0 commit comments

Comments
 (0)