Author: fireball
Date: Fri Nov 7 11:40:44 2008
New Revision: 37244
URL:
http://svn.reactos.org/svn/reactos?rev=37244&view=rev
Log:
- Add missing definitions to headers.
- Do not use "with tag" when freeing the system buffer, because drivers are
allowed to re-allocate their own buffer, which may have a different tag.
Modified:
trunk/reactos/include/ddk/ntifs.h
trunk/reactos/include/ddk/winddk.h
trunk/reactos/ntoskrnl/io/iomgr/irp.c
Modified: trunk/reactos/include/ddk/ntifs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=37…
==============================================================================
--- trunk/reactos/include/ddk/ntifs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntifs.h [iso-8859-1] Fri Nov 7 11:40:44 2008
@@ -1639,6 +1639,65 @@
PVOID TableContext;
} RTL_GENERIC_TABLE, *PRTL_GENERIC_TABLE;
+typedef struct _UNICODE_PREFIX_TABLE_ENTRY
+{
+ CSHORT NodeTypeCode;
+ CSHORT NameLength;
+ struct _UNICODE_PREFIX_TABLE_ENTRY *NextPrefixTree;
+ struct _UNICODE_PREFIX_TABLE_ENTRY *CaseMatch;
+ RTL_SPLAY_LINKS Links;
+ PUNICODE_STRING Prefix;
+} UNICODE_PREFIX_TABLE_ENTRY, *PUNICODE_PREFIX_TABLE_ENTRY;
+
+typedef struct _UNICODE_PREFIX_TABLE
+{
+ CSHORT NodeTypeCode;
+ CSHORT NameLength;
+ PUNICODE_PREFIX_TABLE_ENTRY NextPrefixTree;
+ PUNICODE_PREFIX_TABLE_ENTRY LastNextEntry;
+} UNICODE_PREFIX_TABLE, *PUNICODE_PREFIX_TABLE;
+
+NTSYSAPI
+VOID
+NTAPI
+RtlInitializeUnicodePrefix (
+ IN PUNICODE_PREFIX_TABLE PrefixTable
+);
+
+NTSYSAPI
+BOOLEAN
+NTAPI
+RtlInsertUnicodePrefix (
+ IN PUNICODE_PREFIX_TABLE PrefixTable,
+ IN PUNICODE_STRING Prefix,
+ IN PUNICODE_PREFIX_TABLE_ENTRY PrefixTableEntry
+);
+
+NTSYSAPI
+VOID
+NTAPI
+RtlRemoveUnicodePrefix (
+ IN PUNICODE_PREFIX_TABLE PrefixTable,
+ IN PUNICODE_PREFIX_TABLE_ENTRY PrefixTableEntry
+);
+
+NTSYSAPI
+PUNICODE_PREFIX_TABLE_ENTRY
+NTAPI
+RtlFindUnicodePrefix (
+ IN PUNICODE_PREFIX_TABLE PrefixTable,
+ IN PUNICODE_STRING FullName,
+ IN ULONG CaseInsensitiveIndex
+);
+
+NTSYSAPI
+PUNICODE_PREFIX_TABLE_ENTRY
+NTAPI
+RtlNextUnicodePrefix (
+ IN PUNICODE_PREFIX_TABLE PrefixTable,
+ IN BOOLEAN Restart
+);
+
#undef PRTL_GENERIC_COMPARE_ROUTINE
#undef PRTL_GENERIC_ALLOCATE_ROUTINE
#undef PRTL_GENERIC_FREE_ROUTINE
Modified: trunk/reactos/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=3…
==============================================================================
--- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Fri Nov 7 11:40:44 2008
@@ -9205,12 +9205,11 @@
* IN PIRP Irp,
* IN PDRIVER_CANCEL CancelRoutine)
*/
-#define IoSetCancelRoutine(_Irp, \
- _CancelRoutine) \
- ((PDRIVER_CANCEL) InterlockedExchangePointer( \
- (PVOID *) &(_Irp)->CancelRoutine, (PVOID) (_CancelRoutine)))
-
-/*
+#define IoSetCancelRoutine( Irp, NewCancelRoutine ) ( \
+ InterlockedExchange( (PLONG)&(Irp)->CancelRoutine, (LONG)(NewCancelRoutine) ) )
+
+
+ /*
* VOID
* IoSetCompletionRoutine(
* IN PIRP Irp,
Modified: trunk/reactos/ntoskrnl/io/iomgr/irp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/irp.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/irp.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/irp.c [iso-8859-1] Fri Nov 7 11:40:44 2008
@@ -286,7 +286,7 @@
if (Irp->Flags & IRP_DEALLOCATE_BUFFER)
{
/* Deallocate it */
- ExFreePoolWithTag(Irp->AssociatedIrp.SystemBuffer, TAG_SYS_BUF);
+ ExFreePool(Irp->AssociatedIrp.SystemBuffer);
}
}
@@ -976,7 +976,7 @@
Irp->Cancel = TRUE;
/* Clear the cancel routine and get the old one */
- CancelRoutine = IoSetCancelRoutine(Irp, NULL);
+ CancelRoutine = (PVOID)IoSetCancelRoutine(Irp, NULL);
if (CancelRoutine)
{
/* We had a routine, make sure the IRP isn't completed */