mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Windows driver: revert to single completion thread until proper implementation is in place
This commit is contained in:
@@ -1263,7 +1263,7 @@ retry_preallocated:
|
|||||||
KeInitializeSpinLock (&queue->CompletionThreadQueueLock);
|
KeInitializeSpinLock (&queue->CompletionThreadQueueLock);
|
||||||
KeInitializeEvent (&queue->CompletionThreadQueueNotEmptyEvent, SynchronizationEvent, FALSE);
|
KeInitializeEvent (&queue->CompletionThreadQueueNotEmptyEvent, SynchronizationEvent, FALSE);
|
||||||
|
|
||||||
status = TCStartThread (CompletionThreadProc, queue, &queue->CompletionThreads[0]);
|
status = TCStartThread (CompletionThreadProc, queue, &queue->CompletionThread);
|
||||||
if (!NT_SUCCESS (status))
|
if (!NT_SUCCESS (status))
|
||||||
{
|
{
|
||||||
queue->ThreadExitRequested = TRUE;
|
queue->ThreadExitRequested = TRUE;
|
||||||
@@ -1272,16 +1272,6 @@ retry_preallocated:
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = TCStartThread (CompletionThreadProc, queue, &queue->CompletionThreads[1]);
|
|
||||||
if (!NT_SUCCESS (status))
|
|
||||||
{
|
|
||||||
queue->ThreadExitRequested = TRUE;
|
|
||||||
TCStopThread (queue->MainThread, &queue->MainThreadQueueNotEmptyEvent);
|
|
||||||
TCStopThread (queue->IoThread, &queue->IoThreadQueueNotEmptyEvent);
|
|
||||||
TCStopThread (queue->CompletionThreads[0], &queue->CompletionThreadQueueNotEmptyEvent);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef TC_TRACE_IO_QUEUE
|
#ifdef TC_TRACE_IO_QUEUE
|
||||||
GetElapsedTimeInit (&queue->LastPerformanceCounter);
|
GetElapsedTimeInit (&queue->LastPerformanceCounter);
|
||||||
#endif
|
#endif
|
||||||
@@ -1326,8 +1316,7 @@ NTSTATUS EncryptedIoQueueStop (EncryptedIoQueue *queue)
|
|||||||
|
|
||||||
TCStopThread (queue->MainThread, &queue->MainThreadQueueNotEmptyEvent);
|
TCStopThread (queue->MainThread, &queue->MainThreadQueueNotEmptyEvent);
|
||||||
TCStopThread (queue->IoThread, &queue->IoThreadQueueNotEmptyEvent);
|
TCStopThread (queue->IoThread, &queue->IoThreadQueueNotEmptyEvent);
|
||||||
TCStopThread (queue->CompletionThreads[0], &queue->CompletionThreadQueueNotEmptyEvent);
|
TCStopThread (queue->CompletionThread, &queue->CompletionThreadQueueNotEmptyEvent);
|
||||||
TCStopThread (queue->CompletionThreads[1], &queue->CompletionThreadQueueNotEmptyEvent);
|
|
||||||
|
|
||||||
// Wait for active work items to complete
|
// Wait for active work items to complete
|
||||||
KeResetEvent(&queue->NoActiveWorkItemsEvent);
|
KeResetEvent(&queue->NoActiveWorkItemsEvent);
|
||||||
|
|||||||
@@ -86,8 +86,8 @@ typedef struct
|
|||||||
KSPIN_LOCK IoThreadQueueLock;
|
KSPIN_LOCK IoThreadQueueLock;
|
||||||
KEVENT IoThreadQueueNotEmptyEvent;
|
KEVENT IoThreadQueueNotEmptyEvent;
|
||||||
|
|
||||||
// Completion threads
|
// Completion thread
|
||||||
PKTHREAD CompletionThreads[2]; // two threads to handle completions
|
PKTHREAD CompletionThread;
|
||||||
LIST_ENTRY CompletionThreadQueue;
|
LIST_ENTRY CompletionThreadQueue;
|
||||||
KSPIN_LOCK CompletionThreadQueueLock;
|
KSPIN_LOCK CompletionThreadQueueLock;
|
||||||
KEVENT CompletionThreadQueueNotEmptyEvent;
|
KEVENT CompletionThreadQueueNotEmptyEvent;
|
||||||
|
|||||||
Reference in New Issue
Block a user