ReactOS  0.4.15-dev-1397-g19779b3
rtlavl.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Runtime Library
3  * LICENSE: BSD - See COPYING.ARM in the top level directory
4  * FILE: lib/rtl/rtlavl.h
5  * PURPOSE: RTL AVL Glue
6  * PROGRAMMERS: ReactOS Portable Systems Group
7  */
8 
9 /* INCLUDES ******************************************************************/
10 
11 /*
12  * This is the glue code for the AVL package in the RTL meant for external callers.
13  * It's not very exciting, it just uses the RTL-defined fields without any magic,
14  * unlike the Mm version which has special handling for balances and parents, and
15  * does not implement custom comparison callbacks.
16  */
17 #define MI_ASSERT(x)
18 #define RtlLeftChildAvl(x) (PRTL_BALANCED_LINKS)(RtlLeftChild(x))
19 #define RtlRightChildAvl(x) (PRTL_BALANCED_LINKS)(RtlRightChild(x))
20 #define RtlParentAvl(x) (PRTL_BALANCED_LINKS)(RtlParent(x))
21 #define RtlRealPredecessorAvl(x) (PRTL_BALANCED_LINKS)(RtlRealPredecessor((PRTL_SPLAY_LINKS)(x)))
22 #define RtlRealSuccessorAvl(x) (PRTL_BALANCED_LINKS)(RtlRealSuccessor((PRTL_SPLAY_LINKS)(x)))
23 #define RtlInsertAsRightChildAvl RtlInsertAsRightChild
24 #define RtlInsertAsLeftChildAvl RtlInsertAsLeftChild
25 #define RtlIsLeftChildAvl RtlIsLeftChild
26 
28 VOID
30  IN PRTL_BALANCED_LINKS Node2)
31 {
32  *Node1 = *Node2;
33 }
34 
38  IN PVOID Buffer,
40 {
41  /* Do the compare */
42  return Table->CompareRoutine(Table,
43  Buffer,
44  UserData);
45 }
46 
48 VOID
51 {
52  Node->Parent = Parent;
53 }
54 
56 VOID
58  IN CHAR Balance)
59 {
60  Node->Balance = Balance;
61 }
62 
64 CHAR
66 {
67  return Node->Balance;
68 }
69 
70 /* EOF */
#define IN
Definition: typedefs.h:39
ASMGENDATA Table[]
Definition: genincdata.c:61
static const UCHAR Balance[]
Definition: usbehci.c:97
FORCEINLINE CHAR RtlBalance(IN PRTL_BALANCED_LINKS Node)
Definition: rtlavl.h:65
char CHAR
Definition: xmlstorage.h:175
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
Definition: acpixf.h:728
FORCEINLINE VOID RtlSetBalance(IN PRTL_BALANCED_LINKS Node, IN CHAR Balance)
Definition: rtlavl.h:57
Definition: bufpool.h:45
FORCEINLINE VOID RtlSetParent(IN PRTL_BALANCED_LINKS Node, IN PRTL_BALANCED_LINKS Parent)
Definition: rtlavl.h:49
#define FORCEINLINE
Definition: wdftypes.h:67
FORCEINLINE VOID RtlpCopyAvlNodeData(IN PRTL_BALANCED_LINKS Node1, IN PRTL_BALANCED_LINKS Node2)
Definition: rtlavl.h:29
enum _RTL_GENERIC_COMPARE_RESULTS RTL_GENERIC_COMPARE_RESULTS
FORCEINLINE RTL_GENERIC_COMPARE_RESULTS RtlpAvlCompareRoutine(IN PRTL_AVL_TABLE Table, IN PVOID Buffer, IN PVOID UserData)
Definition: rtlavl.h:37
Definition: dlist.c:348