Skip to content

Commit d089bf5

Browse files
committed
QtTsan: maintain enumerator values for non-TSAN builds
... by moving the recently-added ReadLock enumerator to the end, so it won't change the values of MutexWriteReentrant etc. The values appear to be unused, but there's no reason to risk anything here. Also move the TSAN-build enumerator, even though it has an initializer. For consistency. Amends 97bd609. Found in API-review. Pick-to: 6.11 Change-Id: I0db06d572119b64d6d3d238b27542c32194855c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
1 parent 2664637 commit d089bf5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/corelib/thread/qtsan_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ inline void mutexPostUnlock(void *addr, unsigned flags)
6565
}
6666

6767
enum : unsigned {
68-
ReadLock = ::__tsan_mutex_read_lock,
6968
MutexWriteReentrant = ::__tsan_mutex_write_reentrant,
7069
TryLock = ::__tsan_mutex_try_lock,
7170
TryLockFailed = ::__tsan_mutex_try_lock_failed,
71+
ReadLock = ::__tsan_mutex_read_lock,
7272
};
7373
#else
7474
inline void futexAcquire(void *, void * = nullptr) {}
@@ -77,10 +77,10 @@ inline void latchCountDown(void *) {}
7777
inline void latchWait(const void *) {}
7878

7979
enum : unsigned {
80-
ReadLock,
8180
MutexWriteReentrant,
8281
TryLock,
8382
TryLockFailed,
83+
ReadLock,
8484
};
8585
inline void mutexPreLock(void *, unsigned) {}
8686
inline void mutexPostLock(void *, unsigned, int) {}

0 commit comments

Comments
 (0)