mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 10:43:52 +00:00
- Create "AVL FUNCTIONS" section tag.
- Implement RtlENumerateGEnericTableWithoutSplaying. svn path=/trunk/; revision=24544
This commit is contained in:
parent
cac3dc3812
commit
d403bc14c4
1 changed files with 40 additions and 12 deletions
|
@ -356,6 +356,44 @@ RtlEnumerateGenericTable(IN PRTL_GENERIC_TABLE Table,
|
|||
return FoundNode ? &((PTABLE_ENTRY_HEADER)FoundNode)->UserData : NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
PVOID
|
||||
NTAPI
|
||||
RtlEnumerateGenericTableWithoutSplaying(IN PRTL_GENERIC_TABLE Table,
|
||||
IN OUT PVOID *RestartKey)
|
||||
{
|
||||
PRTL_SPLAY_LINKS FoundNode;
|
||||
|
||||
/* Check if the table is empty */
|
||||
if (RtlIsGenericTableEmpty(Table)) return NULL;
|
||||
|
||||
/* Check if we have to restart */
|
||||
if (!(*RestartKey))
|
||||
{
|
||||
/* Then find the leftmost element */
|
||||
FoundNode = Table->TableRoot;
|
||||
do
|
||||
{
|
||||
/* Get the left child */
|
||||
FoundNode = RtlLeftChild(FoundNode);
|
||||
} while(RtlLeftChild(FoundNode));
|
||||
|
||||
/* Splay it */
|
||||
*RestartKey = FoundNode;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Otherwise, try using the real successor */
|
||||
FoundNode = RtlRealSuccessor(Table->TableRoot);
|
||||
if (FoundNode) *RestartKey = FoundNode;
|
||||
}
|
||||
|
||||
/* Check if we found the node and return it */
|
||||
return FoundNode ? &((PTABLE_ENTRY_HEADER)FoundNode)->UserData : NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
@ -373,18 +411,6 @@ RtlEnumerateGenericTableLikeADirectory(IN PRTL_AVL_TABLE Table,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
PVOID
|
||||
NTAPI
|
||||
RtlEnumerateGenericTableWithoutSplaying(IN PRTL_GENERIC_TABLE Table,
|
||||
IN OUT PVOID *RestartKey)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
@ -397,6 +423,8 @@ RtlGetElementGenericTable(IN PRTL_GENERIC_TABLE Table,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* AVL FUNCTIONS *************************************************************/
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue