aboutsummaryrefslogtreecommitdiffstats
path: root/core/context.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-12-16 18:41:47 -0800
committerChris Robinson <[email protected]>2022-12-16 18:41:47 -0800
commitd281ffa9ce3abd8dfd5afd72914acebe4a4a92ff (patch)
tree59612d00cc9efa076c3565a743eab93378532326 /core/context.cpp
parent84cfef8513b88068e8ef66223d09b6c48d35caad (diff)
Use a bitset for the enabled event flags
Diffstat (limited to 'core/context.cpp')
-rw-r--r--core/context.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/context.cpp b/core/context.cpp
index 111802d9..d68d8327 100644
--- a/core/context.cpp
+++ b/core/context.cpp
@@ -1,6 +1,7 @@
#include "config.h"
+#include <cassert>
#include <memory>
#include "async_event.h"
@@ -13,8 +14,12 @@
#include "voice_change.h"
+#ifdef __cpp_lib_atomic_is_always_lock_free
+static_assert(std::atomic<ContextBase::AsyncEventBitset>::is_always_lock_free, "atomic<bitset> isn't lock-free");
+#endif
+
ContextBase::ContextBase(DeviceBase *device) : mDevice{device}
-{ }
+{ assert(mEnabledEvts.is_lock_free()); }
ContextBase::~ContextBase()
{