summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-01-31 17:57:32 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-02-02 18:37:04 +0100
commit5354a479bccc2ab47692e6cb237ec66ee8251207 (patch)
tree64fd66b44b434ad5c4553e1d39e07f2a0da8a59c /src/core
parentKernel: Introduce unique Object ids for debugging (diff)
downloadyuzu-5354a479bccc2ab47692e6cb237ec66ee8251207.tar
yuzu-5354a479bccc2ab47692e6cb237ec66ee8251207.tar.gz
yuzu-5354a479bccc2ab47692e6cb237ec66ee8251207.tar.bz2
yuzu-5354a479bccc2ab47692e6cb237ec66ee8251207.tar.lz
yuzu-5354a479bccc2ab47692e6cb237ec66ee8251207.tar.xz
yuzu-5354a479bccc2ab47692e6cb237ec66ee8251207.tar.zst
yuzu-5354a479bccc2ab47692e6cb237ec66ee8251207.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/kernel/kernel.cpp5
-rw-r--r--src/core/hle/kernel/kernel.h5
2 files changed, 1 insertions, 9 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index a2459e7b1..645c3bafc 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -76,13 +76,10 @@ ResultVal<Handle> HandleTable::Create(SharedPtr<Object> obj) {
// CTR-OS doesn't use generation 0, so skip straight to 1.
if (next_generation >= (1 << 15)) next_generation = 1;
- Handle handle = generation | (slot << 15);
- if (obj->handle == INVALID_HANDLE)
- obj->handle = handle;
-
generations[slot] = generation;
objects[slot] = std::move(obj);
+ Handle handle = generation | (slot << 15);
return MakeResult<Handle>(handle);
}
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index 5567780fe..bf5b47a61 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -58,14 +58,9 @@ enum {
DEFAULT_STACK_SIZE = 0x4000,
};
-class HandleTable;
-
class Object : NonCopyable {
- friend class HandleTable;
- u32 handle = INVALID_HANDLE;
public:
virtual ~Object() {}
- Handle GetHandle() const { return handle; }
/// Returns a unique identifier for the object. For debugging purposes only.
unsigned int GetObjectId() const { return object_id; }