#include <rtl.h>
#include <debug.h>
#include "rtlavl.h"
#include "avlsupp.c"
Go to the source code of this file.
|
VOID NTAPI | RtlInitializeGenericTableAvl (IN OUT PRTL_AVL_TABLE Table, IN PRTL_AVL_COMPARE_ROUTINE CompareRoutine, IN PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine, IN PRTL_AVL_FREE_ROUTINE FreeRoutine, IN PVOID TableContext) |
|
PVOID NTAPI | RtlInsertElementGenericTableFullAvl (IN PRTL_AVL_TABLE Table, IN PVOID Buffer, IN ULONG BufferSize, OUT PBOOLEAN NewElement OPTIONAL, IN OUT PVOID NodeOrParent, IN OUT TABLE_SEARCH_RESULT SearchResult) |
|
PVOID NTAPI | RtlInsertElementGenericTableAvl (IN PRTL_AVL_TABLE Table, IN PVOID Buffer, IN ULONG BufferSize, OUT PBOOLEAN NewElement OPTIONAL) |
|
BOOLEAN NTAPI | RtlIsGenericTableEmptyAvl (IN PRTL_AVL_TABLE Table) |
|
ULONG NTAPI | RtlNumberGenericTableElementsAvl (IN PRTL_AVL_TABLE Table) |
|
PVOID NTAPI | RtlLookupElementGenericTableFullAvl (IN PRTL_AVL_TABLE Table, IN PVOID Buffer, IN OUT PVOID *NodeOrParent, IN OUT TABLE_SEARCH_RESULT *SearchResult) |
|
PVOID NTAPI | RtlLookupElementGenericTableAvl (IN PRTL_AVL_TABLE Table, IN PVOID Buffer) |
|
PVOID NTAPI | RtlEnumerateGenericTableAvl (IN PRTL_AVL_TABLE Table, IN BOOLEAN Restart) |
|
PVOID NTAPI | RtlLookupFirstMatchingElementGenericTableAvl (IN PRTL_AVL_TABLE Table, IN PVOID Buffer, OUT PVOID *RestartKey) |
|
PVOID NTAPI | RtlEnumerateGenericTableWithoutSplayingAvl (IN PRTL_AVL_TABLE Table, IN OUT PVOID *RestartKey) |
|
PVOID NTAPI | RtlGetElementGenericTableAvl (IN PRTL_AVL_TABLE Table, IN ULONG I) |
|
BOOLEAN NTAPI | RtlDeleteElementGenericTableAvl (IN PRTL_AVL_TABLE Table, IN PVOID Buffer) |
|
◆ NDEBUG
◆ RtlDeleteElementGenericTableAvl()
Definition at line 297 of file avltable.c.
299{
302
303
305 if (SearchResult != TableFoundNode)
return FALSE;
306
307
309
310
311 Table->DeleteCount++;
313 Table->NumberGenericTableElements--;
314
315
316 Table->WhichOrderedElement = 0;
318
319
321
322
324}
#define RtlpFindAvlTableNodeOrParent
#define RtlpDeleteAvlTreeNode
#define RtlRealPredecessorAvl(x)
◆ RtlEnumerateGenericTableAvl()
Definition at line 188 of file avltable.c.
190{
191
193
194
197}
PVOID NTAPI RtlEnumerateGenericTableWithoutSplayingAvl(IN PRTL_AVL_TABLE Table, IN OUT PVOID *RestartKey)
◆ RtlEnumerateGenericTableWithoutSplayingAvl()
Definition at line 247 of file avltable.c.
249{
251
252
254
255
256 if (!*RestartKey)
257 {
258
262
263
264 *RestartKey = CurrentNode;
265 }
266 else
267 {
268
270
271
272 if (CurrentNode) *RestartKey = CurrentNode;
273 }
274
275
278}
struct _TABLE_ENTRY_HEADER * PTABLE_ENTRY_HEADER
BOOLEAN NTAPI RtlIsGenericTableEmptyAvl(IN PRTL_AVL_TABLE Table)
#define RtlRealSuccessorAvl(x)
Referenced by RtlEnumerateGenericTableAvl().
◆ RtlGetElementGenericTableAvl()
◆ RtlInitializeGenericTableAvl()
Definition at line 26 of file avltable.c.
31{
32
34 Table->BalancedRoot.Parent = &
Table->BalancedRoot;
39}
#define RtlZeroMemory(Destination, Length)
_In_ PRTL_GENERIC_COMPARE_ROUTINE _In_ PRTL_GENERIC_ALLOCATE_ROUTINE _In_ PRTL_GENERIC_FREE_ROUTINE _In_opt_ PVOID TableContext
_In_ PRTL_GENERIC_COMPARE_ROUTINE _In_ PRTL_GENERIC_ALLOCATE_ROUTINE _In_ PRTL_GENERIC_FREE_ROUTINE FreeRoutine
_In_ PRTL_GENERIC_COMPARE_ROUTINE _In_ PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine
_In_ PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine
Referenced by ApphelpCacheInitialize(), PpInitializeDeviceReferenceTable(), and RtlpPageHeapCreate().
◆ RtlInsertElementGenericTableAvl()
Definition at line 103 of file avltable.c.
107{
110
111
113
114
118 NewElement,
119 NodeOrParent,
121}
PVOID NTAPI RtlInsertElementGenericTableFullAvl(IN PRTL_AVL_TABLE Table, IN PVOID Buffer, IN ULONG BufferSize, OUT PBOOLEAN NewElement OPTIONAL, IN OUT PVOID NodeOrParent, IN OUT TABLE_SEARCH_RESULT SearchResult)
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
◆ RtlInsertElementGenericTableFullAvl()
Definition at line 46 of file avltable.c.
52{
55
56
57 if (SearchResult != TableFoundNode)
58 {
59
61
62
67 if (!NewNode)
68 {
69
70 if (NewElement) *NewElement =
FALSE;
72 }
73
74
76
77
80
81
83 }
84 else
85 {
86
87 NewNode = NodeOrParent;
89 }
90
91
92 if (NewElement) *NewElement = (SearchResult != TableFoundNode);
93
94
96}
#define RtlpInsertAvlTreeNode
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
Referenced by RtlInsertElementGenericTableAvl().
◆ RtlIsGenericTableEmptyAvl()
◆ RtlLookupElementGenericTableAvl()
Definition at line 170 of file avltable.c.
172{
175
176
179 (
PVOID*)&NodeOrParent,
181}
PVOID NTAPI RtlLookupElementGenericTableFullAvl(IN PRTL_AVL_TABLE Table, IN PVOID Buffer, IN OUT PVOID *NodeOrParent, IN OUT TABLE_SEARCH_RESULT *SearchResult)
static void Lookup(RTF_Info *, char *)
◆ RtlLookupElementGenericTableFullAvl()
◆ RtlLookupFirstMatchingElementGenericTableAvl()
Definition at line 204 of file avltable.c.
207{
211
212
214
215
217 if (SearchResult != TableFoundNode)
return NULL;
218
219
222 {
223
225
226
228 if ((!PreviousNode) || (
RtlParentAvl(PreviousNode) == PreviousNode))
break;
229
230
235 }
236
237
240}
#define RtlpAvlCompareRoutine
enum _RTL_GENERIC_COMPARE_RESULTS RTL_GENERIC_COMPARE_RESULTS
◆ RtlNumberGenericTableElementsAvl()
Definition at line 139 of file avltable.c.
140{
141
142 return Table->NumberGenericTableElements;
143}