From 7c42b991f3821c39ade79aa9c00af599813326c1 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Tue, 17 Oct 2006 04:20:48 +0000 Subject: [PATCH] - One school day and two midterms later, I'm still the only one with enough time to fix a header. Can't wait to see who will be up for trying to fix booting... svn path=/trunk/; revision=24550 --- reactos/include/ddk/ntifs.h | 101 +++++++++++++++++++++++++++++++-- reactos/include/ndk/rtlfuncs.h | 2 + 2 files changed, 98 insertions(+), 5 deletions(-) diff --git a/reactos/include/ddk/ntifs.h b/reactos/include/ddk/ntifs.h index cd0f86f769b..cd576bd6cb1 100644 --- a/reactos/include/ddk/ntifs.h +++ b/reactos/include/ddk/ntifs.h @@ -1363,6 +1363,66 @@ typedef struct _PRIVATE_CACHE_MAP { #endif +typedef enum _RTL_GENERIC_COMPARE_RESULTS +{ + GenericLessThan, + GenericGreaterThan, + GenericEqual +} RTL_GENERIC_COMPARE_RESULTS; + +typedef enum _TABLE_SEARCH_RESULT +{ + TableEmptyTree, + TableFoundNode, + TableInsertAsLeft, + TableInsertAsRight +} TABLE_SEARCH_RESULT; + +typedef NTSTATUS +(NTAPI *PRTL_AVL_MATCH_FUNCTION)( + struct _RTL_AVL_TABLE *Table, + PVOID UserData, + PVOID MatchData +); + +typedef RTL_GENERIC_COMPARE_RESULTS +(NTAPI *PRTL_AVL_COMPARE_ROUTINE) ( + struct _RTL_AVL_TABLE *Table, + PVOID FirstStruct, + PVOID SecondStruct +); + +typedef RTL_GENERIC_COMPARE_RESULTS +(NTAPI *PRTL_GENERIC_COMPARE_ROUTINE) ( + struct _RTL_GENERIC_TABLE *Table, + PVOID FirstStruct, + PVOID SecondStruct +); + +typedef PVOID +(NTAPI *PRTL_GENERIC_ALLOCATE_ROUTINE) ( + struct _RTL_GENERIC_TABLE *Table, + CLONG ByteSize +); + +typedef VOID +(NTAPI *PRTL_GENERIC_FREE_ROUTINE) ( + struct _RTL_GENERIC_TABLE *Table, + PVOID Buffer +); + +typedef PVOID +(NTAPI *PRTL_AVL_ALLOCATE_ROUTINE) ( + struct _RTL_AVL_TABLE *Table, + CLONG ByteSize +); + +typedef VOID +(NTAPI *PRTL_AVL_FREE_ROUTINE) ( + struct _RTL_AVL_TABLE *Table, + PVOID Buffer +); + typedef struct _PUBLIC_BCB { CSHORT NodeTypeCode; CSHORT NodeByteSize; @@ -1395,12 +1455,43 @@ typedef struct _RTL_SPLAY_LINKS { struct _RTL_SPLAY_LINKS *RightChild; } RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS; -typedef enum _RTL_GENERIC_COMPARE_RESULTS +typedef struct _RTL_BALANCED_LINKS { - GenericLessThan, - GenericGreaterThan, - GenericEqual -} RTL_GENERIC_COMPARE_RESULTS; + struct _RTL_BALANCED_LINKS *Parent; + struct _RTL_BALANCED_LINKS *LeftChild; + struct _RTL_BALANCED_LINKS *RightChild; + CHAR Balance; + UCHAR Reserved[3]; +} RTL_BALANCED_LINKS, *PRTL_BALANCED_LINKS; + +typedef struct _RTL_GENERIC_TABLE +{ + PRTL_SPLAY_LINKS TableRoot; + LIST_ENTRY InsertOrderList; + PLIST_ENTRY OrderedPointer; + ULONG WhichOrderedElement; + ULONG NumberGenericTableElements; + PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine; + PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine; + PRTL_GENERIC_FREE_ROUTINE FreeRoutine; + PVOID TableContext; +} RTL_GENERIC_TABLE, *PRTL_GENERIC_TABLE; + +typedef struct _RTL_AVL_TABLE +{ + RTL_BALANCED_LINKS BalancedRoot; + PVOID OrderedPointer; + ULONG WhichOrderedElement; + ULONG NumberGenericTableElements; + ULONG DepthOfTree; + PRTL_BALANCED_LINKS RestartKey; + ULONG DeleteCount; + PRTL_AVL_COMPARE_ROUTINE CompareRoutine; + PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine; + PRTL_AVL_FREE_ROUTINE FreeRoutine; + PVOID TableContext; +} RTL_AVL_TABLE, *PRTL_AVL_TABLE; + #if defined(USE_LPC6432) #define LPC_CLIENT_ID CLIENT_ID64 diff --git a/reactos/include/ndk/rtlfuncs.h b/reactos/include/ndk/rtlfuncs.h index 9fcc7d037f6..9d3eed254e3 100644 --- a/reactos/include/ndk/rtlfuncs.h +++ b/reactos/include/ndk/rtlfuncs.h @@ -2507,6 +2507,7 @@ DbgBreakPoint(VOID); // // Generic Table Functions // +#if defined(NTOS_MODE_USER) || defined(_NTIFS_) PVOID NTAPI RtlInsertElementGenericTable( @@ -2541,6 +2542,7 @@ RtlLookupElementGenericTableFull( OUT PVOID *NodeOrParent, OUT TABLE_SEARCH_RESULT *SearchResult ); +#endif // // Handle Table Functions