Switching to xe::mutex.

This commit is contained in:
Ben Vanik
2015-05-24 23:16:43 -07:00
parent 814ec82ad4
commit f5a2b85d42
31 changed files with 133 additions and 108 deletions

View File

@@ -61,7 +61,7 @@ void CheckGlobalLock(PPCContext* ppc_state, void* arg0, void* arg1) {
ppc_state->scratch = 0x8000;
}
void HandleGlobalLock(PPCContext* ppc_state, void* arg0, void* arg1) {
std::mutex* global_lock = reinterpret_cast<std::mutex*>(arg0);
auto global_lock = reinterpret_cast<xe::mutex*>(arg0);
volatile bool* global_lock_taken = reinterpret_cast<bool*>(arg1);
uint64_t value = ppc_state->scratch;
if (value == 0x8000) {

View File

@@ -13,6 +13,7 @@
#include <memory>
#include <mutex>
#include "xenia/base/mutex.h"
#include "xenia/base/type_pool.h"
#include "xenia/cpu/frontend/context_info.h"
#include "xenia/cpu/function.h"
@@ -32,7 +33,7 @@ namespace frontend {
class PPCTranslator;
struct PPCBuiltins {
std::mutex global_lock;
xe::mutex global_lock;
bool global_lock_taken;
FunctionInfo* check_global_lock;
FunctionInfo* handle_global_lock;