early-access version 1350

This commit is contained in:
pineappleEA
2021-01-21 07:23:23 +01:00
parent 843abfbd8d
commit 7dcb3821c6
66 changed files with 721 additions and 925 deletions

View File

@@ -40,7 +40,7 @@ class HLERequestContext;
class KernelCore;
class Process;
class ServerSession;
class KThread;
class Thread;
class ReadableEvent;
class WritableEvent;
@@ -110,7 +110,7 @@ class HLERequestContext {
public:
explicit HLERequestContext(KernelCore& kernel, Core::Memory::Memory& memory,
std::shared_ptr<ServerSession> session,
std::shared_ptr<KThread> thread);
std::shared_ptr<Thread> thread);
~HLERequestContext();
/// Returns a pointer to the IPC command buffer for this request.
@@ -126,12 +126,15 @@ public:
return server_session;
}
using WakeupCallback = std::function<void(
std::shared_ptr<Thread> thread, HLERequestContext& context, ThreadWakeupReason reason)>;
/// Populates this context with data from the requesting process/thread.
ResultCode PopulateFromIncomingCommandBuffer(const HandleTable& handle_table,
u32_le* src_cmdbuf);
/// Writes data from this context back to the requesting process/thread.
ResultCode WriteToOutgoingCommandBuffer(KThread& thread);
ResultCode WriteToOutgoingCommandBuffer(Thread& thread);
u32_le GetCommand() const {
return command;
@@ -258,11 +261,11 @@ public:
std::string Description() const;
KThread& GetThread() {
Thread& GetThread() {
return *thread;
}
const KThread& GetThread() const {
const Thread& GetThread() const {
return *thread;
}
@@ -277,7 +280,7 @@ private:
std::array<u32, IPC::COMMAND_BUFFER_LENGTH> cmd_buf;
std::shared_ptr<Kernel::ServerSession> server_session;
std::shared_ptr<KThread> thread;
std::shared_ptr<Thread> thread;
// TODO(yuriks): Check common usage of this and optimize size accordingly
boost::container::small_vector<std::shared_ptr<Object>, 8> move_objects;
boost::container::small_vector<std::shared_ptr<Object>, 8> copy_objects;