mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-03 15:30:35 +08:00
perf: use atomics to prevent TSAN issues
This commit is contained in:
@@ -95,7 +95,9 @@ public:
|
||||
} else
|
||||
#endif // __PX4_NUTTX
|
||||
{
|
||||
return __atomic_load_n(&_value, __ATOMIC_SEQ_CST);
|
||||
T val;
|
||||
__atomic_load(&_value, &val, __ATOMIC_SEQ_CST);
|
||||
return val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user