VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2024-12-25 17:58:12 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2024-12-25 17:58:12 +0100
commitf3af65b0079db68ff5059b66e4fd4e1c76d33b0b (patch)
treeb875047ea429fb4708dd4fdb742c7f6c310823f6 /src/Driver
parentd9e17522ee9a326100c9acb9fbafd443497cfdac (diff)
downloadVeraCrypt-f3af65b0079db68ff5059b66e4fd4e1c76d33b0b.tar.gz
VeraCrypt-f3af65b0079db68ff5059b66e4fd4e1c76d33b0b.zip
Windows driver: Use IO_DISK_INCREMENT for event signaling in IRP completion routineHEADmaster
This provides a slight priority boost for waiting threads and maintains standard practice for disk device drivers.
Diffstat (limited to 'src/Driver')
-rw-r--r--src/Driver/EncryptedIoQueue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Driver/EncryptedIoQueue.c b/src/Driver/EncryptedIoQueue.c
index de843339..de1e4fdc 100644
--- a/src/Driver/EncryptedIoQueue.c
+++ b/src/Driver/EncryptedIoQueue.c
@@ -327,7 +327,7 @@ static VOID CompleteIrpWorkItemRoutine(PDEVICE_OBJECT DeviceObject, PVOID Contex
// If no active work items remain, signal the event
if (InterlockedDecrement(&queue->ActiveWorkItems) == 0)
{
- KeSetEvent(&queue->NoActiveWorkItemsEvent, IO_NO_INCREMENT, FALSE);
+ KeSetEvent(&queue->NoActiveWorkItemsEvent, IO_DISK_INCREMENT, FALSE);
}
// Return the work item to the free list
@@ -336,7 +336,7 @@ static VOID CompleteIrpWorkItemRoutine(PDEVICE_OBJECT DeviceObject, PVOID Contex
KeReleaseSpinLock(&queue->WorkItemLock, oldIrql);
// Release the semaphore to signal that a work item is available
- KeReleaseSemaphore(&queue->WorkItemSemaphore, IO_NO_INCREMENT, 1, FALSE);
+ KeReleaseSemaphore(&queue->WorkItemSemaphore, IO_DISK_INCREMENT, 1, FALSE);
// Free the item
ReleasePoolBuffer(queue, item);