mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[DRIVERS] Use KeClearEvent instead of KeResetEvent where the previous state is not needed.
This commit is contained in:
parent
bad1c03529
commit
4f8379a02b
9 changed files with 12 additions and 12 deletions
|
@ -872,7 +872,7 @@ MountMgrUnload(IN struct _DRIVER_OBJECT *DriverObject)
|
|||
NextEntry = RemoveHeadList(&(DeviceExtension->UniqueIdWorkerItemListHead));
|
||||
WorkItem = CONTAINING_RECORD(NextEntry, UNIQUE_ID_WORK_ITEM, UniqueIdWorkerItemListEntry);
|
||||
|
||||
KeResetEvent(&UnloadEvent);
|
||||
KeClearEvent(&UnloadEvent);
|
||||
WorkItem->Event = &UnloadEvent;
|
||||
|
||||
KeReleaseSemaphore(&(DeviceExtension->DeviceLock), IO_NO_INCREMENT,
|
||||
|
|
|
@ -289,7 +289,7 @@ KbdHid_Create(
|
|||
DeviceExtension->FileObject = IoStack->FileObject;
|
||||
|
||||
/* reset event */
|
||||
KeResetEvent(&DeviceExtension->ReadCompletionEvent);
|
||||
KeClearEvent(&DeviceExtension->ReadCompletionEvent);
|
||||
|
||||
/* initiating read */
|
||||
Status = KbdHid_InitiateRead(DeviceExtension);
|
||||
|
|
|
@ -497,7 +497,7 @@ MouHid_Create(
|
|||
DeviceExtension->FileObject = IoStack->FileObject;
|
||||
|
||||
/* reset event */
|
||||
KeResetEvent(&DeviceExtension->ReadCompletionEvent);
|
||||
KeClearEvent(&DeviceExtension->ReadCompletionEvent);
|
||||
|
||||
/* initiating read */
|
||||
Status = MouHid_InitiateRead(DeviceExtension);
|
||||
|
|
|
@ -137,7 +137,7 @@ SermouseDeviceWorker(
|
|||
if (Status != STATUS_TIMEOUT)
|
||||
{
|
||||
/* we need to stop the worker thread */
|
||||
KeResetEvent(&DeviceExtension->StopWorkerThreadEvent);
|
||||
KeClearEvent(&DeviceExtension->StopWorkerThreadEvent);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ NdisResetEvent(
|
|||
* Event = Pointer to the initialized event object to be reset
|
||||
*/
|
||||
{
|
||||
KeResetEvent(&Event->Event);
|
||||
KeClearEvent(&Event->Event);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -416,7 +416,7 @@ NdisMAllocateMapRegisters(
|
|||
|
||||
NDIS_DbgPrint(MAX_TRACE, ("resetting event\n"));
|
||||
|
||||
KeResetEvent(&AllocationEvent);
|
||||
KeClearEvent(&AllocationEvent);
|
||||
}
|
||||
|
||||
NDIS_DbgPrint(MAX_TRACE, ("returning success\n"));
|
||||
|
|
|
@ -2315,7 +2315,7 @@ USBH_ChangeIndication(IN PDEVICE_OBJECT DeviceObject,
|
|||
|
||||
if (InterlockedIncrement(&HubExtension->ResetRequestCount) == 1)
|
||||
{
|
||||
KeResetEvent(&HubExtension->ResetEvent);
|
||||
KeClearEvent(&HubExtension->ResetEvent);
|
||||
}
|
||||
|
||||
HubWorkItemBuffer->HubExtension = HubExtension;
|
||||
|
@ -2415,7 +2415,7 @@ USBH_SubmitStatusChangeTransfer(IN PUSBHUB_FDO_EXTENSION HubExtension)
|
|||
TRUE,
|
||||
TRUE);
|
||||
|
||||
KeResetEvent(&HubExtension->StatusChangeEvent);
|
||||
KeClearEvent(&HubExtension->StatusChangeEvent);
|
||||
|
||||
Status = IoCallDriver(HubExtension->LowerDevice, Irp);
|
||||
|
||||
|
@ -2915,7 +2915,7 @@ USBD_RegisterRootHubCallBack(IN PUSBHUB_FDO_EXTENSION HubExtension)
|
|||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
KeResetEvent(&HubExtension->RootHubNotificationEvent);
|
||||
KeClearEvent(&HubExtension->RootHubNotificationEvent);
|
||||
|
||||
return RootHubInitNotification(HubExtension->BusInterface.BusContext,
|
||||
HubExtension,
|
||||
|
@ -3828,7 +3828,7 @@ return; //HACK: delete it line after fixing Power Manager!!!
|
|||
if (IsHubCheck &&
|
||||
!(HubExtension->HubFlags & USBHUB_FDO_FLAG_WAIT_IDLE_REQUEST))
|
||||
{
|
||||
KeResetEvent(&HubExtension->IdleEvent);
|
||||
KeClearEvent(&HubExtension->IdleEvent);
|
||||
HubExtension->HubFlags |= USBHUB_FDO_FLAG_WAIT_IDLE_REQUEST;
|
||||
IsHubIdle = TRUE;
|
||||
}
|
||||
|
|
|
@ -1393,7 +1393,7 @@ USBPORT_WorkerThread(IN PVOID StartContext)
|
|||
KeQuerySystemTime(&NewTime);
|
||||
|
||||
KeAcquireSpinLock(&FdoExtension->WorkerThreadEventSpinLock, &OldIrql);
|
||||
KeResetEvent(&FdoExtension->WorkerThreadEvent);
|
||||
KeClearEvent(&FdoExtension->WorkerThreadEvent);
|
||||
KeReleaseSpinLock(&FdoExtension->WorkerThreadEventSpinLock, OldIrql);
|
||||
DPRINT_CORE("USBPORT_WorkerThread: run \n");
|
||||
|
||||
|
|
|
@ -413,7 +413,7 @@ StreamClassStartDevice(
|
|||
/* Setup get stream info struct */
|
||||
RequestBlock->Block.Command = SRB_GET_STREAM_INFO;
|
||||
RequestBlock->Block.CommandData.StreamBuffer = StreamDescriptor;
|
||||
KeResetEvent(&RequestBlock->Event);
|
||||
KeClearEvent(&RequestBlock->Event);
|
||||
|
||||
/* send the request */
|
||||
DriverObjectExtension->Data.HwReceivePacket((PHW_STREAM_REQUEST_BLOCK)RequestBlock);
|
||||
|
|
Loading…
Reference in a new issue