Skip to content

Commit cc25885

Browse files
Move LockAnnotation from threadsafety.h (imported code) to sync.h (our code)
1 parent a822a0e commit cc25885

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/sync.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,4 +304,15 @@ class CSemaphoreGrant
304304
}
305305
};
306306

307+
// Utility class for indicating to compiler thread analysis that a mutex is
308+
// locked (when it couldn't be determined otherwise).
309+
struct SCOPED_LOCKABLE LockAnnotation
310+
{
311+
template <typename Mutex>
312+
explicit LockAnnotation(Mutex& mutex) EXCLUSIVE_LOCK_FUNCTION(mutex)
313+
{
314+
}
315+
~LockAnnotation() UNLOCK_FUNCTION() {}
316+
};
317+
307318
#endif // BITCOIN_SYNC_H

src/threadsafety.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,4 @@
5454
#define ASSERT_EXCLUSIVE_LOCK(...)
5555
#endif // __GNUC__
5656

57-
// Utility class for indicating to compiler thread analysis that a mutex is
58-
// locked (when it couldn't be determined otherwise).
59-
struct SCOPED_LOCKABLE LockAnnotation
60-
{
61-
template <typename Mutex>
62-
explicit LockAnnotation(Mutex& mutex) EXCLUSIVE_LOCK_FUNCTION(mutex)
63-
{
64-
}
65-
~LockAnnotation() UNLOCK_FUNCTION() {}
66-
};
67-
6857
#endif // BITCOIN_THREADSAFETY_H

0 commit comments

Comments
 (0)