summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-11-26 20:10:49 +0100
committerLioncash <mathew1800@gmail.com>2019-11-27 03:55:37 +0100
commit536fc7f0ea77e08d68c760f387c307d258804e3b (patch)
treee979df531bf1222788cc26144531c6e6f5cca1d1 /src/core/hle/kernel
parentcore/memory: Move memory read/write implementation functions into an anonymous namespace (diff)
downloadyuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar
yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.gz
yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.bz2
yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.lz
yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.xz
yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.tar.zst
yuzu-536fc7f0ea77e08d68c760f387c307d258804e3b.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/client_session.cpp4
-rw-r--r--src/core/hle/kernel/client_session.h6
-rw-r--r--src/core/hle/kernel/server_session.cpp3
-rw-r--r--src/core/hle/kernel/server_session.h9
-rw-r--r--src/core/hle/kernel/svc.cpp2
5 files changed, 18 insertions, 6 deletions
diff --git a/src/core/hle/kernel/client_session.cpp b/src/core/hle/kernel/client_session.cpp
index 5995a6556..9849dbe91 100644
--- a/src/core/hle/kernel/client_session.cpp
+++ b/src/core/hle/kernel/client_session.cpp
@@ -21,10 +21,10 @@ ClientSession::~ClientSession() {
}
}
-ResultCode ClientSession::SendSyncRequest(Thread* thread) {
+ResultCode ClientSession::SendSyncRequest(Thread* thread, Memory::Memory& memory) {
// Signal the server session that new data is available
if (auto server = parent->server.lock()) {
- return server->HandleSyncRequest(SharedFrom(thread));
+ return server->HandleSyncRequest(SharedFrom(thread), memory);
}
return ERR_SESSION_CLOSED_BY_REMOTE;
diff --git a/src/core/hle/kernel/client_session.h b/src/core/hle/kernel/client_session.h
index 5ae41db29..484dd7bc9 100644
--- a/src/core/hle/kernel/client_session.h
+++ b/src/core/hle/kernel/client_session.h
@@ -10,6 +10,10 @@
union ResultCode;
+namespace Memory {
+class Memory;
+}
+
namespace Kernel {
class KernelCore;
@@ -37,7 +41,7 @@ public:
return HANDLE_TYPE;
}
- ResultCode SendSyncRequest(Thread* thread);
+ ResultCode SendSyncRequest(Thread* thread, Memory::Memory& memory);
private:
/// The parent session, which links to the server endpoint.
diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp
index c7db21eb2..57878514d 100644
--- a/src/core/hle/kernel/server_session.cpp
+++ b/src/core/hle/kernel/server_session.cpp
@@ -127,7 +127,8 @@ ResultCode ServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& con
return RESULT_SUCCESS;
}
-ResultCode ServerSession::HandleSyncRequest(std::shared_ptr<Thread> thread) {
+ResultCode ServerSession::HandleSyncRequest(std::shared_ptr<Thread> thread,
+ Memory::Memory& memory) {
// The ServerSession received a sync request, this means that there's new data available
// from its ClientSession, so wake up any threads that may be waiting on a svcReplyAndReceive or
// similar.
diff --git a/src/core/hle/kernel/server_session.h b/src/core/hle/kernel/server_session.h
index 8a65647b6..641709a45 100644
--- a/src/core/hle/kernel/server_session.h
+++ b/src/core/hle/kernel/server_session.h
@@ -13,6 +13,10 @@
#include "core/hle/kernel/wait_object.h"
#include "core/hle/result.h"
+namespace Memory {
+class Memory;
+}
+
namespace Kernel {
class ClientPort;
@@ -85,10 +89,13 @@ public:
/**
* Handle a sync request from the emulated application.
+ *
* @param thread Thread that initiated the request.
+ * @param memory Memory context to handle the sync request under.
+ *
* @returns ResultCode from the operation.
*/
- ResultCode HandleSyncRequest(std::shared_ptr<Thread> thread);
+ ResultCode HandleSyncRequest(std::shared_ptr<Thread> thread, Memory::Memory& memory);
bool ShouldWait(const Thread* thread) const override;
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index eddafaf60..68bff11ec 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -383,7 +383,7 @@ static ResultCode SendSyncRequest(Core::System& system, Handle handle) {
// TODO(Subv): svcSendSyncRequest should put the caller thread to sleep while the server
// responds and cause a reschedule.
- return session->SendSyncRequest(system.CurrentScheduler().GetCurrentThread());
+ return session->SendSyncRequest(system.CurrentScheduler().GetCurrentThread(), system.Memory());
}
/// Get the ID for the specified thread.