Author: sginsberg
Date: Thu Sep 25 09:29:11 2008
New Revision: 36508
URL:
http://svn.reactos.org/svn/reactos?rev=36508&view=rev
Log:
- Implement IoGetPagingIoPriority and fix its export
Modified:
trunk/reactos/ntoskrnl/io/iomgr/irp.c
trunk/reactos/ntoskrnl/ntoskrnl.spec
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] Thu Sep 25 09:29:11 2008
@@ -1535,16 +1535,37 @@
}
/*
- * @unimplemented
+ * @implemented
*/
IO_PAGING_PRIORITY
-NTAPI
+FASTCALL
IoGetPagingIoPriority(IN PIRP Irp)
{
- UNIMPLEMENTED;
-
- /* Lie and say this isn't a paging IRP -- FIXME! */
- return IoPagingPriorityInvalid;
+ IO_PAGING_PRIORITY Priority;
+ ULONG Flags;
+
+ /* Get the flags */
+ Flags = Irp->Flags;
+
+ /* Check what priority it has */
+ if (Flags & 0x8000) // FIXME: Undocumented flag
+ {
+ /* High priority */
+ Priority = IoPagingPriorityHigh;
+ }
+ else if (Flags & IRP_PAGING_IO)
+ {
+ /* Normal priority */
+ Priority = IoPagingPriorityNormal;
+ }
+ else
+ {
+ /* Invalid -- not a paging IRP */
+ Priority = IoPagingPriorityInvalid;
+ }
+
+ /* Return the priority */
+ return Priority;
}
/*
Modified: trunk/reactos/ntoskrnl/ntoskrnl.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.spec?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] Thu Sep 25 09:29:11 2008
@@ -415,7 +415,7 @@
@ stdcall IoGetFileObjectGenericMapping()
@ stdcall IoGetInitialStack()
@ stdcall IoGetLowerDeviceObject(ptr)
-@ stdcall IoGetPagingIoPriority(ptr)
+@ fastcall IoGetPagingIoPriority(ptr)
@ stdcall IoGetRelatedDeviceObject(ptr)
@ stdcall IoGetRequestorProcess(ptr)
@ stdcall IoGetRequestorProcessId(ptr)