diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-11-27 00:32:13 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-11-29 14:42:26 +0100 |
commit | c61d2a28413bd149d58b1173fa89a250ddce03c4 (patch) | |
tree | b45cef0f468a5cd28c7624a78db036025800525a /src/core/hle/kernel/kernel.h | |
parent | kernel: Divide Event into ReadableEvent and WritableEvent (diff) | |
download | yuzu-c61d2a28413bd149d58b1173fa89a250ddce03c4.tar yuzu-c61d2a28413bd149d58b1173fa89a250ddce03c4.tar.gz yuzu-c61d2a28413bd149d58b1173fa89a250ddce03c4.tar.bz2 yuzu-c61d2a28413bd149d58b1173fa89a250ddce03c4.tar.lz yuzu-c61d2a28413bd149d58b1173fa89a250ddce03c4.tar.xz yuzu-c61d2a28413bd149d58b1173fa89a250ddce03c4.tar.zst yuzu-c61d2a28413bd149d58b1173fa89a250ddce03c4.zip |
Diffstat (limited to 'src/core/hle/kernel/kernel.h')
-rw-r--r-- | src/core/hle/kernel/kernel.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index ea00c89f5..f12d061eb 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h @@ -20,6 +20,7 @@ namespace Kernel { class ClientPort; class HandleTable; class Process; +class ReadableEvent; class ResourceLimit; class Thread; class Timer; @@ -27,6 +28,7 @@ class Timer; /// Represents a single instance of the kernel. class KernelCore { private: + using NamedEventTable = std::unordered_map<std::string, SharedPtr<ReadableEvent>>; using NamedPortTable = std::unordered_map<std::string, SharedPtr<ClientPort>>; public: @@ -66,6 +68,15 @@ public: /// Retrieves a const pointer to the current process. const Process* CurrentProcess() const; + /// Adds an event to the named event table + void AddNamedEvent(std::string name, SharedPtr<ReadableEvent> event); + + /// Finds an event within the named event table wit the given name. + NamedEventTable::iterator FindNamedEvent(const std::string& name); + + /// Finds an event within the named event table wit the given name. + NamedEventTable::const_iterator FindNamedEvent(const std::string& name) const; + /// Adds a port to the named port table void AddNamedPort(std::string name, SharedPtr<ClientPort> port); |