1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-08 14:47:35 +00:00

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
parent 5a0cdb15b0
commit 14c8373eb0
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;