Fixing livelock caused by lf stuff (or at least making it harder to hit).
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#ifndef ALLOY_FRONTEND_PPC_PPC_FRONTEND_H_
|
||||
#define ALLOY_FRONTEND_PPC_PPC_FRONTEND_H_
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#include <alloy/frontend/frontend.h>
|
||||
#include <alloy/type_pool.h>
|
||||
|
||||
@@ -19,6 +21,13 @@ namespace ppc {
|
||||
|
||||
class PPCTranslator;
|
||||
|
||||
struct PPCBuiltins {
|
||||
std::mutex global_lock;
|
||||
bool global_lock_taken;
|
||||
runtime::FunctionInfo* check_global_lock;
|
||||
runtime::FunctionInfo* handle_global_lock;
|
||||
};
|
||||
|
||||
class PPCFrontend : public Frontend {
|
||||
public:
|
||||
PPCFrontend(runtime::Runtime* runtime);
|
||||
@@ -26,6 +35,8 @@ class PPCFrontend : public Frontend {
|
||||
|
||||
int Initialize() override;
|
||||
|
||||
PPCBuiltins* builtins() { return &builtins_; }
|
||||
|
||||
int DeclareFunction(runtime::FunctionInfo* symbol_info) override;
|
||||
int DefineFunction(runtime::FunctionInfo* symbol_info,
|
||||
uint32_t debug_info_flags, uint32_t trace_flags,
|
||||
@@ -33,6 +44,7 @@ class PPCFrontend : public Frontend {
|
||||
|
||||
private:
|
||||
TypePool<PPCTranslator, PPCFrontend*> translator_pool_;
|
||||
PPCBuiltins builtins_;
|
||||
};
|
||||
|
||||
} // namespace ppc
|
||||
|
||||
Reference in New Issue
Block a user