mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
- Implement RtlRealPrecessdor and RtlRealSuccessor
svn path=/trunk/; revision=19081
This commit is contained in:
parent
767d56a1d3
commit
aa2893a132
1 changed files with 44 additions and 13 deletions
|
@ -41,31 +41,62 @@ RtlDeleteNoSplay (
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
PRTL_SPLAY_LINKS
|
PRTL_SPLAY_LINKS
|
||||||
NTAPI
|
NTAPI
|
||||||
RtlRealPredecessor (
|
RtlRealPredecessor(PRTL_SPLAY_LINKS Links)
|
||||||
PRTL_SPLAY_LINKS Links
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PRTL_SPLAY_LINKS Child;
|
||||||
return 0;
|
|
||||||
|
/* Get the left child */
|
||||||
|
Child = RtlLeftChild(Links);
|
||||||
|
if (Child)
|
||||||
|
{
|
||||||
|
/* Get right-most child */
|
||||||
|
while (RtlRightChild(Child)) Child = RtlRightChild(Child);
|
||||||
|
return Child;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We don't have a left child, keep looping until we find our parent */
|
||||||
|
Child = Links;
|
||||||
|
while (RtlIsLeftChild(Child)) Child = RtlParent(Child);
|
||||||
|
|
||||||
|
/* The parent should be a right child, return the real predecessor */
|
||||||
|
if (RtlIsRightChild(Child)) return RtlParent(Child);
|
||||||
|
|
||||||
|
/* The parent isn't a right child, so no real precessor for us */
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
PRTL_SPLAY_LINKS
|
PRTL_SPLAY_LINKS
|
||||||
NTAPI
|
NTAPI
|
||||||
RtlRealSuccessor (
|
RtlRealSuccessor(PRTL_SPLAY_LINKS Links)
|
||||||
PRTL_SPLAY_LINKS Links
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PRTL_SPLAY_LINKS Child;
|
||||||
return 0;
|
|
||||||
|
/* Get the right child */
|
||||||
|
Child = RtlRightChild(Links);
|
||||||
|
if (Child)
|
||||||
|
{
|
||||||
|
/* Get left-most child */
|
||||||
|
while (RtlLeftChild(Child)) Child = RtlLeftChild(Child);
|
||||||
|
return Child;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We don't have a right child, keep looping until we find our parent */
|
||||||
|
Child = Links;
|
||||||
|
while (RtlIsRightChild(Child)) Child = RtlParent(Child);
|
||||||
|
|
||||||
|
/* The parent should be a left child, return the real successor */
|
||||||
|
if (RtlIsLeftChild(Child)) return RtlParent(Child);
|
||||||
|
|
||||||
|
/* The parent isn't a right child, so no real successor for us */
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue