2019-11-25 23:28:48 +00:00
|
|
|
// Copyright 2019 yuzu emulator team
|
2015-02-01 00:56:59 +00:00
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2019-11-25 23:28:48 +00:00
|
|
|
#include "common/assert.h"
|
|
|
|
#include "core/hle/kernel/client_session.h"
|
|
|
|
#include "core/hle/kernel/server_session.h"
|
2015-02-01 00:56:59 +00:00
|
|
|
#include "core/hle/kernel/session.h"
|
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
2020-02-11 14:46:25 +00:00
|
|
|
Session::Session(KernelCore& kernel) : SynchronizationObject{kernel} {}
|
2019-11-25 23:28:48 +00:00
|
|
|
Session::~Session() = default;
|
|
|
|
|
|
|
|
Session::SessionPair Session::Create(KernelCore& kernel, std::string name) {
|
|
|
|
auto session{std::make_shared<Session>(kernel)};
|
|
|
|
auto client_session{Kernel::ClientSession::Create(kernel, session, name + "_Client").Unwrap()};
|
|
|
|
auto server_session{Kernel::ServerSession::Create(kernel, session, name + "_Server").Unwrap()};
|
|
|
|
|
|
|
|
session->name = std::move(name);
|
|
|
|
session->client = client_session;
|
|
|
|
session->server = server_session;
|
|
|
|
|
|
|
|
return std::make_pair(std::move(client_session), std::move(server_session));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Session::ShouldWait(const Thread* thread) const {
|
|
|
|
UNIMPLEMENTED();
|
|
|
|
return {};
|
|
|
|
}
|
|
|
|
|
2020-02-11 21:36:39 +00:00
|
|
|
bool Session::IsSignaled() const {
|
|
|
|
UNIMPLEMENTED();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2019-11-25 23:28:48 +00:00
|
|
|
void Session::Acquire(Thread* thread) {
|
|
|
|
UNIMPLEMENTED();
|
|
|
|
}
|
|
|
|
|
2018-01-20 07:48:02 +00:00
|
|
|
} // namespace Kernel
|