From 611983679593d8a666551254bc97490effbb6519 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 6 Jun 2021 15:39:11 -0700 Subject: hle: kernel: KAutoObjectWithListContainer: Use boost::instrusive::rbtree. - Fixes some crashes introduced by our common intrusive red/black tree impl. --- src/core/hle/kernel/k_auto_object.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/core/hle/kernel/k_auto_object.h') diff --git a/src/core/hle/kernel/k_auto_object.h b/src/core/hle/kernel/k_auto_object.h index bc18582be..88a052f65 100644 --- a/src/core/hle/kernel/k_auto_object.h +++ b/src/core/hle/kernel/k_auto_object.h @@ -7,10 +7,11 @@ #include #include +#include + #include "common/assert.h" #include "common/common_funcs.h" #include "common/common_types.h" -#include "common/intrusive_red_black_tree.h" #include "core/hle/kernel/k_class_token.h" namespace Kernel { @@ -175,7 +176,7 @@ private: class KAutoObjectWithListContainer; -class KAutoObjectWithList : public KAutoObject { +class KAutoObjectWithList : public KAutoObject, public boost::intrusive::set_base_hook<> { public: explicit KAutoObjectWithList(KernelCore& kernel_) : KAutoObject(kernel_) {} @@ -192,6 +193,10 @@ public: } } + friend bool operator<(const KAutoObjectWithList& left, const KAutoObjectWithList& right) { + return &left < &right; + } + public: virtual u64 GetId() const { return reinterpret_cast(this); @@ -203,8 +208,6 @@ public: private: friend class KAutoObjectWithListContainer; - - Common::IntrusiveRedBlackTreeNode list_node; }; template -- cgit v1.2.3