mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 11:31:54 +00:00
[NDISUIO]
- Forgot a file svn path=/branches/wlan-bringup/; revision=54817
This commit is contained in:
parent
93d3b91947
commit
81d8d54ecf
1 changed files with 3 additions and 28 deletions
|
@ -27,19 +27,8 @@ FindAdapterContextByName(PNDIS_STRING DeviceName)
|
|||
/* Check if the device name matches */
|
||||
if (RtlEqualUnicodeString(&AdapterContext->DeviceName, DeviceName, TRUE))
|
||||
{
|
||||
KeAcquireSpinLockAtDpcLevel(&AdapterContext->Spinlock);
|
||||
|
||||
/* Check that it's not being destroyed */
|
||||
if (AdapterContext->OpenCount > 0)
|
||||
{
|
||||
KeReleaseSpinLockFromDpcLevel(&AdapterContext->Spinlock);
|
||||
KeReleaseSpinLock(&GlobalAdapterListLock, OldIrql);
|
||||
return AdapterContext;
|
||||
}
|
||||
else
|
||||
{
|
||||
KeReleaseSpinLockFromDpcLevel(&Adaptercontext->Spinlock);
|
||||
}
|
||||
KeReleaseSpinLock(&GlobalAdapterListLock, OldIrql);
|
||||
return AdapterContext;
|
||||
}
|
||||
|
||||
CurrentEntry = CurrentEntry->Flink;
|
||||
|
@ -50,24 +39,10 @@ FindAdapterContextByName(PNDIS_STRING DeviceName)
|
|||
}
|
||||
|
||||
VOID
|
||||
ReferenceAdapterContext(PNDISUIO_ADAPTER_CONTEXT AdapterContext, BOOLEAN Locked)
|
||||
ReferenceAdapterContext(PNDISUIO_ADAPTER_CONTEXT AdapterContext)
|
||||
{
|
||||
KIRQL OldIrql;
|
||||
|
||||
/* Lock if needed */
|
||||
if (!Locked)
|
||||
{
|
||||
KeAcquireSpinLock(&AdapterContext->Spinlock, &OldIrql);
|
||||
}
|
||||
|
||||
/* Increment the open count */
|
||||
AdapterContext->OpenCount++;
|
||||
|
||||
/* Unlock if needed */
|
||||
if (!Locked)
|
||||
{
|
||||
KeReleaseSpinLock(&AdapterContext->Spinlock, OldIrql);
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue