mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 04:40:36 +08:00
uORB: fix TSAN issues using atomics
This commit is contained in:
@@ -55,7 +55,7 @@ bool Subscription::subscribe()
|
||||
|
||||
if (node) {
|
||||
_node = node;
|
||||
_last_generation = initial_generation;
|
||||
_last_generation.store(initial_generation);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@ void Subscription::unsubscribe()
|
||||
}
|
||||
|
||||
_node = nullptr;
|
||||
_last_generation = 0;
|
||||
_last_generation.store(0);
|
||||
}
|
||||
|
||||
bool Subscription::ChangeInstance(uint8_t instance)
|
||||
|
||||
Reference in New Issue
Block a user