Upgrade to VS2019 and update CSQ locking for analysis
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
c0c1bae82e
commit
17e9e17826
@ -5,7 +5,7 @@ This is a layer 3 TUN driver for Windows 7, 8, 8.1, and 10. Originally created f
|
||||
|
||||
## Build Requirements
|
||||
|
||||
- [Visual Studio 2017](https://visualstudio.microsoft.com/downloads/)
|
||||
- [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/)
|
||||
- [Windows Driver Kit for Windows 10](https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk)
|
||||
- [WiX Toolset 3.11.1](http://wixtoolset.org/releases/)
|
||||
|
||||
@ -35,7 +35,7 @@ If you already have `wintun.vcxproj.user` file, just add the `<PropertyGroup>` s
|
||||
|
||||
## Building from Command Line
|
||||
|
||||
Open _Developer Command Prompt for VS 2017_ and use the `msbuild` command:
|
||||
Open _Developer Command Prompt for VS 2019_ and use the `msbuild` command:
|
||||
|
||||
```
|
||||
msbuild wintun.proj [/t:<target>]
|
||||
|
8
wintun.c
8
wintun.c
@ -217,19 +217,19 @@ static IRP *TunCsqPeekNextIrp(IO_CSQ *Csq, IRP *Irp, _In_ PVOID PeekContext)
|
||||
|
||||
_IRQL_raises_(DISPATCH_LEVEL)
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
_Requires_lock_not_held_(CONTAINING_RECORD(Csq, TUN_CTX, Device.ReadQueue.Csq)->Device.ReadQueue.Lock)
|
||||
_Acquires_lock_(CONTAINING_RECORD(Csq, TUN_CTX, Device.ReadQueue.Csq)->Device.ReadQueue.Lock)
|
||||
static VOID TunCsqAcquireLock(_In_ IO_CSQ *Csq, _Out_ _At_(*Irql, _Post_ _IRQL_saves_) KIRQL *Irql)
|
||||
{
|
||||
TUN_CTX *ctx = CONTAINING_RECORD(Csq, TUN_CTX, Device.ReadQueue.Csq);
|
||||
KeAcquireSpinLock(&ctx->Device.ReadQueue.Lock, Irql);
|
||||
KeAcquireSpinLock(&CONTAINING_RECORD(Csq, TUN_CTX, Device.ReadQueue.Csq)->Device.ReadQueue.Lock, Irql);
|
||||
}
|
||||
|
||||
_IRQL_requires_(DISPATCH_LEVEL)
|
||||
_Requires_lock_held_(CONTAINING_RECORD(Csq, TUN_CTX, Device.ReadQueue.Csq)->Device.ReadQueue.Lock)
|
||||
_Releases_lock_(CONTAINING_RECORD(Csq, TUN_CTX, Device.ReadQueue.Csq)->Device.ReadQueue.Lock)
|
||||
static VOID TunCsqReleaseLock(_In_ IO_CSQ *Csq, _In_ _IRQL_restores_ KIRQL Irql)
|
||||
{
|
||||
TUN_CTX *ctx = CONTAINING_RECORD(Csq, TUN_CTX, Device.ReadQueue.Csq);
|
||||
KeReleaseSpinLock(&ctx->Device.ReadQueue.Lock, Irql);
|
||||
KeReleaseSpinLock(&CONTAINING_RECORD(Csq, TUN_CTX, Device.ReadQueue.Csq)->Device.ReadQueue.Lock, Irql);
|
||||
}
|
||||
|
||||
static IO_CSQ_COMPLETE_CANCELED_IRP TunCsqCompleteCanceledIrp;
|
||||
|
Loading…
Reference in New Issue
Block a user