ReactOS 0.4.15-dev-7842-g558ab78
miavl.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PRTL_AVL_TABLE   PMM_AVL_TABLE
 
#define PRTL_BALANCED_LINKS   PMMADDRESS_NODE
 
#define MI_ASSERT(x)   ASSERT(x)
 
#define RtlpFindAvlTableNodeOrParent   MiFindAvlTableNodeOrParent
 
#define RtlpPromoteAvlTreeNode   MiPromoteAvlTreeNode
 
#define RtlpRebalanceAvlTreeNode   MiRebalanceAvlTreeNode
 
#define RtlpInsertAvlTreeNode   MiInsertAvlTreeNode
 
#define RtlpDeleteAvlTreeNode   MiDeleteAvlTreeNode
 
#define RtlpCopyAvlNodeData   MiCopyAvlNodeData
 
#define RtlpAvlCompareRoutine   MiAvlCompareRoutine
 
#define RtlSetParent   MiSetParent
 
#define RtlSetBalance   MiSetBalance
 
#define RtlBalance   MiBalance
 
#define RtlParentAvl   MiParentAvl
 
#define RtlRightChildAvl   MiRightChildAvl
 
#define RtlLeftChildAvl   MiLeftChildAvl
 
#define RtlIsLeftChildAvl   MiIsLeftChildAvl
 
#define RtlIsRightChildAvl   MiIsRightChildAvl
 
#define RtlInsertAsLeftChildAvl   MiInsertAsLeftChildAvl
 
#define RtlInsertAsRightChildAvl   MiInsertAsRightChildAvl
 

Functions

FORCEINLINE VOID MiCopyAvlNodeData (IN PRTL_BALANCED_LINKS Node1, IN PRTL_BALANCED_LINKS Node2)
 
FORCEINLINE RTL_GENERIC_COMPARE_RESULTS MiAvlCompareRoutine (IN PRTL_AVL_TABLE Table, IN PVOID Buffer, IN PVOID UserData)
 
FORCEINLINE VOID MiSetParent (IN PRTL_BALANCED_LINKS Node, IN PRTL_BALANCED_LINKS Parent)
 
FORCEINLINE VOID MiSetBalance (IN PRTL_BALANCED_LINKS Node, IN SCHAR Balance)
 
FORCEINLINE SCHAR MiBalance (IN PRTL_BALANCED_LINKS Node)
 
FORCEINLINE PRTL_BALANCED_LINKS MiParentAvl (IN PRTL_BALANCED_LINKS Node)
 
FORCEINLINE PRTL_BALANCED_LINKS MiRightChildAvl (IN PRTL_BALANCED_LINKS Node)
 
FORCEINLINE PRTL_BALANCED_LINKS MiLeftChildAvl (IN PRTL_BALANCED_LINKS Node)
 
FORCEINLINE BOOLEAN MiIsLeftChildAvl (IN PRTL_BALANCED_LINKS Node)
 
FORCEINLINE BOOLEAN MiIsRightChildAvl (IN PRTL_BALANCED_LINKS Node)
 
FORCEINLINE VOID MiInsertAsLeftChildAvl (IN PRTL_BALANCED_LINKS Parent, IN PRTL_BALANCED_LINKS Node)
 
FORCEINLINE VOID MiInsertAsRightChildAvl (IN PRTL_BALANCED_LINKS Parent, IN PRTL_BALANCED_LINKS Node)
 

Macro Definition Documentation

◆ MI_ASSERT

#define MI_ASSERT (   x)    ASSERT(x)

Definition at line 29 of file miavl.h.

◆ PRTL_AVL_TABLE

Definition at line 27 of file miavl.h.

◆ PRTL_BALANCED_LINKS

Definition at line 28 of file miavl.h.

◆ RtlBalance

#define RtlBalance   MiBalance

Definition at line 43 of file miavl.h.

◆ RtlInsertAsLeftChildAvl

#define RtlInsertAsLeftChildAvl   MiInsertAsLeftChildAvl

Definition at line 49 of file miavl.h.

◆ RtlInsertAsRightChildAvl

#define RtlInsertAsRightChildAvl   MiInsertAsRightChildAvl

Definition at line 50 of file miavl.h.

◆ RtlIsLeftChildAvl

#define RtlIsLeftChildAvl   MiIsLeftChildAvl

Definition at line 47 of file miavl.h.

◆ RtlIsRightChildAvl

#define RtlIsRightChildAvl   MiIsRightChildAvl

Definition at line 48 of file miavl.h.

◆ RtlLeftChildAvl

#define RtlLeftChildAvl   MiLeftChildAvl

Definition at line 46 of file miavl.h.

◆ RtlParentAvl

#define RtlParentAvl   MiParentAvl

Definition at line 44 of file miavl.h.

◆ RtlpAvlCompareRoutine

#define RtlpAvlCompareRoutine   MiAvlCompareRoutine

Definition at line 40 of file miavl.h.

◆ RtlpCopyAvlNodeData

#define RtlpCopyAvlNodeData   MiCopyAvlNodeData

Definition at line 39 of file miavl.h.

◆ RtlpDeleteAvlTreeNode

#define RtlpDeleteAvlTreeNode   MiDeleteAvlTreeNode

Definition at line 36 of file miavl.h.

◆ RtlpFindAvlTableNodeOrParent

#define RtlpFindAvlTableNodeOrParent   MiFindAvlTableNodeOrParent

Definition at line 32 of file miavl.h.

◆ RtlpInsertAvlTreeNode

#define RtlpInsertAvlTreeNode   MiInsertAvlTreeNode

Definition at line 35 of file miavl.h.

◆ RtlpPromoteAvlTreeNode

#define RtlpPromoteAvlTreeNode   MiPromoteAvlTreeNode

Definition at line 33 of file miavl.h.

◆ RtlpRebalanceAvlTreeNode

#define RtlpRebalanceAvlTreeNode   MiRebalanceAvlTreeNode

Definition at line 34 of file miavl.h.

◆ RtlRightChildAvl

#define RtlRightChildAvl   MiRightChildAvl

Definition at line 45 of file miavl.h.

◆ RtlSetBalance

#define RtlSetBalance   MiSetBalance

Definition at line 42 of file miavl.h.

◆ RtlSetParent

#define RtlSetParent   MiSetParent

Definition at line 41 of file miavl.h.

Function Documentation

◆ MiAvlCompareRoutine()

FORCEINLINE RTL_GENERIC_COMPARE_RESULTS MiAvlCompareRoutine ( IN PRTL_AVL_TABLE  Table,
IN PVOID  Buffer,
IN PVOID  UserData 
)

Definition at line 64 of file miavl.h.

67{
69 ULONG_PTR StartingVpn = (ULONG_PTR)Buffer;
70 if (StartingVpn < CurrentNode->StartingVpn)
71 {
72 return GenericLessThan;
73 }
74 else if (StartingVpn <= CurrentNode->EndingVpn)
75 {
76 return GenericEqual;
77 }
78 else
79 {
80 return GenericGreaterThan;
81 }
82}
Definition: bufpool.h:45
#define ULONG_PTR
Definition: config.h:101
void * PVOID
Definition: typedefs.h:50
uint32_t ULONG_PTR
Definition: typedefs.h:65
struct _RTL_BALANCED_LINKS RTL_BALANCED_LINKS
@ GenericLessThan
Definition: rtltypes.h:376
@ GenericEqual
Definition: rtltypes.h:378
@ GenericGreaterThan
Definition: rtltypes.h:377

◆ MiBalance()

FORCEINLINE SCHAR MiBalance ( IN PRTL_BALANCED_LINKS  Node)

Definition at line 102 of file miavl.h.

103{
104 return (SCHAR)Node->u1.Balance;
105}
signed char SCHAR
Definition: sqltypes.h:14
Definition: dlist.c:348

◆ MiCopyAvlNodeData()

FORCEINLINE VOID MiCopyAvlNodeData ( IN PRTL_BALANCED_LINKS  Node1,
IN PRTL_BALANCED_LINKS  Node2 
)

Definition at line 54 of file miavl.h.

56{
57 Node1->u1.Parent = Node2->u1.Parent;
58 Node1->LeftChild = Node2->LeftChild;
59 Node1->RightChild = Node2->RightChild;
60}

◆ MiInsertAsLeftChildAvl()

FORCEINLINE VOID MiInsertAsLeftChildAvl ( IN PRTL_BALANCED_LINKS  Parent,
IN PRTL_BALANCED_LINKS  Node 
)

Definition at line 144 of file miavl.h.

146{
147 Parent->LeftChild = Node;
149}
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx 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:732
union node Node
Definition: types.h:1255
#define RtlSetParent
Definition: miavl.h:41

◆ MiInsertAsRightChildAvl()

FORCEINLINE VOID MiInsertAsRightChildAvl ( IN PRTL_BALANCED_LINKS  Parent,
IN PRTL_BALANCED_LINKS  Node 
)

Definition at line 153 of file miavl.h.

155{
156 Parent->RightChild = Node;
158}

◆ MiIsLeftChildAvl()

FORCEINLINE BOOLEAN MiIsLeftChildAvl ( IN PRTL_BALANCED_LINKS  Node)

Definition at line 130 of file miavl.h.

131{
133}
#define RtlParentAvl
Definition: miavl.h:44
#define RtlLeftChildAvl
Definition: miavl.h:46

◆ MiIsRightChildAvl()

FORCEINLINE BOOLEAN MiIsRightChildAvl ( IN PRTL_BALANCED_LINKS  Node)

Definition at line 137 of file miavl.h.

138{
140}
#define RtlRightChildAvl
Definition: miavl.h:45

◆ MiLeftChildAvl()

Definition at line 123 of file miavl.h.

124{
125 return Node->LeftChild;
126}

◆ MiParentAvl()

Definition at line 109 of file miavl.h.

110{
111 return (PRTL_BALANCED_LINKS)((ULONG_PTR)Node->u1.Parent & ~3);
112}

◆ MiRightChildAvl()

Definition at line 116 of file miavl.h.

117{
118 return Node->RightChild;
119}

◆ MiSetBalance()

FORCEINLINE VOID MiSetBalance ( IN PRTL_BALANCED_LINKS  Node,
IN SCHAR  Balance 
)

Definition at line 94 of file miavl.h.

96{
97 Node->u1.Balance = Balance;
98}
static const UCHAR Balance[]
Definition: usbehci.c:97

◆ MiSetParent()

FORCEINLINE VOID MiSetParent ( IN PRTL_BALANCED_LINKS  Node,
IN PRTL_BALANCED_LINKS  Parent 
)

Definition at line 86 of file miavl.h.

88{
89 Node->u1.Parent = (PRTL_BALANCED_LINKS)((ULONG_PTR)Parent | (Node->u1.Balance & 0x3));
90}
#define PRTL_BALANCED_LINKS
Definition: miavl.h:28