diff options
author | Chris Robinson <[email protected]> | 2023-12-03 14:18:32 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-03 14:23:31 -0800 |
commit | 2c27d8bc756fd4b134aa16ef9901734e1509062b (patch) | |
tree | e3d982f434cf30ef3a802424c44180ee165cb2c1 /core/device.cpp | |
parent | e6bb91212be93b0b7e4c99c1409f91dd8e211688 (diff) |
Make the device clock members atomic
Even though they're protected by a SeqLock of sorts, it's still UB to read and
write non-atomic vars from different threads. It's fine to do relaxed reads and
writes given the lock though, to help alleviate the cost.
Diffstat (limited to 'core/device.cpp')
-rw-r--r-- | core/device.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/device.cpp b/core/device.cpp index 2766c5e4..a5edf63c 100644 --- a/core/device.cpp +++ b/core/device.cpp @@ -9,6 +9,9 @@ #include "mastering.h" +static_assert(std::atomic<std::chrono::nanoseconds>::is_always_lock_free); + + al::FlexArray<ContextBase*> DeviceBase::sEmptyContextArray{0u}; |