mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 21:11:54 +00:00
Create a branch for cmake bringup.
svn path=/branches/cmake-bringup/; revision=48236
This commit is contained in:
parent
a28e798006
commit
c424146e2c
20602 changed files with 0 additions and 1140137 deletions
70
lib/rtl/rtlavl.h
Normal file
70
lib/rtl/rtlavl.h
Normal file
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Runtime Library
|
||||
* LICENSE: BSD - See COPYING.ARM in the top level directory
|
||||
* FILE: lib/rtl/rtlavl.h
|
||||
* PURPOSE: RTL AVL Glue
|
||||
* PROGRAMMERS: ReactOS Portable Systems Group
|
||||
*/
|
||||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
/*
|
||||
* This is the glue code for the AVL package in the RTL meant for external callers.
|
||||
* It's not very exciting, it just uses the RTL-defined fields without any magic,
|
||||
* unlike the Mm version which has special handling for balances and parents, and
|
||||
* does not implement custom comparison callbacks.
|
||||
*/
|
||||
#define MI_ASSERT(x)
|
||||
#define RtlLeftChildAvl(x) (PRTL_BALANCED_LINKS)(RtlLeftChild(x))
|
||||
#define RtlRightChildAvl(x) (PRTL_BALANCED_LINKS)(RtlRightChild(x))
|
||||
#define RtlParentAvl(x) (PRTL_BALANCED_LINKS)(RtlParent(x))
|
||||
#define RtlRealPredecessorAvl(x) (PRTL_BALANCED_LINKS)(RtlRealPredecessor((PRTL_SPLAY_LINKS)(x)))
|
||||
#define RtlRealSuccessorAvl(x) (PRTL_BALANCED_LINKS)(RtlRealSuccessor((PRTL_SPLAY_LINKS)(x)))
|
||||
#define RtlInsertAsRightChildAvl RtlInsertAsRightChild
|
||||
#define RtlInsertAsLeftChildAvl RtlInsertAsLeftChild
|
||||
#define RtlIsLeftChildAvl RtlIsLeftChild
|
||||
|
||||
VOID
|
||||
FORCEINLINE
|
||||
RtlpCopyAvlNodeData(IN PRTL_BALANCED_LINKS Node1,
|
||||
IN PRTL_BALANCED_LINKS Node2)
|
||||
{
|
||||
*Node1 = *Node2;
|
||||
}
|
||||
|
||||
RTL_GENERIC_COMPARE_RESULTS
|
||||
FORCEINLINE
|
||||
RtlpAvlCompareRoutine(IN PRTL_AVL_TABLE Table,
|
||||
IN PVOID Buffer,
|
||||
IN PVOID UserData)
|
||||
{
|
||||
/* Do the compare */
|
||||
return Table->CompareRoutine(Table,
|
||||
Buffer,
|
||||
UserData);
|
||||
}
|
||||
|
||||
VOID
|
||||
FORCEINLINE
|
||||
RtlSetParent(IN PRTL_BALANCED_LINKS Node,
|
||||
IN PRTL_BALANCED_LINKS Parent)
|
||||
{
|
||||
Node->Parent = Parent;
|
||||
}
|
||||
|
||||
VOID
|
||||
FORCEINLINE
|
||||
RtlSetBalance(IN PRTL_BALANCED_LINKS Node,
|
||||
IN CHAR Balance)
|
||||
{
|
||||
Node->Balance = Balance;
|
||||
}
|
||||
|
||||
CHAR
|
||||
FORCEINLINE
|
||||
RtlBalance(IN PRTL_BALANCED_LINKS Node)
|
||||
{
|
||||
return Node->Balance;
|
||||
}
|
||||
|
||||
/* EOF */
|
Loading…
Add table
Add a link
Reference in a new issue