mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Bug 1407137 - Implement Swap(Atomic<T, Order>&, Atomic<T, Order>&) = delete; to remove an actually-non-atomic footgun. r=froydnj
--HG-- extra : rebase_source : 6afed8e85fcf8801144a1a34ea07f590baa0f5e0
This commit is contained in:
parent
be56429c85
commit
a3d9df23d5
@ -558,6 +558,11 @@ private:
|
||||
Atomic(Atomic<bool, Order>& aOther) = delete;
|
||||
};
|
||||
|
||||
// If you want to atomically swap two atomic values, use exchange().
|
||||
template<typename T, MemoryOrdering Order>
|
||||
void
|
||||
Swap(Atomic<T, Order>&, Atomic<T, Order>&) = delete;
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* mozilla_Atomics_h */
|
||||
|
Loading…
x
Reference in New Issue
Block a user