[NTOS] Use KeClearEvent instead of KeResetEvent where the previous state is not needed.

This commit is contained in:
Thomas Faber 2017-12-30 11:45:03 +01:00
parent 4f8379a02b
commit 75850abcbb
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
3 changed files with 6 additions and 6 deletions

View file

@ -1014,7 +1014,7 @@ HalpGetFullGeometry(IN PDEVICE_OBJECT DeviceObject,
} }
/* Reset event */ /* Reset event */
KeResetEvent(Event); KeClearEvent(Event);
/* Call the driver and check if it's pending */ /* Call the driver and check if it's pending */
Status = IoCallDriver(DeviceObject, Irp); Status = IoCallDriver(DeviceObject, Irp);
@ -1847,7 +1847,7 @@ xHalIoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject,
do do
{ {
/* Reset the event since we reuse it */ /* Reset the event since we reuse it */
KeResetEvent(&Event); KeClearEvent(&Event);
/* Build the read IRP */ /* Build the read IRP */
Irp = IoBuildSynchronousFsdRequest(IRP_MJ_READ, Irp = IoBuildSynchronousFsdRequest(IRP_MJ_READ,
@ -1912,7 +1912,7 @@ xHalIoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject,
PartitionDescriptor->PartitionType = (UCHAR)PartitionType; PartitionDescriptor->PartitionType = (UCHAR)PartitionType;
/* Reset the reusable event */ /* Reset the reusable event */
KeResetEvent(&Event); KeClearEvent(&Event);
/* Build the write IRP */ /* Build the write IRP */
Irp = IoBuildSynchronousFsdRequest(IRP_MJ_WRITE, Irp = IoBuildSynchronousFsdRequest(IRP_MJ_WRITE,

View file

@ -833,7 +833,7 @@ RawQueryFsSizeInfo(IN PVCB Vcb,
else else
{ {
/* Setup query IRP */ /* Setup query IRP */
KeResetEvent(&Event); KeClearEvent(&Event);
Irp = IoBuildDeviceIoControlRequest(IOCTL_DISK_GET_PARTITION_INFO, Irp = IoBuildDeviceIoControlRequest(IOCTL_DISK_GET_PARTITION_INFO,
RealDevice, RealDevice,
NULL, NULL,

View file

@ -608,7 +608,7 @@ NtReplyWaitReceivePortEx(IN HANDLE PortHandle,
if (ReceivePort->Flags & LPCP_WAITABLE_PORT) if (ReceivePort->Flags & LPCP_WAITABLE_PORT)
{ {
/* Reset its event */ /* Reset its event */
KeResetEvent(&ReceivePort->WaitEvent); KeClearEvent(&ReceivePort->WaitEvent);
} }
/* Release the lock and fail */ /* Release the lock and fail */
@ -630,7 +630,7 @@ NtReplyWaitReceivePortEx(IN HANDLE PortHandle,
if (ReceivePort->Flags & LPCP_WAITABLE_PORT) if (ReceivePort->Flags & LPCP_WAITABLE_PORT)
{ {
/* Reset its event */ /* Reset its event */
KeResetEvent(&ReceivePort->WaitEvent); KeClearEvent(&ReceivePort->WaitEvent);
} }
} }