mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Revert "Replace Execution Engine's mutex with std::recursive_mutex."
This reverts commit 1f502bd9d7
, due to
GCC / MinGW's lack of support for C++11 threading.
It's possible this will go back in after we come up with a
reasonable solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211401 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -186,19 +186,19 @@ struct LockMutex : ValueMapConfig<KeyT, MutexT> {
|
||||
};
|
||||
static void onRAUW(const ExtraData &Data, KeyT Old, KeyT New) {
|
||||
*Data.CalledRAUW = true;
|
||||
EXPECT_FALSE(Data.M->try_lock()) << "Mutex should already be locked.";
|
||||
EXPECT_FALSE(Data.M->tryacquire()) << "Mutex should already be locked.";
|
||||
}
|
||||
static void onDelete(const ExtraData &Data, KeyT Old) {
|
||||
*Data.CalledDeleted = true;
|
||||
EXPECT_FALSE(Data.M->try_lock()) << "Mutex should already be locked.";
|
||||
EXPECT_FALSE(Data.M->tryacquire()) << "Mutex should already be locked.";
|
||||
}
|
||||
static MutexT *getMutex(const ExtraData &Data) { return Data.M; }
|
||||
};
|
||||
#if LLVM_ENABLE_THREADS
|
||||
TYPED_TEST(ValueMapTest, LocksMutex) {
|
||||
std::mutex M; // Not recursive.
|
||||
sys::Mutex M(false); // Not recursive.
|
||||
bool CalledRAUW = false, CalledDeleted = false;
|
||||
typedef LockMutex<TypeParam*, std::mutex> ConfigType;
|
||||
typedef LockMutex<TypeParam*, sys::Mutex> ConfigType;
|
||||
typename ConfigType::ExtraData Data = {&M, &CalledRAUW, &CalledDeleted};
|
||||
ValueMap<TypeParam*, int, ConfigType> VM(Data);
|
||||
VM[this->BitcastV.get()] = 7;
|
||||
|
Reference in New Issue
Block a user