Fixed irq level assertations (assert -> assert_irql).

svn path=/trunk/; revision=569
This commit is contained in:
Eric Kohl 1999-06-27 13:01:23 +00:00
parent 56b4626f56
commit 7f7c26ae4d
3 changed files with 18 additions and 18 deletions

View file

@ -49,7 +49,7 @@ VOID IoAllocateController(PCONTROLLER_OBJECT ControllerObject,
PCONTROLLER_QUEUE_ENTRY entry; PCONTROLLER_QUEUE_ENTRY entry;
IO_ALLOCATION_ACTION Result; IO_ALLOCATION_ACTION Result;
assert(KeGetCurrentIrql()==DISPATCH_LEVEL); assert_irql(DISPATCH_LEVEL);
entry=ExAllocatePool(NonPagedPool,sizeof(CONTROLLER_QUEUE_ENTRY)); entry=ExAllocatePool(NonPagedPool,sizeof(CONTROLLER_QUEUE_ENTRY));
assert(entry!=NULL); assert(entry!=NULL);
@ -81,7 +81,7 @@ PCONTROLLER_OBJECT IoCreateController(ULONG Size)
{ {
PCONTROLLER_OBJECT controller; PCONTROLLER_OBJECT controller;
assert(KeGetCurrentIrql()==PASSIVE_LEVEL); assert_irql(PASSIVE_LEVEL);
controller = ExAllocatePool(NonPagedPool,sizeof(CONTROLLER_OBJECT)); controller = ExAllocatePool(NonPagedPool,sizeof(CONTROLLER_OBJECT));
if (controller==NULL) if (controller==NULL)
@ -95,7 +95,7 @@ PCONTROLLER_OBJECT IoCreateController(ULONG Size)
ExFreePool(controller); ExFreePool(controller);
return(NULL); return(NULL);
} }
KeInitializeDeviceQueue(&controller->DeviceWaitQueue); KeInitializeDeviceQueue(&controller->DeviceWaitQueue);
return(controller); return(controller);
} }
@ -107,8 +107,8 @@ VOID IoDeleteController(PCONTROLLER_OBJECT ControllerObject)
* ControllerObject = Controller object to be released * ControllerObject = Controller object to be released
*/ */
{ {
assert(KeGetCurrentIrql()==PASSIVE_LEVEL); assert_irql(PASSIVE_LEVEL);
ExFreePool(ControllerObject->ControllerExtension); ExFreePool(ControllerObject->ControllerExtension);
ExFreePool(ControllerObject); ExFreePool(ControllerObject);
} }
@ -124,7 +124,7 @@ VOID IoFreeController(PCONTROLLER_OBJECT ControllerObject)
PKDEVICE_QUEUE_ENTRY QEntry; PKDEVICE_QUEUE_ENTRY QEntry;
CONTROLLER_QUEUE_ENTRY* Entry; CONTROLLER_QUEUE_ENTRY* Entry;
IO_ALLOCATION_ACTION Result; IO_ALLOCATION_ACTION Result;
do do
{ {
QEntry = KeRemoveDeviceQueue(&ControllerObject->DeviceWaitQueue); QEntry = KeRemoveDeviceQueue(&ControllerObject->DeviceWaitQueue);
@ -140,4 +140,4 @@ VOID IoFreeController(PCONTROLLER_OBJECT ControllerObject)
ExFreePool(Entry); ExFreePool(Entry);
} while (Result == DeallocateObject); } while (Result == DeallocateObject);
} }

View file

@ -50,15 +50,17 @@ NtDeviceIoControlFile (
PIRP Irp; PIRP Irp;
PIO_STACK_LOCATION StackPtr; PIO_STACK_LOCATION StackPtr;
KEVENT KEvent; KEVENT KEvent;
assert(KeGetCurrentIrql()==PASSIVE_LEVEL); assert_irql(PASSIVE_LEVEL);
DPRINT("NtDeviceIoControlFile(DeviceHandle %x Event %x UserApcRoutine %x " DPRINT("NtDeviceIoControlFile(DeviceHandle %x Event %x UserApcRoutine %x "
"UserApcContext %x IoStatusBlock %x InputBuffer %x " "UserApcContext %x IoStatusBlock %x IoControlCode %x "
"InputBufferSize %x OutputBuffer %x OutputBufferSize %x)\n", "InputBuffer %x InputBufferSize %x OutputBuffer %x "
"OutputBufferSize %x)\n",
DeviceHandle,Event,UserApcRoutine,UserApcContext,IoStatusBlock, DeviceHandle,Event,UserApcRoutine,UserApcContext,IoStatusBlock,
InputBuffer,InputBufferSize,OutputBuffer,OutputBufferSize); IoControlCode,InputBuffer,InputBufferSize,OutputBuffer,
OutputBufferSize);
Status = ObReferenceObjectByHandle(DeviceHandle, Status = ObReferenceObjectByHandle(DeviceHandle,
FILE_READ_DATA | FILE_WRITE_DATA, FILE_READ_DATA | FILE_WRITE_DATA,
NULL, NULL,
@ -100,4 +102,3 @@ NtDeviceIoControlFile (
return(Status); return(Status);
} }

View file

@ -55,7 +55,7 @@ void KeDrainDpcQueue(void)
PKDPC current; PKDPC current;
KIRQL oldlvl; KIRQL oldlvl;
assert(KeGetCurrentIrql() == DISPATCH_LEVEL); assert_irql(DISPATCH_LEVEL);
if (DpcQueueSize == 0) if (DpcQueueSize == 0)
{ {
@ -117,9 +117,9 @@ BOOLEAN KeInsertQueueDpc(PKDPC dpc, PVOID SystemArgument1,
{ {
DPRINT("KeInsertQueueDpc(dpc %x, SystemArgument1 %x, SystemArgument2 %x)\n", DPRINT("KeInsertQueueDpc(dpc %x, SystemArgument1 %x, SystemArgument2 %x)\n",
dpc, SystemArgument1, SystemArgument2); dpc, SystemArgument1, SystemArgument2);
assert(KeGetCurrentIrql()>=DISPATCH_LEVEL); assert(KeGetCurrentIrql()>=DISPATCH_LEVEL);
dpc->Number=0; dpc->Number=0;
dpc->Importance=Medium; dpc->Importance=Medium;
dpc->SystemArgument1=SystemArgument1; dpc->SystemArgument1=SystemArgument1;
@ -146,4 +146,3 @@ void KeInitDpc(void)
InitializeListHead(&DpcQueueHead); InitializeListHead(&DpcQueueHead);
} }