https://git.reactos.org/?p=reactos.git;a=commitdiff;h=75850abcbbad5d37416044...
commit 75850abcbbad5d37416044d4a1be432770f1cad1 Author: Thomas Faber thomas.faber@reactos.org AuthorDate: Sat Dec 30 11:45:03 2017 +0100
[NTOS] Use KeClearEvent instead of KeResetEvent where the previous state is not needed. --- ntoskrnl/fstub/disksup.c | 6 +++--- ntoskrnl/io/iomgr/rawfs.c | 2 +- ntoskrnl/lpc/reply.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ntoskrnl/fstub/disksup.c b/ntoskrnl/fstub/disksup.c index 62986aed4b..ef5630d0ee 100644 --- a/ntoskrnl/fstub/disksup.c +++ b/ntoskrnl/fstub/disksup.c @@ -1014,7 +1014,7 @@ HalpGetFullGeometry(IN PDEVICE_OBJECT DeviceObject, }
/* Reset event */ - KeResetEvent(Event); + KeClearEvent(Event);
/* Call the driver and check if it's pending */ Status = IoCallDriver(DeviceObject, Irp); @@ -1847,7 +1847,7 @@ xHalIoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject, do { /* Reset the event since we reuse it */ - KeResetEvent(&Event); + KeClearEvent(&Event);
/* Build the read IRP */ Irp = IoBuildSynchronousFsdRequest(IRP_MJ_READ, @@ -1912,7 +1912,7 @@ xHalIoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject, PartitionDescriptor->PartitionType = (UCHAR)PartitionType;
/* Reset the reusable event */ - KeResetEvent(&Event); + KeClearEvent(&Event);
/* Build the write IRP */ Irp = IoBuildSynchronousFsdRequest(IRP_MJ_WRITE, diff --git a/ntoskrnl/io/iomgr/rawfs.c b/ntoskrnl/io/iomgr/rawfs.c index 8ade9a7db5..062c1fb42e 100644 --- a/ntoskrnl/io/iomgr/rawfs.c +++ b/ntoskrnl/io/iomgr/rawfs.c @@ -833,7 +833,7 @@ RawQueryFsSizeInfo(IN PVCB Vcb, else { /* Setup query IRP */ - KeResetEvent(&Event); + KeClearEvent(&Event); Irp = IoBuildDeviceIoControlRequest(IOCTL_DISK_GET_PARTITION_INFO, RealDevice, NULL, diff --git a/ntoskrnl/lpc/reply.c b/ntoskrnl/lpc/reply.c index d9fa834be0..8454754c3a 100644 --- a/ntoskrnl/lpc/reply.c +++ b/ntoskrnl/lpc/reply.c @@ -608,7 +608,7 @@ NtReplyWaitReceivePortEx(IN HANDLE PortHandle, if (ReceivePort->Flags & LPCP_WAITABLE_PORT) { /* Reset its event */ - KeResetEvent(&ReceivePort->WaitEvent); + KeClearEvent(&ReceivePort->WaitEvent); }
/* Release the lock and fail */ @@ -630,7 +630,7 @@ NtReplyWaitReceivePortEx(IN HANDLE PortHandle, if (ReceivePort->Flags & LPCP_WAITABLE_PORT) { /* Reset its event */ - KeResetEvent(&ReceivePort->WaitEvent); + KeClearEvent(&ReceivePort->WaitEvent); } }