diff --git a/reactos/ntoskrnl/io/cntrller.c b/reactos/ntoskrnl/io/cntrller.c index 987021f5461..311d162c918 100644 --- a/reactos/ntoskrnl/io/cntrller.c +++ b/reactos/ntoskrnl/io/cntrller.c @@ -49,7 +49,7 @@ VOID IoAllocateController(PCONTROLLER_OBJECT ControllerObject, PCONTROLLER_QUEUE_ENTRY entry; IO_ALLOCATION_ACTION Result; - assert(KeGetCurrentIrql()==DISPATCH_LEVEL); + assert_irql(DISPATCH_LEVEL); entry=ExAllocatePool(NonPagedPool,sizeof(CONTROLLER_QUEUE_ENTRY)); assert(entry!=NULL); @@ -81,7 +81,7 @@ PCONTROLLER_OBJECT IoCreateController(ULONG Size) { PCONTROLLER_OBJECT controller; - assert(KeGetCurrentIrql()==PASSIVE_LEVEL); + assert_irql(PASSIVE_LEVEL); controller = ExAllocatePool(NonPagedPool,sizeof(CONTROLLER_OBJECT)); if (controller==NULL) @@ -95,7 +95,7 @@ PCONTROLLER_OBJECT IoCreateController(ULONG Size) ExFreePool(controller); return(NULL); } - + KeInitializeDeviceQueue(&controller->DeviceWaitQueue); return(controller); } @@ -107,8 +107,8 @@ VOID IoDeleteController(PCONTROLLER_OBJECT ControllerObject) * ControllerObject = Controller object to be released */ { - assert(KeGetCurrentIrql()==PASSIVE_LEVEL); - + assert_irql(PASSIVE_LEVEL); + ExFreePool(ControllerObject->ControllerExtension); ExFreePool(ControllerObject); } @@ -124,7 +124,7 @@ VOID IoFreeController(PCONTROLLER_OBJECT ControllerObject) PKDEVICE_QUEUE_ENTRY QEntry; CONTROLLER_QUEUE_ENTRY* Entry; IO_ALLOCATION_ACTION Result; - + do { QEntry = KeRemoveDeviceQueue(&ControllerObject->DeviceWaitQueue); @@ -140,4 +140,4 @@ VOID IoFreeController(PCONTROLLER_OBJECT ControllerObject) ExFreePool(Entry); } while (Result == DeallocateObject); } - + diff --git a/reactos/ntoskrnl/io/ioctrl.c b/reactos/ntoskrnl/io/ioctrl.c index 46ce078d6cc..8d58fca0d46 100644 --- a/reactos/ntoskrnl/io/ioctrl.c +++ b/reactos/ntoskrnl/io/ioctrl.c @@ -50,15 +50,17 @@ NtDeviceIoControlFile ( PIRP Irp; PIO_STACK_LOCATION StackPtr; KEVENT KEvent; - - assert(KeGetCurrentIrql()==PASSIVE_LEVEL); + + assert_irql(PASSIVE_LEVEL); DPRINT("NtDeviceIoControlFile(DeviceHandle %x Event %x UserApcRoutine %x " - "UserApcContext %x IoStatusBlock %x InputBuffer %x " - "InputBufferSize %x OutputBuffer %x OutputBufferSize %x)\n", + "UserApcContext %x IoStatusBlock %x IoControlCode %x " + "InputBuffer %x InputBufferSize %x OutputBuffer %x " + "OutputBufferSize %x)\n", DeviceHandle,Event,UserApcRoutine,UserApcContext,IoStatusBlock, - InputBuffer,InputBufferSize,OutputBuffer,OutputBufferSize); - + IoControlCode,InputBuffer,InputBufferSize,OutputBuffer, + OutputBufferSize); + Status = ObReferenceObjectByHandle(DeviceHandle, FILE_READ_DATA | FILE_WRITE_DATA, NULL, @@ -100,4 +102,3 @@ NtDeviceIoControlFile ( return(Status); } - diff --git a/reactos/ntoskrnl/ke/dpc.c b/reactos/ntoskrnl/ke/dpc.c index 9adec5950a2..d0f114e9f71 100644 --- a/reactos/ntoskrnl/ke/dpc.c +++ b/reactos/ntoskrnl/ke/dpc.c @@ -55,7 +55,7 @@ void KeDrainDpcQueue(void) PKDPC current; KIRQL oldlvl; - assert(KeGetCurrentIrql() == DISPATCH_LEVEL); + assert_irql(DISPATCH_LEVEL); if (DpcQueueSize == 0) { @@ -117,9 +117,9 @@ BOOLEAN KeInsertQueueDpc(PKDPC dpc, PVOID SystemArgument1, { DPRINT("KeInsertQueueDpc(dpc %x, SystemArgument1 %x, SystemArgument2 %x)\n", dpc, SystemArgument1, SystemArgument2); - + assert(KeGetCurrentIrql()>=DISPATCH_LEVEL); - + dpc->Number=0; dpc->Importance=Medium; dpc->SystemArgument1=SystemArgument1; @@ -146,4 +146,3 @@ void KeInitDpc(void) InitializeListHead(&DpcQueueHead); } -