14 #include <emmintrin.h>
17namespace tracktion {
inline namespace graph
31 for (
int i = 0; i < 5; ++i)
35 for (
int i = 0; i < 10; ++i)
40 __asm__ __volatile__ (
"yield");
A basic spin lock that uses an atomic_flag to store the locked state so should never result in a syst...
void unlock() noexcept
Releases the lock, this should only be called after a successful call to try_lock or lock.
bool try_lock() noexcept
Attempts to take the lock once, returning true if successful.
void lock() noexcept
Takes the lock, blocking if necessary.
T test_and_set(T... args)