Backed out changeset f12f5989419a (bug 1670885) for causing frequent failures for bug 1682467 on a CLOSED TREE

This commit is contained in:
Cristina Coroiu 2020-12-16 15:49:51 +02:00
Родитель 88e64dcca0
Коммит 8994f0036c
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -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
@ -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
@ -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) {
@ -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
@ -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