diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/srv.cpp | 13 |
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 | ||
| 13 | namespace SRV { | 13 | namespace SRV { |
| 14 | 14 | ||
| 15 | Handle g_mutex = 0; | ||
| 16 | |||
| 15 | void Initialize(Service::Interface* self) { | 17 | void 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 | ||
| 19 | void GetProcSemaphore(Service::Interface* self) { | 24 | void 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 | ||
| 25 | void GetServiceHandle(Service::Interface* self) { | 32 | void GetServiceHandle(Service::Interface* self) { |