Skip to content

Commit c1a907b

Browse files
committed
AVR Compile errors
1 parent f68812c commit c1a907b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/AudioTools/Concurrency/Mutex.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#pragma once
2-
#include <atomic>
32

43
#include "AudioConfig.h"
54

65
#ifdef USE_STD_CONCURRENCY
6+
#include <atomic>
77
#include <mutex>
88
#endif
99

@@ -21,6 +21,8 @@ class MutexBase {
2121
virtual void unlock() {}
2222
};
2323

24+
#if defined(USE_STD_CONCURRENCY)
25+
2426
class SpinLock : public MutexBase {
2527
void lock() {
2628
for (;;) {
@@ -51,7 +53,6 @@ class SpinLock : public MutexBase {
5153
volatile std::atomic<bool> lock_ = {0};
5254
};
5355

54-
#if defined(USE_STD_CONCURRENCY)
5556

5657
/**
5758
* @brief Mutex implemntation based on std::mutex

0 commit comments

Comments
 (0)