Author: tfaber
Date: Fri Aug 5 01:20:28 2011
New Revision: 53073
URL:
http://svn.reactos.org/svn/reactos?rev=53073&view=rev
Log:
[DDK/XDK]
- Add function types, not only function pointer types, for splay/avl tree functions
- RTL_SPLAY_LINKS needs to be defined regardless of RTL_USE_AVL_TABLES
[NDK]
- Add missing splay/avl tree function declarations
- Add the function types as well. These are also not in ntifs anymore
Modified:
trunk/reactos/include/ddk/ntddk.h
trunk/reactos/include/ndk/rtlfuncs.h
trunk/reactos/include/ndk/rtltypes.h
trunk/reactos/include/xdk/rtltypes.h
Modified: trunk/reactos/include/ddk/ntddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntddk.h?rev=53…
==============================================================================
--- trunk/reactos/include/ddk/ntddk.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntddk.h [iso-8859-1] Fri Aug 5 01:20:28 2011
@@ -2690,26 +2690,30 @@
struct _RTL_AVL_TABLE;
typedef RTL_GENERIC_COMPARE_RESULTS
-(NTAPI *PRTL_AVL_COMPARE_ROUTINE) (
+(NTAPI RTL_AVL_COMPARE_ROUTINE) (
IN struct _RTL_AVL_TABLE *Table,
IN PVOID FirstStruct,
IN PVOID SecondStruct);
+typedef RTL_AVL_COMPARE_ROUTINE *PRTL_AVL_COMPARE_ROUTINE;
typedef PVOID
-(NTAPI *PRTL_AVL_ALLOCATE_ROUTINE) (
+(NTAPI RTL_AVL_ALLOCATE_ROUTINE) (
IN struct _RTL_AVL_TABLE *Table,
IN CLONG ByteSize);
+typedef RTL_AVL_ALLOCATE_ROUTINE *PRTL_AVL_ALLOCATE_ROUTINE;
typedef VOID
-(NTAPI *PRTL_AVL_FREE_ROUTINE) (
+(NTAPI RTL_AVL_FREE_ROUTINE) (
IN struct _RTL_AVL_TABLE *Table,
IN PVOID Buffer);
+typedef RTL_AVL_FREE_ROUTINE *PRTL_AVL_FREE_ROUTINE;
typedef NTSTATUS
-(NTAPI *PRTL_AVL_MATCH_FUNCTION) (
+(NTAPI RTL_AVL_MATCH_FUNCTION) (
IN struct _RTL_AVL_TABLE *Table,
IN PVOID UserData,
IN PVOID MatchData);
+typedef RTL_AVL_MATCH_FUNCTION *PRTL_AVL_MATCH_FUNCTION;
typedef struct _RTL_BALANCED_LINKS {
struct _RTL_BALANCED_LINKS *Parent;
@@ -2733,31 +2737,34 @@
PVOID TableContext;
} RTL_AVL_TABLE, *PRTL_AVL_TABLE;
-#ifndef RTL_USE_AVL_TABLES
-
-struct _RTL_GENERIC_TABLE;
-
-typedef RTL_GENERIC_COMPARE_RESULTS
-(NTAPI *PRTL_GENERIC_COMPARE_ROUTINE) (
- IN struct _RTL_GENERIC_TABLE *Table,
- IN PVOID FirstStruct,
- IN PVOID SecondStruct);
-
-typedef PVOID
-(NTAPI *PRTL_GENERIC_ALLOCATE_ROUTINE) (
- IN struct _RTL_GENERIC_TABLE *Table,
- IN CLONG ByteSize);
-
-typedef VOID
-(NTAPI *PRTL_GENERIC_FREE_ROUTINE) (
- IN struct _RTL_GENERIC_TABLE *Table,
- IN PVOID Buffer);
-
typedef struct _RTL_SPLAY_LINKS {
struct _RTL_SPLAY_LINKS *Parent;
struct _RTL_SPLAY_LINKS *LeftChild;
struct _RTL_SPLAY_LINKS *RightChild;
} RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS;
+
+#ifndef RTL_USE_AVL_TABLES
+
+struct _RTL_GENERIC_TABLE;
+
+typedef RTL_GENERIC_COMPARE_RESULTS
+(NTAPI RTL_GENERIC_COMPARE_ROUTINE) (
+ IN struct _RTL_GENERIC_TABLE *Table,
+ IN PVOID FirstStruct,
+ IN PVOID SecondStruct);
+typedef RTL_GENERIC_COMPARE_ROUTINE *PRTL_GENERIC_COMPARE_ROUTINE;
+
+typedef PVOID
+(NTAPI RTL_GENERIC_ALLOCATE_ROUTINE) (
+ IN struct _RTL_GENERIC_TABLE *Table,
+ IN CLONG ByteSize);
+typedef RTL_GENERIC_ALLOCATE_ROUTINE *PRTL_GENERIC_ALLOCATE_ROUTINE;
+
+typedef VOID
+(NTAPI RTL_GENERIC_FREE_ROUTINE) (
+ IN struct _RTL_GENERIC_TABLE *Table,
+ IN PVOID Buffer);
+typedef RTL_GENERIC_FREE_ROUTINE *PRTL_GENERIC_FREE_ROUTINE;
typedef struct _RTL_GENERIC_TABLE {
PRTL_SPLAY_LINKS TableRoot;
@@ -2775,23 +2782,23 @@
#ifdef RTL_USE_AVL_TABLES
+#undef RTL_GENERIC_COMPARE_ROUTINE
#undef PRTL_GENERIC_COMPARE_ROUTINE
-#undef RTL_GENERIC_COMPARE_ROUTINE
+#undef RTL_GENERIC_ALLOCATE_ROUTINE
#undef PRTL_GENERIC_ALLOCATE_ROUTINE
-#undef RTL_GENERIC_ALLOCATE_ROUTINE
+#undef RTL_GENERIC_FREE_ROUTINE
#undef PRTL_GENERIC_FREE_ROUTINE
-#undef RTL_GENERIC_FREE_ROUTINE
-#undef RTL_GENERIC_TABLE
+#undef RTL_GENERIC_TABLE
#undef PRTL_GENERIC_TABLE
-#define PRTL_GENERIC_COMPARE_ROUTINE PRTL_AVL_COMPARE_ROUTINE
-#define RTL_GENERIC_COMPARE_ROUTINE RTL_AVL_COMPARE_ROUTINE
-#define PRTL_GENERIC_ALLOCATE_ROUTINE PRTL_AVL_ALLOCATE_ROUTINE
-#define RTL_GENERIC_ALLOCATE_ROUTINE RTL_AVL_ALLOCATE_ROUTINE
-#define PRTL_GENERIC_FREE_ROUTINE PRTL_AVL_FREE_ROUTINE
-#define RTL_GENERIC_FREE_ROUTINE RTL_AVL_FREE_ROUTINE
-#define RTL_GENERIC_TABLE RTL_AVL_TABLE
-#define PRTL_GENERIC_TABLE PRTL_AVL_TABLE
+#define RTL_GENERIC_COMPARE_ROUTINE RTL_AVL_COMPARE_ROUTINE
+#define PRTL_GENERIC_COMPARE_ROUTINE PRTL_AVL_COMPARE_ROUTINE
+#define RTL_GENERIC_ALLOCATE_ROUTINE RTL_AVL_ALLOCATE_ROUTINE
+#define PRTL_GENERIC_ALLOCATE_ROUTINE PRTL_AVL_ALLOCATE_ROUTINE
+#define RTL_GENERIC_FREE_ROUTINE RTL_AVL_FREE_ROUTINE
+#define PRTL_GENERIC_FREE_ROUTINE PRTL_AVL_FREE_ROUTINE
+#define RTL_GENERIC_TABLE RTL_AVL_TABLE
+#define PRTL_GENERIC_TABLE PRTL_AVL_TABLE
#endif /* RTL_USE_AVL_TABLES */
Modified: trunk/reactos/include/ndk/rtlfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev…
==============================================================================
--- trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] Fri Aug 5 01:20:28 2011
@@ -171,7 +171,7 @@
UnicodeString->MaximumLength = BufferSize;
UnicodeString->Buffer = Buffer;
}
-
+
FORCEINLINE
VOID
RtlInitEmptyAnsiString(OUT PANSI_STRING AnsiString,
@@ -244,6 +244,107 @@
//
// RTL Splay Tree Functions
//
+#ifndef RTL_USE_AVL_TABLES
+
+NTSYSAPI
+VOID
+NTAPI
+RtlInitializeGenericTable(
+ OUT PRTL_GENERIC_TABLE Table,
+ IN PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine,
+ IN PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine,
+ IN PRTL_GENERIC_FREE_ROUTINE FreeRoutine,
+ IN PVOID TableContext OPTIONAL
+);
+
+NTSYSAPI
+PVOID
+NTAPI
+RtlInsertElementGenericTable(
+ IN PRTL_GENERIC_TABLE Table,
+ IN PVOID Buffer,
+ IN CLONG BufferSize,
+ OUT PBOOLEAN NewElement OPTIONAL
+);
+
+NTSYSAPI
+PVOID
+NTAPI
+RtlInsertElementGenericTableFull(
+ IN PRTL_GENERIC_TABLE Table,
+ IN PVOID Buffer,
+ IN CLONG BufferSize,
+ OUT PBOOLEAN NewElement OPTIONAL,
+ IN PVOID NodeOrParent,
+ IN TABLE_SEARCH_RESULT SearchResult
+);
+
+NTSYSAPI
+BOOLEAN
+NTAPI
+RtlDeleteElementGenericTable(
+ IN PRTL_GENERIC_TABLE Table,
+ IN PVOID Buffer
+);
+
+NTSYSAPI
+PVOID
+NTAPI
+RtlLookupElementGenericTable(
+ IN PRTL_GENERIC_TABLE Table,
+ IN PVOID Buffer
+);
+
+NTSYSAPI
+PVOID
+NTAPI
+RtlLookupElementGenericTableFull(
+ IN PRTL_GENERIC_TABLE Table,
+ IN PVOID Buffer,
+ OUT PVOID *NodeOrParent,
+ OUT TABLE_SEARCH_RESULT *SearchResult
+);
+
+NTSYSAPI
+PVOID
+NTAPI
+RtlEnumerateGenericTable(
+ IN PRTL_GENERIC_TABLE Table,
+ IN BOOLEAN Restart
+);
+
+NTSYSAPI
+PVOID
+NTAPI
+RtlEnumerateGenericTableWithoutSplaying(
+ IN PRTL_GENERIC_TABLE Table,
+ IN OUT PVOID *RestartKey
+);
+
+NTSYSAPI
+PVOID
+NTAPI
+RtlGetElementGenericTable(
+ IN PRTL_GENERIC_TABLE Table,
+ IN ULONG I
+);
+
+NTSYSAPI
+ULONG
+NTAPI
+RtlNumberGenericTableElements(
+ IN PRTL_GENERIC_TABLE Table
+);
+
+NTSYSAPI
+BOOLEAN
+NTAPI
+RtlIsGenericTableEmpty(
+ IN PRTL_GENERIC_TABLE Table
+);
+
+#endif /* !RTL_USE_AVL_TABLES */
+
NTSYSAPI
PRTL_SPLAY_LINKS
NTAPI
@@ -254,7 +355,8 @@
NTSYSAPI
PRTL_SPLAY_LINKS
NTAPI
-RtlDelete(IN PRTL_SPLAY_LINKS Links
+RtlDelete(
+ IN PRTL_SPLAY_LINKS Links
);
NTSYSAPI
@@ -339,7 +441,7 @@
_SplayParent->RightChild = _SplayChild; \
_SplayChild->Parent = _SplayParent; \
}
-
+
//
// RTL AVL Tree Functions
//
@@ -461,8 +563,24 @@
RtlIsGenericTableEmptyAvl(
IN PRTL_AVL_TABLE Table
);
-
-#endif
+
+#ifdef RTL_USE_AVL_TABLES
+
+#define RtlInitializeGenericTable RtlInitializeGenericTableAvl
+#define RtlInsertElementGenericTable RtlInsertElementGenericTableAvl
+#define RtlInsertElementGenericTableFull RtlInsertElementGenericTableFullAvl
+#define RtlDeleteElementGenericTable RtlDeleteElementGenericTableAvl
+#define RtlLookupElementGenericTable RtlLookupElementGenericTableAvl
+#define RtlLookupElementGenericTableFull RtlLookupElementGenericTableFullAvl
+#define RtlEnumerateGenericTable RtlEnumerateGenericTableAvl
+#define RtlEnumerateGenericTableWithoutSplaying
RtlEnumerateGenericTableWithoutSplayingAvl
+#define RtlGetElementGenericTable RtlGetElementGenericTableAvl
+#define RtlNumberGenericTableElements RtlNumberGenericTableElementsAvl
+#define RtlIsGenericTableEmpty RtlIsGenericTableEmptyAvl
+
+#endif /* RTL_USE_AVL_TABLES */
+
+#endif /* NTOS_MODE_USER */
//
// Error and Exception Functions
@@ -2805,7 +2923,7 @@
RtlInitializeRangeList(
IN OUT PRTL_RANGE_LIST RangeList
);
-
+
NTSYSAPI
VOID
NTAPI
Modified: trunk/reactos/include/ndk/rtltypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtltypes.h?rev…
==============================================================================
--- trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/rtltypes.h [iso-8859-1] Fri Aug 5 01:20:28 2011
@@ -296,13 +296,13 @@
#define RTL_INIT_OBJECT_ATTRIBUTES(n, a) \
RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a)
-#else
+#else /* NTOS_MODE_USER */
//
// Message Resource Flag
//
#define MESSAGE_RESOURCE_UNICODE 0x0001
-#endif
+#endif /* !NTOS_MODE_USER */
#define MAXIMUM_LEADBYTES 12
//
@@ -350,7 +350,7 @@
(__SOURCE_STRING__) \
}
-#endif
+#endif /* NTOS_MODE_USER */
#ifdef NTOS_MODE_USER
@@ -372,7 +372,7 @@
GenericEqual
} RTL_GENERIC_COMPARE_RESULTS;
-#endif
+#endif /* NTOS_MODE_USER */
//
// RTL Path Types
@@ -425,7 +425,7 @@
IN PVOID Context
);
-#else
+#else /* !NTOS_MODE_USER */
//
// Handler during regular RTL Exceptions
@@ -462,7 +462,7 @@
extern const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine;
extern const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine;
-#endif
+#endif /* NTOS_MODE_USER */
//
// Callback for RTL Heap Enumeration
@@ -497,52 +497,76 @@
//
// Routines and callbacks for the RTL AVL/Generic Table package
//
-#if defined(NTOS_MODE_USER) || (!defined(NTOS_MODE_USER) && !defined(_NTIFS_))
+#ifdef NTOS_MODE_USER
typedef NTSTATUS
-(NTAPI *PRTL_AVL_MATCH_FUNCTION)(
+(NTAPI RTL_AVL_MATCH_FUNCTION)(
struct _RTL_AVL_TABLE *Table,
PVOID UserData,
PVOID MatchData
);
+typedef RTL_AVL_MATCH_FUNCTION *PRTL_AVL_MATCH_FUNCTION;
typedef RTL_GENERIC_COMPARE_RESULTS
-(NTAPI *PRTL_AVL_COMPARE_ROUTINE) (
+(NTAPI RTL_AVL_COMPARE_ROUTINE) (
struct _RTL_AVL_TABLE *Table,
PVOID FirstStruct,
PVOID SecondStruct
);
+typedef RTL_AVL_COMPARE_ROUTINE *PRTL_AVL_COMPARE_ROUTINE;
typedef RTL_GENERIC_COMPARE_RESULTS
-(NTAPI *PRTL_GENERIC_COMPARE_ROUTINE) (
+(NTAPI RTL_GENERIC_COMPARE_ROUTINE) (
struct _RTL_GENERIC_TABLE *Table,
PVOID FirstStruct,
PVOID SecondStruct
);
+typedef RTL_GENERIC_COMPARE_ROUTINE *PRTL_GENERIC_COMPARE_ROUTINE;
typedef PVOID
-(NTAPI *PRTL_GENERIC_ALLOCATE_ROUTINE) (
+(NTAPI RTL_GENERIC_ALLOCATE_ROUTINE) (
struct _RTL_GENERIC_TABLE *Table,
CLONG ByteSize
);
+typedef RTL_GENERIC_ALLOCATE_ROUTINE *PRTL_GENERIC_ALLOCATE_ROUTINE;
+
+typedef PVOID
+(NTAPI RTL_AVL_ALLOCATE_ROUTINE) (
+ struct _RTL_AVL_TABLE *Table,
+ CLONG ByteSize
+);
+typedef RTL_AVL_ALLOCATE_ROUTINE *PRTL_AVL_ALLOCATE_ROUTINE;
typedef VOID
-(NTAPI *PRTL_GENERIC_FREE_ROUTINE) (
+(NTAPI RTL_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 RTL_GENERIC_FREE_ROUTINE *PRTL_GENERIC_FREE_ROUTINE;
typedef VOID
-(NTAPI *PRTL_AVL_FREE_ROUTINE) (
+(NTAPI RTL_AVL_FREE_ROUTINE) (
struct _RTL_AVL_TABLE *Table,
PVOID Buffer
);
-#endif
+typedef RTL_AVL_FREE_ROUTINE *PRTL_AVL_FREE_ROUTINE;
+
+#ifdef RTL_USE_AVL_TABLES
+#undef RTL_GENERIC_COMPARE_ROUTINE
+#undef PRTL_GENERIC_COMPARE_ROUTINE
+#undef RTL_GENERIC_ALLOCATE_ROUTINE
+#undef PRTL_GENERIC_ALLOCATE_ROUTINE
+#undef RTL_GENERIC_FREE_ROUTINE
+#undef PRTL_GENERIC_FREE_ROUTINE
+
+#define RTL_GENERIC_COMPARE_ROUTINE RTL_AVL_COMPARE_ROUTINE
+#define PRTL_GENERIC_COMPARE_ROUTINE PRTL_AVL_COMPARE_ROUTINE
+#define RTL_GENERIC_ALLOCATE_ROUTINE RTL_AVL_ALLOCATE_ROUTINE
+#define PRTL_GENERIC_ALLOCATE_ROUTINE PRTL_AVL_ALLOCATE_ROUTINE
+#define RTL_GENERIC_FREE_ROUTINE RTL_AVL_FREE_ROUTINE
+#define PRTL_GENERIC_FREE_ROUTINE PRTL_AVL_FREE_ROUTINE
+#endif /* RTL_USE_AVL_TABLES */
+
+#endif /* NTOS_MODE_USER */
//
// RTL Query Registry callback
@@ -659,6 +683,7 @@
//
// RTL Avl/Generic Tables
//
+#ifndef RTL_USE_AVL_TABLES
typedef struct _RTL_GENERIC_TABLE
{
PRTL_SPLAY_LINKS TableRoot;
@@ -671,6 +696,7 @@
PRTL_GENERIC_FREE_ROUTINE FreeRoutine;
PVOID TableContext;
} RTL_GENERIC_TABLE, *PRTL_GENERIC_TABLE;
+#endif /* !RTL_USE_AVL_TABLES */
typedef struct _RTL_AVL_TABLE
{
@@ -687,6 +713,14 @@
PVOID TableContext;
} RTL_AVL_TABLE, *PRTL_AVL_TABLE;
+#ifdef RTL_USE_AVL_TABLES
+#undef RTL_GENERIC_TABLE
+#undef PRTL_GENERIC_TABLE
+
+#define RTL_GENERIC_TABLE RTL_AVL_TABLE
+#define PRTL_GENERIC_TABLE PRTL_AVL_TABLE
+#endif /* RTL_USE_AVL_TABLES */
+
//
// RTL Compression Buffer
//
@@ -805,7 +839,7 @@
} ACTIVATION_CONTEXT_STACK, *PACTIVATION_CONTEXT_STACK;
#endif
-#endif
+#endif /* NTOS_MODE_USER */
//
// ACE Structure
@@ -1091,7 +1125,7 @@
ULONG_PTR SpinCount;
} RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;
-#endif
+#endif /* !NTOS_MODE_USER */
//
// RTL Private Heap Structures
@@ -1260,7 +1294,7 @@
SYSTEMTIME DaylightDate;
LONG DaylightBias;
} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;
-#endif
+#endif /* !_WINBASE_ */
//
// Native version of Timezone Structure
@@ -1354,5 +1388,5 @@
MESSAGE_RESOURCE_BLOCK Blocks[ANYSIZE_ARRAY];
} MESSAGE_RESOURCE_DATA, *PMESSAGE_RESOURCE_DATA;
-#endif
-#endif
+#endif /* !NTOS_MODE_USER */
+#endif /* !_RTLTYPES_H */
Modified: trunk/reactos/include/xdk/rtltypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/rtltypes.h?rev…
==============================================================================
--- trunk/reactos/include/xdk/rtltypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/rtltypes.h [iso-8859-1] Fri Aug 5 01:20:28 2011
@@ -246,26 +246,30 @@
struct _RTL_AVL_TABLE;
typedef RTL_GENERIC_COMPARE_RESULTS
-(NTAPI *PRTL_AVL_COMPARE_ROUTINE) (
+(NTAPI RTL_AVL_COMPARE_ROUTINE) (
IN struct _RTL_AVL_TABLE *Table,
IN PVOID FirstStruct,
IN PVOID SecondStruct);
+typedef RTL_AVL_COMPARE_ROUTINE *PRTL_AVL_COMPARE_ROUTINE;
typedef PVOID
-(NTAPI *PRTL_AVL_ALLOCATE_ROUTINE) (
+(NTAPI RTL_AVL_ALLOCATE_ROUTINE) (
IN struct _RTL_AVL_TABLE *Table,
IN CLONG ByteSize);
+typedef RTL_AVL_ALLOCATE_ROUTINE *PRTL_AVL_ALLOCATE_ROUTINE;
typedef VOID
-(NTAPI *PRTL_AVL_FREE_ROUTINE) (
+(NTAPI RTL_AVL_FREE_ROUTINE) (
IN struct _RTL_AVL_TABLE *Table,
IN PVOID Buffer);
+typedef RTL_AVL_FREE_ROUTINE *PRTL_AVL_FREE_ROUTINE;
typedef NTSTATUS
-(NTAPI *PRTL_AVL_MATCH_FUNCTION) (
+(NTAPI RTL_AVL_MATCH_FUNCTION) (
IN struct _RTL_AVL_TABLE *Table,
IN PVOID UserData,
IN PVOID MatchData);
+typedef RTL_AVL_MATCH_FUNCTION *PRTL_AVL_MATCH_FUNCTION;
typedef struct _RTL_BALANCED_LINKS {
struct _RTL_BALANCED_LINKS *Parent;
@@ -289,31 +293,34 @@
PVOID TableContext;
} RTL_AVL_TABLE, *PRTL_AVL_TABLE;
-#ifndef RTL_USE_AVL_TABLES
-
-struct _RTL_GENERIC_TABLE;
-
-typedef RTL_GENERIC_COMPARE_RESULTS
-(NTAPI *PRTL_GENERIC_COMPARE_ROUTINE) (
- IN struct _RTL_GENERIC_TABLE *Table,
- IN PVOID FirstStruct,
- IN PVOID SecondStruct);
-
-typedef PVOID
-(NTAPI *PRTL_GENERIC_ALLOCATE_ROUTINE) (
- IN struct _RTL_GENERIC_TABLE *Table,
- IN CLONG ByteSize);
-
-typedef VOID
-(NTAPI *PRTL_GENERIC_FREE_ROUTINE) (
- IN struct _RTL_GENERIC_TABLE *Table,
- IN PVOID Buffer);
-
typedef struct _RTL_SPLAY_LINKS {
struct _RTL_SPLAY_LINKS *Parent;
struct _RTL_SPLAY_LINKS *LeftChild;
struct _RTL_SPLAY_LINKS *RightChild;
} RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS;
+
+#ifndef RTL_USE_AVL_TABLES
+
+struct _RTL_GENERIC_TABLE;
+
+typedef RTL_GENERIC_COMPARE_RESULTS
+(NTAPI RTL_GENERIC_COMPARE_ROUTINE) (
+ IN struct _RTL_GENERIC_TABLE *Table,
+ IN PVOID FirstStruct,
+ IN PVOID SecondStruct);
+typedef RTL_GENERIC_COMPARE_ROUTINE *PRTL_GENERIC_COMPARE_ROUTINE;
+
+typedef PVOID
+(NTAPI RTL_GENERIC_ALLOCATE_ROUTINE) (
+ IN struct _RTL_GENERIC_TABLE *Table,
+ IN CLONG ByteSize);
+typedef RTL_GENERIC_ALLOCATE_ROUTINE *PRTL_GENERIC_ALLOCATE_ROUTINE;
+
+typedef VOID
+(NTAPI RTL_GENERIC_FREE_ROUTINE) (
+ IN struct _RTL_GENERIC_TABLE *Table,
+ IN PVOID Buffer);
+typedef RTL_GENERIC_FREE_ROUTINE *PRTL_GENERIC_FREE_ROUTINE;
typedef struct _RTL_GENERIC_TABLE {
PRTL_SPLAY_LINKS TableRoot;
@@ -331,23 +338,23 @@
#ifdef RTL_USE_AVL_TABLES
+#undef RTL_GENERIC_COMPARE_ROUTINE
#undef PRTL_GENERIC_COMPARE_ROUTINE
-#undef RTL_GENERIC_COMPARE_ROUTINE
+#undef RTL_GENERIC_ALLOCATE_ROUTINE
#undef PRTL_GENERIC_ALLOCATE_ROUTINE
-#undef RTL_GENERIC_ALLOCATE_ROUTINE
+#undef RTL_GENERIC_FREE_ROUTINE
#undef PRTL_GENERIC_FREE_ROUTINE
-#undef RTL_GENERIC_FREE_ROUTINE
-#undef RTL_GENERIC_TABLE
+#undef RTL_GENERIC_TABLE
#undef PRTL_GENERIC_TABLE
-#define PRTL_GENERIC_COMPARE_ROUTINE PRTL_AVL_COMPARE_ROUTINE
-#define RTL_GENERIC_COMPARE_ROUTINE RTL_AVL_COMPARE_ROUTINE
-#define PRTL_GENERIC_ALLOCATE_ROUTINE PRTL_AVL_ALLOCATE_ROUTINE
-#define RTL_GENERIC_ALLOCATE_ROUTINE RTL_AVL_ALLOCATE_ROUTINE
-#define PRTL_GENERIC_FREE_ROUTINE PRTL_AVL_FREE_ROUTINE
-#define RTL_GENERIC_FREE_ROUTINE RTL_AVL_FREE_ROUTINE
-#define RTL_GENERIC_TABLE RTL_AVL_TABLE
-#define PRTL_GENERIC_TABLE PRTL_AVL_TABLE
+#define RTL_GENERIC_COMPARE_ROUTINE RTL_AVL_COMPARE_ROUTINE
+#define PRTL_GENERIC_COMPARE_ROUTINE PRTL_AVL_COMPARE_ROUTINE
+#define RTL_GENERIC_ALLOCATE_ROUTINE RTL_AVL_ALLOCATE_ROUTINE
+#define PRTL_GENERIC_ALLOCATE_ROUTINE PRTL_AVL_ALLOCATE_ROUTINE
+#define RTL_GENERIC_FREE_ROUTINE RTL_AVL_FREE_ROUTINE
+#define PRTL_GENERIC_FREE_ROUTINE PRTL_AVL_FREE_ROUTINE
+#define RTL_GENERIC_TABLE RTL_AVL_TABLE
+#define PRTL_GENERIC_TABLE PRTL_AVL_TABLE
#endif /* RTL_USE_AVL_TABLES */