Skip to content

Commit

Permalink
Backed out changeset f12f5989419a (bug 1670885) for causing frequent …
Browse files Browse the repository at this point in the history
…failures for bug 1682467 on a CLOSED TREE
  • Loading branch information
ccoroiu committed Dec 16, 2020
1 parent 88e64dc commit 8994f00
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions memory/build/Mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#if defined(XP_WIN)
# include <windows.h>
#elif defined(XP_DARWIN)
# include <os/lock.h>
# include <libkern/OSAtomic.h>
#else
# include <pthread.h>
#endif
Expand All @@ -24,7 +24,7 @@ struct Mutex {
#if defined(XP_WIN)
CRITICAL_SECTION mMutex;
#elif defined(XP_DARWIN)
os_unfair_lock mMutex;
OSSpinLock mMutex;
#else
pthread_mutex_t mMutex;
#endif
Expand All @@ -36,7 +36,7 @@ struct Mutex {
return false;
}
#elif defined(XP_DARWIN)
mMutex = OS_UNFAIR_LOCK_INIT;
mMutex = OS_SPINLOCK_INIT;
#elif defined(XP_LINUX) && !defined(ANDROID)
pthread_mutexattr_t attr;
if (pthread_mutexattr_init(&attr) != 0) {
Expand All @@ -60,7 +60,7 @@ struct Mutex {
#if defined(XP_WIN)
EnterCriticalSection(&mMutex);
#elif defined(XP_DARWIN)
os_unfair_lock_lock(&mMutex);
OSSpinLockLock(&mMutex);
#else
pthread_mutex_lock(&mMutex);
#endif
Expand All @@ -70,7 +70,7 @@ struct Mutex {
#if defined(XP_WIN)
LeaveCriticalSection(&mMutex);
#elif defined(XP_DARWIN)
os_unfair_lock_unlock(&mMutex);
OSSpinLockUnlock(&mMutex);
#else
pthread_mutex_unlock(&mMutex);
#endif
Expand Down

0 comments on commit 8994f00

Please sign in to comment.