AK+Kernel: Reduce the number of template parameters of IntrusiveRBTree

This makes the user-facing type only take the node member pointer, and
lets the compiler figure out the other needed types from that.
This commit is contained in:
Ali Mohammad Pur 2021-09-09 15:27:19 +04:30 committed by Idan Horowitz
commit 14c8373eb0
Notes: sideshowbarker 2024-07-18 04:20:26 +09:00
3 changed files with 35 additions and 18 deletions

View file

@ -17,9 +17,9 @@ extern u8 end_of_kernel_image[];
namespace Kernel::Memory {
static Singleton<IntrusiveRedBlackTree<FlatPtr, PageDirectory, RawPtr<PageDirectory>, &PageDirectory::m_tree_node>> s_cr3_map;
static Singleton<IntrusiveRedBlackTree<&PageDirectory::m_tree_node>> s_cr3_map;
static IntrusiveRedBlackTree<FlatPtr, PageDirectory, RawPtr<PageDirectory>, &PageDirectory::m_tree_node>& cr3_map()
static IntrusiveRedBlackTree<&PageDirectory::m_tree_node>& cr3_map()
{
VERIFY_INTERRUPTS_DISABLED();
return *s_cr3_map;