summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2014-05-26 21:55:55 -0400
committerGravatar bunnei2014-05-26 21:55:55 -0400
commit96b21055249ade8a36f8117e4e22ea2a8a10707b (patch)
tree233306d972ad5e842b4e35910ce86d9f954dbf07 /src/core
parentsvc: changed SendSyncRequest to use Kernel::Object SyncRequest (instead of ju... (diff)
downloadyuzu-96b21055249ade8a36f8117e4e22ea2a8a10707b.tar.gz
yuzu-96b21055249ade8a36f8117e4e22ea2a8a10707b.tar.xz
yuzu-96b21055249ade8a36f8117e4e22ea2a8a10707b.zip
srv: added a real mutex for GetProcSemaphore (instead of stubbed)
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/srv.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp
index ff6da8f1c..7bbc03bf6 100644
--- a/src/core/hle/service/srv.cpp
+++ b/src/core/hle/service/srv.cpp
@@ -5,21 +5,28 @@
5#include "core/hle/hle.h" 5#include "core/hle/hle.h"
6#include "core/hle/service/srv.h" 6#include "core/hle/service/srv.h"
7#include "core/hle/service/service.h" 7#include "core/hle/service/service.h"
8 8#include "core/hle/kernel/mutex.h"
9 9
10//////////////////////////////////////////////////////////////////////////////////////////////////// 10////////////////////////////////////////////////////////////////////////////////////////////////////
11// Namespace SRV 11// Namespace SRV
12 12
13namespace SRV { 13namespace SRV {
14 14
15Handle g_mutex = 0;
16
15void Initialize(Service::Interface* self) { 17void Initialize(Service::Interface* self) {
16 NOTICE_LOG(OSHLE, "SRV::Sync - Initialize"); 18 DEBUG_LOG(OSHLE, "SRV::Initialize called");
19 if (!g_mutex) {
20 g_mutex = Kernel::CreateMutex(false);
21 }
17} 22}
18 23
19void GetProcSemaphore(Service::Interface* self) { 24void GetProcSemaphore(Service::Interface* self) {
25 DEBUG_LOG(OSHLE, "SRV::GetProcSemaphore called");
20 // Get process semaphore? 26 // Get process semaphore?
21 u32* cmd_buff = Service::GetCommandBuffer(); 27 u32* cmd_buff = Service::GetCommandBuffer();
22 cmd_buff[3] = 0xDEADBEEF; // Return something... 0 == NULL, raises an exception 28 cmd_buff[1] = 0; // No error
29 cmd_buff[3] = g_mutex; // Return something... 0 == NULL, raises an exception
23} 30}
24 31
25void GetServiceHandle(Service::Interface* self) { 32void GetServiceHandle(Service::Interface* self) {