Skip to content

Commit 5ea549c

Browse files
committed
Mark waitForMix as (potentially) blocking
1 parent 0aba869 commit 5ea549c

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

common/opthelpers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@
6464

6565
#if HAS_ATTRIBUTE(clang::nonblocking) && !defined(_MSVC_STL_UPDATE)
6666
#define NONBLOCKING [[clang::nonblocking]]
67+
#define BLOCKING [[clang::blocking]]
6768
#else
6869
#define NONBLOCKING
70+
#define BLOCKING
6971
#endif
7072

7173
#if defined(__clang__) && (__clang_major__ >= (defined(__APPLE__) ? 17 : 20))

core/device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ struct DeviceBase {
360360
}
361361

362362
/** Waits for the mixer to not be mixing or updating the clock. */
363-
[[nodiscard]] auto waitForMix() const noexcept -> unsigned
363+
[[nodiscard]] auto waitForMix() const noexcept BLOCKING -> unsigned
364364
{
365365
auto refcount = mMixCount.load(std::memory_order_acquire);
366366
while((refcount&1)) refcount = mMixCount.load(std::memory_order_acquire);

0 commit comments

Comments
 (0)