fix the atomic operation when address misalignment

This commit is contained in:
tushicheng
2023-05-31 02:42:20 +00:00
committed by ob-robot
parent 4f890f0a8c
commit 39c207dc8c
2 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ private:
int64_t stack_size_;
bool stop_;
// protect for thread count changing.
common::SpinRWLock lock_;
common::SpinRWLock lock_ __attribute__((__aligned__(16)));
// tenant ctx
IRunWrapper *run_wrapper_;
// thread cgroups

View File

@ -317,7 +317,7 @@ public:
volatile bool need_ctas_cleanup_; //true: ObCTASCleanUpTask should traverse all table schemas to find the one need be dropped
private:
//thread to deal signals
char sig_buf_[sizeof(ObSignalWorker) + sizeof(ObSignalHandle)];
char sig_buf_[sizeof(ObSignalWorker) + sizeof(ObSignalHandle)] __attribute__((__aligned__(16)));
ObSignalWorker *sig_worker_;
ObSignalHandle *signal_handle_;