Skip to content

Commit 85c2848

Browse files
committed
threading: use correct mutex name in reverse_lock fatal error messages
Now that REVERSE_LOCK requires the name of the actual mutex, it can be used for better error messages.
1 parent a201a99 commit 85c2848

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sync.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ class SCOPED_LOCKABLE UniqueLock : public MutexType::unique_lock
248248
// it is not possible to use the lock's copy of the mutex for that purpose.
249249
// Instead, the original mutex needs to be passed back to the reverse_lock for
250250
// the sake of thread-safety analysis, but it is not actually used otherwise.
251-
#define REVERSE_LOCK(g, cs) typename std::decay<decltype(g)>::type::reverse_lock UNIQUE_NAME(revlock)(g, cs, #g, __FILE__, __LINE__)
251+
#define REVERSE_LOCK(g, cs) typename std::decay<decltype(g)>::type::reverse_lock UNIQUE_NAME(revlock)(g, cs, #cs, __FILE__, __LINE__)
252252

253253
// When locking a Mutex, require negative capability to ensure the lock
254254
// is not already held

0 commit comments

Comments
 (0)