Fix various issues found with thread sanitizer on macOS
This commit is contained in:
@@ -57,7 +57,7 @@ public:
|
||||
/// <summary>
|
||||
/// Locks the critical section.
|
||||
/// </summary>
|
||||
void Lock() const
|
||||
NO_SANITIZE_THREAD void Lock() const
|
||||
{
|
||||
pthread_mutex_lock(_mutexPtr);
|
||||
#if BUILD_DEBUG
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
/// Attempts to enter a critical section without blocking. If the call is successful, the calling thread takes ownership of the critical section.
|
||||
/// </summary>
|
||||
/// <returns>True if calling thread took ownership of the critical section.</returns>
|
||||
bool TryLock() const
|
||||
NO_SANITIZE_THREAD bool TryLock() const
|
||||
{
|
||||
return pthread_mutex_trylock(_mutexPtr) == 0;
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
/// <summary>
|
||||
/// Releases the lock on the critical section.
|
||||
/// </summary>
|
||||
void Unlock() const
|
||||
NO_SANITIZE_THREAD void Unlock() const
|
||||
{
|
||||
#if BUILD_DEBUG
|
||||
((UnixCriticalSection*)this)->_owningThreadId = 0;
|
||||
|
||||
Reference in New Issue
Block a user