[NTOS] Use KeClearEvent instead of KeResetEvent where the previous state is not needed.
authorThomas Faber <thomas.faber@reactos.org>
Sat, 30 Dec 2017 10:45:03 +0000 (11:45 +0100)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 30 Dec 2017 10:45:03 +0000 (11:45 +0100)
ntoskrnl/fstub/disksup.c
ntoskrnl/io/iomgr/rawfs.c
ntoskrnl/lpc/reply.c

index 62986ae..ef5630d 100644 (file)
@@ -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,
index 8ade9a7..062c1fb 100644 (file)
@@ -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,
index d9fa834..8454754 100644 (file)
@@ -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);
         }
     }