diff options
Diffstat (limited to 'src/core/hle/kernel/object.h')
-rw-r--r-- | src/core/hle/kernel/object.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/hle/kernel/object.h b/src/core/hle/kernel/object.h index 27124ef67..501e58b33 100644 --- a/src/core/hle/kernel/object.h +++ b/src/core/hle/kernel/object.h @@ -18,6 +18,7 @@ using Handle = u32; enum class HandleType : u32 { Unknown, + Event, WritableEvent, ReadableEvent, SharedMemory, @@ -34,7 +35,8 @@ enum class HandleType : u32 { class Object : NonCopyable, public std::enable_shared_from_this<Object> { public: - explicit Object(KernelCore& kernel); + explicit Object(KernelCore& kernel_); + explicit Object(KernelCore& kernel_, std::string&& name_); virtual ~Object(); /// Returns a unique identifier for the object. For debugging purposes only. @@ -46,7 +48,7 @@ public: return "[BAD KERNEL OBJECT TYPE]"; } virtual std::string GetName() const { - return "[UNKNOWN KERNEL OBJECT]"; + return name; } virtual HandleType GetHandleType() const = 0; @@ -61,12 +63,15 @@ public: */ bool IsWaitable() const; + virtual void Finalize() = 0; + protected: /// The kernel instance this object was created under. KernelCore& kernel; private: std::atomic<u32> object_id{0}; + std::string name; }; template <typename T> |