summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_auto_object.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/k_auto_object.h')
-rw-r--r--src/core/hle/kernel/k_auto_object.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_auto_object.h b/src/core/hle/kernel/k_auto_object.h
index 64c012d44..fd6405a0e 100644
--- a/src/core/hle/kernel/k_auto_object.h
+++ b/src/core/hle/kernel/k_auto_object.h
@@ -11,13 +11,14 @@
#include "common/common_types.h"
#include "common/intrusive_red_black_tree.h"
#include "core/hle/kernel/k_class_token.h"
-#include "core/hle/kernel/object.h"
namespace Kernel {
class KernelCore;
class Process;
+using Handle = u32;
+
#define KERNEL_AUTOOBJECT_TRAITS(CLASS, BASE_CLASS) \
NON_COPYABLE(CLASS); \
NON_MOVEABLE(CLASS); \
@@ -48,7 +49,7 @@ public:
\
private:
-class KAutoObject : public Object {
+class KAutoObject {
protected:
class TypeObj {
private:
@@ -84,16 +85,17 @@ private:
KERNEL_AUTOOBJECT_TRAITS(KAutoObject, KAutoObject);
private:
- std::atomic<u32> m_ref_count;
+ std::atomic<u32> m_ref_count{};
protected:
KernelCore& kernel;
+ std::string name;
public:
static KAutoObject* Create(KAutoObject* ptr);
public:
- explicit KAutoObject(KernelCore& kernel_) : Object{kernel_}, m_ref_count(0), kernel(kernel_) {}
+ explicit KAutoObject(KernelCore& kernel_) : kernel(kernel_) {}
virtual ~KAutoObject() {}
// Destroy is responsible for destroying the auto object's resources when ref_count hits zero.
@@ -205,6 +207,10 @@ public:
virtual u64 GetId() const {
return reinterpret_cast<u64>(this);
}
+
+ virtual const std::string& GetName() const {
+ return name;
+ }
};
template <typename T>