mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
- 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. svn path=/trunk/; revision=37244
This commit is contained in:
parent
de0a39ef52
commit
31ada60dd5
3 changed files with 66 additions and 8 deletions
|
@ -1639,6 +1639,65 @@ typedef struct _RTL_GENERIC_TABLE
|
||||||
PVOID TableContext;
|
PVOID TableContext;
|
||||||
} RTL_GENERIC_TABLE, *PRTL_GENERIC_TABLE;
|
} 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_COMPARE_ROUTINE
|
||||||
#undef PRTL_GENERIC_ALLOCATE_ROUTINE
|
#undef PRTL_GENERIC_ALLOCATE_ROUTINE
|
||||||
#undef PRTL_GENERIC_FREE_ROUTINE
|
#undef PRTL_GENERIC_FREE_ROUTINE
|
||||||
|
|
|
@ -9205,12 +9205,11 @@ IoReuseIrp(
|
||||||
* IN PIRP Irp,
|
* IN PIRP Irp,
|
||||||
* IN PDRIVER_CANCEL CancelRoutine)
|
* IN PDRIVER_CANCEL CancelRoutine)
|
||||||
*/
|
*/
|
||||||
#define IoSetCancelRoutine(_Irp, \
|
#define IoSetCancelRoutine( Irp, NewCancelRoutine ) ( \
|
||||||
_CancelRoutine) \
|
InterlockedExchange( (PLONG)&(Irp)->CancelRoutine, (LONG)(NewCancelRoutine) ) )
|
||||||
((PDRIVER_CANCEL) InterlockedExchangePointer( \
|
|
||||||
(PVOID *) &(_Irp)->CancelRoutine, (PVOID) (_CancelRoutine)))
|
|
||||||
|
/*
|
||||||
/*
|
|
||||||
* VOID
|
* VOID
|
||||||
* IoSetCompletionRoutine(
|
* IoSetCompletionRoutine(
|
||||||
* IN PIRP Irp,
|
* IN PIRP Irp,
|
||||||
|
|
|
@ -286,7 +286,7 @@ IopCompleteRequest(IN PKAPC Apc,
|
||||||
if (Irp->Flags & IRP_DEALLOCATE_BUFFER)
|
if (Irp->Flags & IRP_DEALLOCATE_BUFFER)
|
||||||
{
|
{
|
||||||
/* Deallocate it */
|
/* Deallocate it */
|
||||||
ExFreePoolWithTag(Irp->AssociatedIrp.SystemBuffer, TAG_SYS_BUF);
|
ExFreePool(Irp->AssociatedIrp.SystemBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -976,7 +976,7 @@ IoCancelIrp(IN PIRP Irp)
|
||||||
Irp->Cancel = TRUE;
|
Irp->Cancel = TRUE;
|
||||||
|
|
||||||
/* Clear the cancel routine and get the old one */
|
/* Clear the cancel routine and get the old one */
|
||||||
CancelRoutine = IoSetCancelRoutine(Irp, NULL);
|
CancelRoutine = (PVOID)IoSetCancelRoutine(Irp, NULL);
|
||||||
if (CancelRoutine)
|
if (CancelRoutine)
|
||||||
{
|
{
|
||||||
/* We had a routine, make sure the IRP isn't completed */
|
/* We had a routine, make sure the IRP isn't completed */
|
||||||
|
|
Loading…
Reference in a new issue