Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenrtlavl.h
Go to the documentation of this file.
00001 /* 00002 * PROJECT: ReactOS Runtime Library 00003 * LICENSE: BSD - See COPYING.ARM in the top level directory 00004 * FILE: lib/rtl/rtlavl.h 00005 * PURPOSE: RTL AVL Glue 00006 * PROGRAMMERS: ReactOS Portable Systems Group 00007 */ 00008 00009 /* INCLUDES ******************************************************************/ 00010 00011 /* 00012 * This is the glue code for the AVL package in the RTL meant for external callers. 00013 * It's not very exciting, it just uses the RTL-defined fields without any magic, 00014 * unlike the Mm version which has special handling for balances and parents, and 00015 * does not implement custom comparison callbacks. 00016 */ 00017 #define MI_ASSERT(x) 00018 #define RtlLeftChildAvl(x) (PRTL_BALANCED_LINKS)(RtlLeftChild(x)) 00019 #define RtlRightChildAvl(x) (PRTL_BALANCED_LINKS)(RtlRightChild(x)) 00020 #define RtlParentAvl(x) (PRTL_BALANCED_LINKS)(RtlParent(x)) 00021 #define RtlRealPredecessorAvl(x) (PRTL_BALANCED_LINKS)(RtlRealPredecessor((PRTL_SPLAY_LINKS)(x))) 00022 #define RtlRealSuccessorAvl(x) (PRTL_BALANCED_LINKS)(RtlRealSuccessor((PRTL_SPLAY_LINKS)(x))) 00023 #define RtlInsertAsRightChildAvl RtlInsertAsRightChild 00024 #define RtlInsertAsLeftChildAvl RtlInsertAsLeftChild 00025 #define RtlIsLeftChildAvl RtlIsLeftChild 00026 00027 VOID 00028 FORCEINLINE 00029 RtlpCopyAvlNodeData(IN PRTL_BALANCED_LINKS Node1, 00030 IN PRTL_BALANCED_LINKS Node2) 00031 { 00032 *Node1 = *Node2; 00033 } 00034 00035 RTL_GENERIC_COMPARE_RESULTS 00036 FORCEINLINE 00037 RtlpAvlCompareRoutine(IN PRTL_AVL_TABLE Table, 00038 IN PVOID Buffer, 00039 IN PVOID UserData) 00040 { 00041 /* Do the compare */ 00042 return Table->CompareRoutine(Table, 00043 Buffer, 00044 UserData); 00045 } 00046 00047 VOID 00048 FORCEINLINE 00049 RtlSetParent(IN PRTL_BALANCED_LINKS Node, 00050 IN PRTL_BALANCED_LINKS Parent) 00051 { 00052 Node->Parent = Parent; 00053 } 00054 00055 VOID 00056 FORCEINLINE 00057 RtlSetBalance(IN PRTL_BALANCED_LINKS Node, 00058 IN CHAR Balance) 00059 { 00060 Node->Balance = Balance; 00061 } 00062 00063 CHAR 00064 FORCEINLINE 00065 RtlBalance(IN PRTL_BALANCED_LINKS Node) 00066 { 00067 return Node->Balance; 00068 } 00069 00070 /* EOF */ Generated on Fri May 25 2012 04:34:51 for ReactOS by
1.7.6.1
|