diff options
Diffstat (limited to 'src/core/hle/kernel/session.cpp')
| -rw-r--r-- | src/core/hle/kernel/session.cpp | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/src/core/hle/kernel/session.cpp b/src/core/hle/kernel/session.cpp index 642914744..dee6e2b72 100644 --- a/src/core/hle/kernel/session.cpp +++ b/src/core/hle/kernel/session.cpp | |||
| @@ -1,12 +1,36 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | 1 | // Copyright 2019 yuzu emulator team |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "common/assert.h" | ||
| 6 | #include "core/hle/kernel/client_session.h" | ||
| 7 | #include "core/hle/kernel/server_session.h" | ||
| 5 | #include "core/hle/kernel/session.h" | 8 | #include "core/hle/kernel/session.h" |
| 6 | #include "core/hle/kernel/thread.h" | ||
| 7 | 9 | ||
| 8 | namespace Kernel { | 10 | namespace Kernel { |
| 9 | 11 | ||
| 10 | Session::Session() {} | 12 | Session::Session(KernelCore& kernel) : WaitObject{kernel} {} |
| 11 | Session::~Session() {} | 13 | Session::~Session() = default; |
| 14 | |||
| 15 | Session::SessionPair Session::Create(KernelCore& kernel, std::string name) { | ||
| 16 | auto session{std::make_shared<Session>(kernel)}; | ||
| 17 | auto client_session{Kernel::ClientSession::Create(kernel, session, name + "_Client").Unwrap()}; | ||
| 18 | auto server_session{Kernel::ServerSession::Create(kernel, session, name + "_Server").Unwrap()}; | ||
| 19 | |||
| 20 | session->name = std::move(name); | ||
| 21 | session->client = client_session; | ||
| 22 | session->server = server_session; | ||
| 23 | |||
| 24 | return std::make_pair(std::move(client_session), std::move(server_session)); | ||
| 25 | } | ||
| 26 | |||
| 27 | bool Session::ShouldWait(const Thread* thread) const { | ||
| 28 | UNIMPLEMENTED(); | ||
| 29 | return {}; | ||
| 30 | } | ||
| 31 | |||
| 32 | void Session::Acquire(Thread* thread) { | ||
| 33 | UNIMPLEMENTED(); | ||
| 34 | } | ||
| 35 | |||
| 12 | } // namespace Kernel | 36 | } // namespace Kernel |