From 96b21055249ade8a36f8117e4e22ea2a8a10707b Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 26 May 2014 21:55:55 -0400 Subject: srv: added a real mutex for GetProcSemaphore (instead of stubbed) --- src/core/hle/service/srv.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/core/hle/service/srv.cpp') diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp index ff6da8f1..7bbc03bf 100644 --- a/src/core/hle/service/srv.cpp +++ b/src/core/hle/service/srv.cpp @@ -5,21 +5,28 @@ #include "core/hle/hle.h" #include "core/hle/service/srv.h" #include "core/hle/service/service.h" - +#include "core/hle/kernel/mutex.h" //////////////////////////////////////////////////////////////////////////////////////////////////// // Namespace SRV namespace SRV { +Handle g_mutex = 0; + void Initialize(Service::Interface* self) { - NOTICE_LOG(OSHLE, "SRV::Sync - Initialize"); + DEBUG_LOG(OSHLE, "SRV::Initialize called"); + if (!g_mutex) { + g_mutex = Kernel::CreateMutex(false); + } } void GetProcSemaphore(Service::Interface* self) { + DEBUG_LOG(OSHLE, "SRV::GetProcSemaphore called"); // Get process semaphore? u32* cmd_buff = Service::GetCommandBuffer(); - cmd_buff[3] = 0xDEADBEEF; // Return something... 0 == NULL, raises an exception + cmd_buff[1] = 0; // No error + cmd_buff[3] = g_mutex; // Return something... 0 == NULL, raises an exception } void GetServiceHandle(Service::Interface* self) { -- cgit v1.2.3