mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +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));
|
NextEntry = RemoveHeadList(&(DeviceExtension->UniqueIdWorkerItemListHead));
|
||||||
WorkItem = CONTAINING_RECORD(NextEntry, UNIQUE_ID_WORK_ITEM, UniqueIdWorkerItemListEntry);
|
WorkItem = CONTAINING_RECORD(NextEntry, UNIQUE_ID_WORK_ITEM, UniqueIdWorkerItemListEntry);
|
||||||
|
|
||||||
KeResetEvent(&UnloadEvent);
|
KeClearEvent(&UnloadEvent);
|
||||||
WorkItem->Event = &UnloadEvent;
|
WorkItem->Event = &UnloadEvent;
|
||||||
|
|
||||||
KeReleaseSemaphore(&(DeviceExtension->DeviceLock), IO_NO_INCREMENT,
|
KeReleaseSemaphore(&(DeviceExtension->DeviceLock), IO_NO_INCREMENT,
|
||||||
|
|
|
@ -289,7 +289,7 @@ KbdHid_Create(
|
||||||
DeviceExtension->FileObject = IoStack->FileObject;
|
DeviceExtension->FileObject = IoStack->FileObject;
|
||||||
|
|
||||||
/* reset event */
|
/* reset event */
|
||||||
KeResetEvent(&DeviceExtension->ReadCompletionEvent);
|
KeClearEvent(&DeviceExtension->ReadCompletionEvent);
|
||||||
|
|
||||||
/* initiating read */
|
/* initiating read */
|
||||||
Status = KbdHid_InitiateRead(DeviceExtension);
|
Status = KbdHid_InitiateRead(DeviceExtension);
|
||||||
|
|
|
@ -497,7 +497,7 @@ MouHid_Create(
|
||||||
DeviceExtension->FileObject = IoStack->FileObject;
|
DeviceExtension->FileObject = IoStack->FileObject;
|
||||||
|
|
||||||
/* reset event */
|
/* reset event */
|
||||||
KeResetEvent(&DeviceExtension->ReadCompletionEvent);
|
KeClearEvent(&DeviceExtension->ReadCompletionEvent);
|
||||||
|
|
||||||
/* initiating read */
|
/* initiating read */
|
||||||
Status = MouHid_InitiateRead(DeviceExtension);
|
Status = MouHid_InitiateRead(DeviceExtension);
|
||||||
|
|
|
@ -137,7 +137,7 @@ SermouseDeviceWorker(
|
||||||
if (Status != STATUS_TIMEOUT)
|
if (Status != STATUS_TIMEOUT)
|
||||||
{
|
{
|
||||||
/* we need to stop the worker thread */
|
/* we need to stop the worker thread */
|
||||||
KeResetEvent(&DeviceExtension->StopWorkerThreadEvent);
|
KeClearEvent(&DeviceExtension->StopWorkerThreadEvent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ NdisResetEvent(
|
||||||
* Event = Pointer to the initialized event object to be reset
|
* 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"));
|
NDIS_DbgPrint(MAX_TRACE, ("resetting event\n"));
|
||||||
|
|
||||||
KeResetEvent(&AllocationEvent);
|
KeClearEvent(&AllocationEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
NDIS_DbgPrint(MAX_TRACE, ("returning success\n"));
|
NDIS_DbgPrint(MAX_TRACE, ("returning success\n"));
|
||||||
|
|
|
@ -2315,7 +2315,7 @@ USBH_ChangeIndication(IN PDEVICE_OBJECT DeviceObject,
|
||||||
|
|
||||||
if (InterlockedIncrement(&HubExtension->ResetRequestCount) == 1)
|
if (InterlockedIncrement(&HubExtension->ResetRequestCount) == 1)
|
||||||
{
|
{
|
||||||
KeResetEvent(&HubExtension->ResetEvent);
|
KeClearEvent(&HubExtension->ResetEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
HubWorkItemBuffer->HubExtension = HubExtension;
|
HubWorkItemBuffer->HubExtension = HubExtension;
|
||||||
|
@ -2415,7 +2415,7 @@ USBH_SubmitStatusChangeTransfer(IN PUSBHUB_FDO_EXTENSION HubExtension)
|
||||||
TRUE,
|
TRUE,
|
||||||
TRUE);
|
TRUE);
|
||||||
|
|
||||||
KeResetEvent(&HubExtension->StatusChangeEvent);
|
KeClearEvent(&HubExtension->StatusChangeEvent);
|
||||||
|
|
||||||
Status = IoCallDriver(HubExtension->LowerDevice, Irp);
|
Status = IoCallDriver(HubExtension->LowerDevice, Irp);
|
||||||
|
|
||||||
|
@ -2915,7 +2915,7 @@ USBD_RegisterRootHubCallBack(IN PUSBHUB_FDO_EXTENSION HubExtension)
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
KeResetEvent(&HubExtension->RootHubNotificationEvent);
|
KeClearEvent(&HubExtension->RootHubNotificationEvent);
|
||||||
|
|
||||||
return RootHubInitNotification(HubExtension->BusInterface.BusContext,
|
return RootHubInitNotification(HubExtension->BusInterface.BusContext,
|
||||||
HubExtension,
|
HubExtension,
|
||||||
|
@ -3828,7 +3828,7 @@ return; //HACK: delete it line after fixing Power Manager!!!
|
||||||
if (IsHubCheck &&
|
if (IsHubCheck &&
|
||||||
!(HubExtension->HubFlags & USBHUB_FDO_FLAG_WAIT_IDLE_REQUEST))
|
!(HubExtension->HubFlags & USBHUB_FDO_FLAG_WAIT_IDLE_REQUEST))
|
||||||
{
|
{
|
||||||
KeResetEvent(&HubExtension->IdleEvent);
|
KeClearEvent(&HubExtension->IdleEvent);
|
||||||
HubExtension->HubFlags |= USBHUB_FDO_FLAG_WAIT_IDLE_REQUEST;
|
HubExtension->HubFlags |= USBHUB_FDO_FLAG_WAIT_IDLE_REQUEST;
|
||||||
IsHubIdle = TRUE;
|
IsHubIdle = TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1393,7 +1393,7 @@ USBPORT_WorkerThread(IN PVOID StartContext)
|
||||||
KeQuerySystemTime(&NewTime);
|
KeQuerySystemTime(&NewTime);
|
||||||
|
|
||||||
KeAcquireSpinLock(&FdoExtension->WorkerThreadEventSpinLock, &OldIrql);
|
KeAcquireSpinLock(&FdoExtension->WorkerThreadEventSpinLock, &OldIrql);
|
||||||
KeResetEvent(&FdoExtension->WorkerThreadEvent);
|
KeClearEvent(&FdoExtension->WorkerThreadEvent);
|
||||||
KeReleaseSpinLock(&FdoExtension->WorkerThreadEventSpinLock, OldIrql);
|
KeReleaseSpinLock(&FdoExtension->WorkerThreadEventSpinLock, OldIrql);
|
||||||
DPRINT_CORE("USBPORT_WorkerThread: run \n");
|
DPRINT_CORE("USBPORT_WorkerThread: run \n");
|
||||||
|
|
||||||
|
|
|
@ -413,7 +413,7 @@ StreamClassStartDevice(
|
||||||
/* Setup get stream info struct */
|
/* Setup get stream info struct */
|
||||||
RequestBlock->Block.Command = SRB_GET_STREAM_INFO;
|
RequestBlock->Block.Command = SRB_GET_STREAM_INFO;
|
||||||
RequestBlock->Block.CommandData.StreamBuffer = StreamDescriptor;
|
RequestBlock->Block.CommandData.StreamBuffer = StreamDescriptor;
|
||||||
KeResetEvent(&RequestBlock->Event);
|
KeClearEvent(&RequestBlock->Event);
|
||||||
|
|
||||||
/* send the request */
|
/* send the request */
|
||||||
DriverObjectExtension->Data.HwReceivePacket((PHW_STREAM_REQUEST_BLOCK)RequestBlock);
|
DriverObjectExtension->Data.HwReceivePacket((PHW_STREAM_REQUEST_BLOCK)RequestBlock);
|
||||||
|
|
Loading…
Reference in a new issue