mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-12-17 21:41:49 +01:00
srv: added a real mutex for GetProcSemaphore (instead of stubbed)
This commit is contained in:
parent
9f7ed2d027
commit
96b2105524
@ -5,21 +5,28 @@
|
|||||||
#include "core/hle/hle.h"
|
#include "core/hle/hle.h"
|
||||||
#include "core/hle/service/srv.h"
|
#include "core/hle/service/srv.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
#include "core/hle/kernel/mutex.h"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Namespace SRV
|
// Namespace SRV
|
||||||
|
|
||||||
namespace SRV {
|
namespace SRV {
|
||||||
|
|
||||||
|
Handle g_mutex = 0;
|
||||||
|
|
||||||
void Initialize(Service::Interface* self) {
|
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) {
|
void GetProcSemaphore(Service::Interface* self) {
|
||||||
|
DEBUG_LOG(OSHLE, "SRV::GetProcSemaphore called");
|
||||||
// Get process semaphore?
|
// Get process semaphore?
|
||||||
u32* cmd_buff = Service::GetCommandBuffer();
|
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) {
|
void GetServiceHandle(Service::Interface* self) {
|
||||||
|
Loading…
Reference in New Issue
Block a user