diff --git a/reactos/ntoskrnl/io/iomgr/irp.c b/reactos/ntoskrnl/io/iomgr/irp.c index 32fd517fe85..e8854befb61 100644 --- a/reactos/ntoskrnl/io/iomgr/irp.c +++ b/reactos/ntoskrnl/io/iomgr/irp.c @@ -1535,16 +1535,37 @@ IoFreeIrp(IN PIRP Irp) } /* - * @unimplemented + * @implemented */ IO_PAGING_PRIORITY -NTAPI +FASTCALL IoGetPagingIoPriority(IN PIRP Irp) { - UNIMPLEMENTED; + IO_PAGING_PRIORITY Priority; + ULONG Flags; - /* Lie and say this isn't a paging IRP -- FIXME! */ - return IoPagingPriorityInvalid; + /* 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; } /* diff --git a/reactos/ntoskrnl/ntoskrnl.spec b/reactos/ntoskrnl/ntoskrnl.spec index 420c598fb8c..bd8e2e26196 100644 --- a/reactos/ntoskrnl/ntoskrnl.spec +++ b/reactos/ntoskrnl/ntoskrnl.spec @@ -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)