mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-07-06 04:58:01 -05:00
Windows driver: simplify TCSleep to use KeDelayExecutionThread
Replace timer-based TCSleep (which allocated a KTIMER and waited on it) with an implementation that calls KeDelayExecutionThread. This removes dynamic allocation and kernel timer usage to simplify the code and reduce resource overhead. Adds an IRQL <= APC_LEVEL assertion and documents the requirement. This is safe because TCSleep is always called from code that runs at PASSIVE_LEVEL
This commit is contained in:
@@ -151,7 +151,7 @@ NTSTATUS TCStartVolumeThread (PDEVICE_OBJECT DeviceObject, PEXTENSION Extension,
|
||||
void TCStopThread (PKTHREAD kThread, PKEVENT wakeUpEvent);
|
||||
void TCStopVolumeThread (PDEVICE_OBJECT DeviceObject, PEXTENSION Extension);
|
||||
VOID VolumeThreadProc (PVOID Context);
|
||||
void TCSleep (int milliSeconds);
|
||||
void TCSleep (ULONG milliSeconds);
|
||||
void TCGetNTNameFromNumber (LPWSTR ntname, int cbNtName, int nDriveNo);
|
||||
void TCGetDosNameFromNumber (LPWSTR dosname, int cbDosName, int nDriveNo, DeviceNamespaceType namespaceType);
|
||||
LPWSTR TCTranslateCode (ULONG ulCode);
|
||||
|
||||
Reference in New Issue
Block a user