mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Replace Execution Engine's mutex with std::recursive_mutex.
This change has a bit of a trickle down effect due to the fact that there are a number of derived implementations of ExecutionEngine, and that the mutex is not tightly encapsulated so is used by other classes directly. Reviewed by: rnk Differential Revision: http://reviews.llvm.org/D4196 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -22,10 +22,10 @@
|
||||
#include "llvm/IR/ValueMap.h"
|
||||
#include "llvm/MC/MCCodeGenInfo.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/Mutex.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -42,7 +42,6 @@ class JITEventListener;
|
||||
class JITMemoryManager;
|
||||
class MachineCodeInfo;
|
||||
class Module;
|
||||
class MutexGuard;
|
||||
class ObjectCache;
|
||||
class RTDyldMemoryManager;
|
||||
class Triple;
|
||||
@ -59,7 +58,7 @@ class ExecutionEngineState {
|
||||
public:
|
||||
struct AddressMapConfig : public ValueMapConfig<const GlobalValue*> {
|
||||
typedef ExecutionEngineState *ExtraData;
|
||||
static sys::Mutex *getMutex(ExecutionEngineState *EES);
|
||||
static std::recursive_mutex *getMutex(ExecutionEngineState *EES);
|
||||
static void onDelete(ExecutionEngineState *EES, const GlobalValue *Old);
|
||||
static void onRAUW(ExecutionEngineState *, const GlobalValue *,
|
||||
const GlobalValue *);
|
||||
@ -164,7 +163,7 @@ public:
|
||||
/// lock - This lock protects the ExecutionEngine, MCJIT, JIT, JITResolver and
|
||||
/// JITEmitter classes. It must be held while changing the internal state of
|
||||
/// any of those classes.
|
||||
sys::Mutex lock;
|
||||
std::recursive_mutex lock;
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// ExecutionEngine Startup
|
||||
|
Reference in New Issue
Block a user