2006-06-30 18:54:34 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Kernel
|
|
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
2005-01-26 13:58:37 +00:00
|
|
|
* FILE: ntoskrnl/io/remlock.c
|
2006-06-30 18:54:34 +00:00
|
|
|
* PURPOSE: Remove Lock Support
|
|
|
|
* PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
|
|
|
|
* Filip Navara (navaraf@reactos.org)
|
Plug & Play manager improvments + few other things
ntoskrnl/ntoskrnl.edf:
Added exports for IoGetDmaAdapter, IoIsWdmVersionAvailable,
KefAcquireSpinLockAtDpcLevel, KefReleaseSpinLockFromDpcLevel,
ExFreePoolWithTag.
ntoskrnl/io/driver.c:
Implementation of NtUnloadDriver.
ntoskrnl/io/device.c:
Added prepending "\\SystemRoot\" and displaying "PnP Loading xxx..." message
in IopInitializeDeviceNodeService.
ntoskrnl/io/pnpmgr.c:
Split into ntoskrnl/io/pnpmgr.c, ntoskrnl/io/deviface.c,
ntoskrnl/io/pnpnotify.c, ntoskrnl/io/pnpmgr/pnpdma.c,
ntoskrnl/io/pnpmgr.c, ntoskrnl/io/pnpmgr/pnproot.c,
ntoskrnl/io/remlock.c, ntoskrnl/io/pnpmgr/pnpreport.c.
Fixed registry handling in IopActionInterrogateDeviceStack and
IopActionConfigureChildServices.
Partial implementation of IoGetDeviceProperty.
ntoskrnl/io/pnpdma.c:
Implementation of IoGetDmaAdapter.
ntoskrnl/io/wdm.c:
New file. Contains implementation of IoIsWdmVersionAvailable.
ntoskrnl/ke/spinlock.c:
Added KeAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
ntoskrnl/mm/pool.c:
Partial implementation of ExFreePoolWithTag.
svn path=/trunk/; revision=6136
2003-09-25 15:54:43 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
2004-08-15 16:39:12 +00:00
|
|
|
#include <ntoskrnl.h>
|
2006-06-30 18:54:34 +00:00
|
|
|
#define NDEBUG
|
2008-08-30 16:31:06 +00:00
|
|
|
#include <debug.h>
|
Plug & Play manager improvments + few other things
ntoskrnl/ntoskrnl.edf:
Added exports for IoGetDmaAdapter, IoIsWdmVersionAvailable,
KefAcquireSpinLockAtDpcLevel, KefReleaseSpinLockFromDpcLevel,
ExFreePoolWithTag.
ntoskrnl/io/driver.c:
Implementation of NtUnloadDriver.
ntoskrnl/io/device.c:
Added prepending "\\SystemRoot\" and displaying "PnP Loading xxx..." message
in IopInitializeDeviceNodeService.
ntoskrnl/io/pnpmgr.c:
Split into ntoskrnl/io/pnpmgr.c, ntoskrnl/io/deviface.c,
ntoskrnl/io/pnpnotify.c, ntoskrnl/io/pnpmgr/pnpdma.c,
ntoskrnl/io/pnpmgr.c, ntoskrnl/io/pnpmgr/pnproot.c,
ntoskrnl/io/remlock.c, ntoskrnl/io/pnpmgr/pnpreport.c.
Fixed registry handling in IopActionInterrogateDeviceStack and
IopActionConfigureChildServices.
Partial implementation of IoGetDeviceProperty.
ntoskrnl/io/pnpdma.c:
Implementation of IoGetDmaAdapter.
ntoskrnl/io/wdm.c:
New file. Contains implementation of IoIsWdmVersionAvailable.
ntoskrnl/ke/spinlock.c:
Added KeAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
ntoskrnl/mm/pool.c:
Partial implementation of ExFreePoolWithTag.
svn path=/trunk/; revision=6136
2003-09-25 15:54:43 +00:00
|
|
|
|
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
VOID
|
2006-06-30 18:54:34 +00:00
|
|
|
NTAPI
|
|
|
|
IoInitializeRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock,
|
|
|
|
IN ULONG AllocateTag,
|
|
|
|
IN ULONG MaxLockedMinutes,
|
|
|
|
IN ULONG HighWatermark,
|
|
|
|
IN ULONG RemlockSize)
|
Plug & Play manager improvments + few other things
ntoskrnl/ntoskrnl.edf:
Added exports for IoGetDmaAdapter, IoIsWdmVersionAvailable,
KefAcquireSpinLockAtDpcLevel, KefReleaseSpinLockFromDpcLevel,
ExFreePoolWithTag.
ntoskrnl/io/driver.c:
Implementation of NtUnloadDriver.
ntoskrnl/io/device.c:
Added prepending "\\SystemRoot\" and displaying "PnP Loading xxx..." message
in IopInitializeDeviceNodeService.
ntoskrnl/io/pnpmgr.c:
Split into ntoskrnl/io/pnpmgr.c, ntoskrnl/io/deviface.c,
ntoskrnl/io/pnpnotify.c, ntoskrnl/io/pnpmgr/pnpdma.c,
ntoskrnl/io/pnpmgr.c, ntoskrnl/io/pnpmgr/pnproot.c,
ntoskrnl/io/remlock.c, ntoskrnl/io/pnpmgr/pnpreport.c.
Fixed registry handling in IopActionInterrogateDeviceStack and
IopActionConfigureChildServices.
Partial implementation of IoGetDeviceProperty.
ntoskrnl/io/pnpdma.c:
Implementation of IoGetDmaAdapter.
ntoskrnl/io/wdm.c:
New file. Contains implementation of IoIsWdmVersionAvailable.
ntoskrnl/ke/spinlock.c:
Added KeAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
ntoskrnl/mm/pool.c:
Partial implementation of ExFreePoolWithTag.
svn path=/trunk/; revision=6136
2003-09-25 15:54:43 +00:00
|
|
|
{
|
2006-06-30 18:54:34 +00:00
|
|
|
PEXTENDED_IO_REMOVE_LOCK Lock = (PEXTENDED_IO_REMOVE_LOCK)RemoveLock;
|
|
|
|
PAGED_CODE();
|
|
|
|
|
|
|
|
/* Check if this is a debug lock */
|
|
|
|
if (RemlockSize == sizeof(IO_REMOVE_LOCK_DBG_BLOCK))
|
|
|
|
{
|
|
|
|
/* Clear the lock */
|
|
|
|
RtlZeroMemory(Lock, RemlockSize);
|
|
|
|
|
|
|
|
/* Setup debug parameters */
|
|
|
|
Lock->Dbg.HighWatermark = HighWatermark;
|
|
|
|
Lock->Dbg.MaxLockedTicks = MaxLockedMinutes * 600000000;
|
|
|
|
Lock->Dbg.AllocateTag = AllocateTag;
|
|
|
|
KeInitializeSpinLock(&Lock->Dbg.Spin);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Otherwise, setup a free block */
|
|
|
|
Lock->Common.Removed = FALSE;
|
|
|
|
Lock->Common.IoCount = 1;
|
|
|
|
KeInitializeEvent(&Lock->Common.RemoveEvent,
|
|
|
|
SynchronizationEvent,
|
|
|
|
FALSE);
|
|
|
|
}
|
Plug & Play manager improvments + few other things
ntoskrnl/ntoskrnl.edf:
Added exports for IoGetDmaAdapter, IoIsWdmVersionAvailable,
KefAcquireSpinLockAtDpcLevel, KefReleaseSpinLockFromDpcLevel,
ExFreePoolWithTag.
ntoskrnl/io/driver.c:
Implementation of NtUnloadDriver.
ntoskrnl/io/device.c:
Added prepending "\\SystemRoot\" and displaying "PnP Loading xxx..." message
in IopInitializeDeviceNodeService.
ntoskrnl/io/pnpmgr.c:
Split into ntoskrnl/io/pnpmgr.c, ntoskrnl/io/deviface.c,
ntoskrnl/io/pnpnotify.c, ntoskrnl/io/pnpmgr/pnpdma.c,
ntoskrnl/io/pnpmgr.c, ntoskrnl/io/pnpmgr/pnproot.c,
ntoskrnl/io/remlock.c, ntoskrnl/io/pnpmgr/pnpreport.c.
Fixed registry handling in IopActionInterrogateDeviceStack and
IopActionConfigureChildServices.
Partial implementation of IoGetDeviceProperty.
ntoskrnl/io/pnpdma.c:
Implementation of IoGetDmaAdapter.
ntoskrnl/io/wdm.c:
New file. Contains implementation of IoIsWdmVersionAvailable.
ntoskrnl/ke/spinlock.c:
Added KeAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
ntoskrnl/mm/pool.c:
Partial implementation of ExFreePoolWithTag.
svn path=/trunk/; revision=6136
2003-09-25 15:54:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
2006-06-30 18:54:34 +00:00
|
|
|
NTAPI
|
|
|
|
IoAcquireRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock,
|
|
|
|
IN OPTIONAL PVOID Tag,
|
|
|
|
IN LPCSTR File,
|
|
|
|
IN ULONG Line,
|
|
|
|
IN ULONG RemlockSize)
|
Plug & Play manager improvments + few other things
ntoskrnl/ntoskrnl.edf:
Added exports for IoGetDmaAdapter, IoIsWdmVersionAvailable,
KefAcquireSpinLockAtDpcLevel, KefReleaseSpinLockFromDpcLevel,
ExFreePoolWithTag.
ntoskrnl/io/driver.c:
Implementation of NtUnloadDriver.
ntoskrnl/io/device.c:
Added prepending "\\SystemRoot\" and displaying "PnP Loading xxx..." message
in IopInitializeDeviceNodeService.
ntoskrnl/io/pnpmgr.c:
Split into ntoskrnl/io/pnpmgr.c, ntoskrnl/io/deviface.c,
ntoskrnl/io/pnpnotify.c, ntoskrnl/io/pnpmgr/pnpdma.c,
ntoskrnl/io/pnpmgr.c, ntoskrnl/io/pnpmgr/pnproot.c,
ntoskrnl/io/remlock.c, ntoskrnl/io/pnpmgr/pnpreport.c.
Fixed registry handling in IopActionInterrogateDeviceStack and
IopActionConfigureChildServices.
Partial implementation of IoGetDeviceProperty.
ntoskrnl/io/pnpdma.c:
Implementation of IoGetDmaAdapter.
ntoskrnl/io/wdm.c:
New file. Contains implementation of IoIsWdmVersionAvailable.
ntoskrnl/ke/spinlock.c:
Added KeAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
ntoskrnl/mm/pool.c:
Partial implementation of ExFreePoolWithTag.
svn path=/trunk/; revision=6136
2003-09-25 15:54:43 +00:00
|
|
|
{
|
2006-06-30 18:54:34 +00:00
|
|
|
PEXTENDED_IO_REMOVE_LOCK Lock = (PEXTENDED_IO_REMOVE_LOCK)RemoveLock;
|
|
|
|
|
|
|
|
/* Increase the lock count */
|
|
|
|
InterlockedIncrement(&Lock->Common.IoCount);
|
|
|
|
if (!Lock->Common.Removed)
|
Plug & Play manager improvments + few other things
ntoskrnl/ntoskrnl.edf:
Added exports for IoGetDmaAdapter, IoIsWdmVersionAvailable,
KefAcquireSpinLockAtDpcLevel, KefReleaseSpinLockFromDpcLevel,
ExFreePoolWithTag.
ntoskrnl/io/driver.c:
Implementation of NtUnloadDriver.
ntoskrnl/io/device.c:
Added prepending "\\SystemRoot\" and displaying "PnP Loading xxx..." message
in IopInitializeDeviceNodeService.
ntoskrnl/io/pnpmgr.c:
Split into ntoskrnl/io/pnpmgr.c, ntoskrnl/io/deviface.c,
ntoskrnl/io/pnpnotify.c, ntoskrnl/io/pnpmgr/pnpdma.c,
ntoskrnl/io/pnpmgr.c, ntoskrnl/io/pnpmgr/pnproot.c,
ntoskrnl/io/remlock.c, ntoskrnl/io/pnpmgr/pnpreport.c.
Fixed registry handling in IopActionInterrogateDeviceStack and
IopActionConfigureChildServices.
Partial implementation of IoGetDeviceProperty.
ntoskrnl/io/pnpdma.c:
Implementation of IoGetDmaAdapter.
ntoskrnl/io/wdm.c:
New file. Contains implementation of IoIsWdmVersionAvailable.
ntoskrnl/ke/spinlock.c:
Added KeAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
ntoskrnl/mm/pool.c:
Partial implementation of ExFreePoolWithTag.
svn path=/trunk/; revision=6136
2003-09-25 15:54:43 +00:00
|
|
|
{
|
2006-06-30 18:54:34 +00:00
|
|
|
/* Check what kind of lock this is */
|
|
|
|
if (RemlockSize == sizeof(IO_REMOVE_LOCK_DBG_BLOCK))
|
|
|
|
{
|
|
|
|
/* FIXME: Not yet supported */
|
|
|
|
DPRINT1("UNIMPLEMENTED\n");
|
2008-08-24 15:48:05 +00:00
|
|
|
ASSERT(FALSE);
|
2006-06-30 18:54:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Otherwise, decrement the count and check if it's gone */
|
|
|
|
if (!InterlockedDecrement(&Lock->Common.IoCount))
|
|
|
|
{
|
|
|
|
/* Signal the event */
|
|
|
|
KeSetEvent(&Lock->Common.RemoveEvent, IO_NO_INCREMENT, FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return pending delete */
|
|
|
|
return STATUS_DELETE_PENDING;
|
Plug & Play manager improvments + few other things
ntoskrnl/ntoskrnl.edf:
Added exports for IoGetDmaAdapter, IoIsWdmVersionAvailable,
KefAcquireSpinLockAtDpcLevel, KefReleaseSpinLockFromDpcLevel,
ExFreePoolWithTag.
ntoskrnl/io/driver.c:
Implementation of NtUnloadDriver.
ntoskrnl/io/device.c:
Added prepending "\\SystemRoot\" and displaying "PnP Loading xxx..." message
in IopInitializeDeviceNodeService.
ntoskrnl/io/pnpmgr.c:
Split into ntoskrnl/io/pnpmgr.c, ntoskrnl/io/deviface.c,
ntoskrnl/io/pnpnotify.c, ntoskrnl/io/pnpmgr/pnpdma.c,
ntoskrnl/io/pnpmgr.c, ntoskrnl/io/pnpmgr/pnproot.c,
ntoskrnl/io/remlock.c, ntoskrnl/io/pnpmgr/pnpreport.c.
Fixed registry handling in IopActionInterrogateDeviceStack and
IopActionConfigureChildServices.
Partial implementation of IoGetDeviceProperty.
ntoskrnl/io/pnpdma.c:
Implementation of IoGetDmaAdapter.
ntoskrnl/io/wdm.c:
New file. Contains implementation of IoIsWdmVersionAvailable.
ntoskrnl/ke/spinlock.c:
Added KeAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
ntoskrnl/mm/pool.c:
Partial implementation of ExFreePoolWithTag.
svn path=/trunk/; revision=6136
2003-09-25 15:54:43 +00:00
|
|
|
}
|
2006-06-30 18:54:34 +00:00
|
|
|
|
|
|
|
/* Otherwise, return success */
|
|
|
|
return STATUS_SUCCESS;
|
Plug & Play manager improvments + few other things
ntoskrnl/ntoskrnl.edf:
Added exports for IoGetDmaAdapter, IoIsWdmVersionAvailable,
KefAcquireSpinLockAtDpcLevel, KefReleaseSpinLockFromDpcLevel,
ExFreePoolWithTag.
ntoskrnl/io/driver.c:
Implementation of NtUnloadDriver.
ntoskrnl/io/device.c:
Added prepending "\\SystemRoot\" and displaying "PnP Loading xxx..." message
in IopInitializeDeviceNodeService.
ntoskrnl/io/pnpmgr.c:
Split into ntoskrnl/io/pnpmgr.c, ntoskrnl/io/deviface.c,
ntoskrnl/io/pnpnotify.c, ntoskrnl/io/pnpmgr/pnpdma.c,
ntoskrnl/io/pnpmgr.c, ntoskrnl/io/pnpmgr/pnproot.c,
ntoskrnl/io/remlock.c, ntoskrnl/io/pnpmgr/pnpreport.c.
Fixed registry handling in IopActionInterrogateDeviceStack and
IopActionConfigureChildServices.
Partial implementation of IoGetDeviceProperty.
ntoskrnl/io/pnpdma.c:
Implementation of IoGetDmaAdapter.
ntoskrnl/io/wdm.c:
New file. Contains implementation of IoIsWdmVersionAvailable.
ntoskrnl/ke/spinlock.c:
Added KeAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
ntoskrnl/mm/pool.c:
Partial implementation of ExFreePoolWithTag.
svn path=/trunk/; revision=6136
2003-09-25 15:54:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
VOID
|
2006-06-30 18:54:34 +00:00
|
|
|
NTAPI
|
|
|
|
IoReleaseRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock,
|
|
|
|
IN PVOID Tag,
|
|
|
|
IN ULONG RemlockSize)
|
Plug & Play manager improvments + few other things
ntoskrnl/ntoskrnl.edf:
Added exports for IoGetDmaAdapter, IoIsWdmVersionAvailable,
KefAcquireSpinLockAtDpcLevel, KefReleaseSpinLockFromDpcLevel,
ExFreePoolWithTag.
ntoskrnl/io/driver.c:
Implementation of NtUnloadDriver.
ntoskrnl/io/device.c:
Added prepending "\\SystemRoot\" and displaying "PnP Loading xxx..." message
in IopInitializeDeviceNodeService.
ntoskrnl/io/pnpmgr.c:
Split into ntoskrnl/io/pnpmgr.c, ntoskrnl/io/deviface.c,
ntoskrnl/io/pnpnotify.c, ntoskrnl/io/pnpmgr/pnpdma.c,
ntoskrnl/io/pnpmgr.c, ntoskrnl/io/pnpmgr/pnproot.c,
ntoskrnl/io/remlock.c, ntoskrnl/io/pnpmgr/pnpreport.c.
Fixed registry handling in IopActionInterrogateDeviceStack and
IopActionConfigureChildServices.
Partial implementation of IoGetDeviceProperty.
ntoskrnl/io/pnpdma.c:
Implementation of IoGetDmaAdapter.
ntoskrnl/io/wdm.c:
New file. Contains implementation of IoIsWdmVersionAvailable.
ntoskrnl/ke/spinlock.c:
Added KeAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
ntoskrnl/mm/pool.c:
Partial implementation of ExFreePoolWithTag.
svn path=/trunk/; revision=6136
2003-09-25 15:54:43 +00:00
|
|
|
{
|
2006-06-30 18:54:34 +00:00
|
|
|
PEXTENDED_IO_REMOVE_LOCK Lock = (PEXTENDED_IO_REMOVE_LOCK)RemoveLock;
|
|
|
|
|
|
|
|
/* Check what kind of lock this is */
|
|
|
|
if (RemlockSize == sizeof(IO_REMOVE_LOCK_DBG_BLOCK))
|
|
|
|
{
|
|
|
|
/* FIXME: Not yet supported */
|
|
|
|
DPRINT1("UNIMPLEMENTED\n");
|
2008-08-24 15:48:05 +00:00
|
|
|
ASSERT(FALSE);
|
2006-06-30 18:54:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Decrement the lock count */
|
2008-12-03 17:39:55 +00:00
|
|
|
if (!InterlockedDecrement(&Lock->Common.IoCount))
|
2006-06-30 18:54:34 +00:00
|
|
|
{
|
|
|
|
/* Signal the event */
|
|
|
|
KeSetEvent(&Lock->Common.RemoveEvent, IO_NO_INCREMENT, FALSE);
|
|
|
|
}
|
Plug & Play manager improvments + few other things
ntoskrnl/ntoskrnl.edf:
Added exports for IoGetDmaAdapter, IoIsWdmVersionAvailable,
KefAcquireSpinLockAtDpcLevel, KefReleaseSpinLockFromDpcLevel,
ExFreePoolWithTag.
ntoskrnl/io/driver.c:
Implementation of NtUnloadDriver.
ntoskrnl/io/device.c:
Added prepending "\\SystemRoot\" and displaying "PnP Loading xxx..." message
in IopInitializeDeviceNodeService.
ntoskrnl/io/pnpmgr.c:
Split into ntoskrnl/io/pnpmgr.c, ntoskrnl/io/deviface.c,
ntoskrnl/io/pnpnotify.c, ntoskrnl/io/pnpmgr/pnpdma.c,
ntoskrnl/io/pnpmgr.c, ntoskrnl/io/pnpmgr/pnproot.c,
ntoskrnl/io/remlock.c, ntoskrnl/io/pnpmgr/pnpreport.c.
Fixed registry handling in IopActionInterrogateDeviceStack and
IopActionConfigureChildServices.
Partial implementation of IoGetDeviceProperty.
ntoskrnl/io/pnpdma.c:
Implementation of IoGetDmaAdapter.
ntoskrnl/io/wdm.c:
New file. Contains implementation of IoIsWdmVersionAvailable.
ntoskrnl/ke/spinlock.c:
Added KeAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
ntoskrnl/mm/pool.c:
Partial implementation of ExFreePoolWithTag.
svn path=/trunk/; revision=6136
2003-09-25 15:54:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
VOID
|
2006-06-30 18:54:34 +00:00
|
|
|
NTAPI
|
|
|
|
IoReleaseRemoveLockAndWaitEx(IN PIO_REMOVE_LOCK RemoveLock,
|
|
|
|
IN PVOID Tag,
|
|
|
|
IN ULONG RemlockSize)
|
Plug & Play manager improvments + few other things
ntoskrnl/ntoskrnl.edf:
Added exports for IoGetDmaAdapter, IoIsWdmVersionAvailable,
KefAcquireSpinLockAtDpcLevel, KefReleaseSpinLockFromDpcLevel,
ExFreePoolWithTag.
ntoskrnl/io/driver.c:
Implementation of NtUnloadDriver.
ntoskrnl/io/device.c:
Added prepending "\\SystemRoot\" and displaying "PnP Loading xxx..." message
in IopInitializeDeviceNodeService.
ntoskrnl/io/pnpmgr.c:
Split into ntoskrnl/io/pnpmgr.c, ntoskrnl/io/deviface.c,
ntoskrnl/io/pnpnotify.c, ntoskrnl/io/pnpmgr/pnpdma.c,
ntoskrnl/io/pnpmgr.c, ntoskrnl/io/pnpmgr/pnproot.c,
ntoskrnl/io/remlock.c, ntoskrnl/io/pnpmgr/pnpreport.c.
Fixed registry handling in IopActionInterrogateDeviceStack and
IopActionConfigureChildServices.
Partial implementation of IoGetDeviceProperty.
ntoskrnl/io/pnpdma.c:
Implementation of IoGetDmaAdapter.
ntoskrnl/io/wdm.c:
New file. Contains implementation of IoIsWdmVersionAvailable.
ntoskrnl/ke/spinlock.c:
Added KeAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
ntoskrnl/mm/pool.c:
Partial implementation of ExFreePoolWithTag.
svn path=/trunk/; revision=6136
2003-09-25 15:54:43 +00:00
|
|
|
{
|
2006-06-30 18:54:34 +00:00
|
|
|
PEXTENDED_IO_REMOVE_LOCK Lock = (PEXTENDED_IO_REMOVE_LOCK)RemoveLock;
|
|
|
|
PAGED_CODE();
|
|
|
|
|
|
|
|
/* Remove the lock and decrement the count */
|
|
|
|
Lock->Common.Removed = TRUE;
|
|
|
|
if (InterlockedDecrement(&Lock->Common.IoCount) > 0)
|
|
|
|
{
|
|
|
|
/* Wait for it */
|
|
|
|
KeWaitForSingleObject(&Lock->Common.RemoveEvent,
|
|
|
|
Executive,
|
|
|
|
KernelMode,
|
|
|
|
FALSE,
|
|
|
|
NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check what kind of lock this is */
|
|
|
|
if (RemlockSize == sizeof(IO_REMOVE_LOCK_DBG_BLOCK))
|
|
|
|
{
|
|
|
|
/* FIXME: Not yet supported */
|
|
|
|
DPRINT1("UNIMPLEMENTED\n");
|
2008-08-24 15:48:05 +00:00
|
|
|
ASSERT(FALSE);
|
2006-06-30 18:54:34 +00:00
|
|
|
}
|
Plug & Play manager improvments + few other things
ntoskrnl/ntoskrnl.edf:
Added exports for IoGetDmaAdapter, IoIsWdmVersionAvailable,
KefAcquireSpinLockAtDpcLevel, KefReleaseSpinLockFromDpcLevel,
ExFreePoolWithTag.
ntoskrnl/io/driver.c:
Implementation of NtUnloadDriver.
ntoskrnl/io/device.c:
Added prepending "\\SystemRoot\" and displaying "PnP Loading xxx..." message
in IopInitializeDeviceNodeService.
ntoskrnl/io/pnpmgr.c:
Split into ntoskrnl/io/pnpmgr.c, ntoskrnl/io/deviface.c,
ntoskrnl/io/pnpnotify.c, ntoskrnl/io/pnpmgr/pnpdma.c,
ntoskrnl/io/pnpmgr.c, ntoskrnl/io/pnpmgr/pnproot.c,
ntoskrnl/io/remlock.c, ntoskrnl/io/pnpmgr/pnpreport.c.
Fixed registry handling in IopActionInterrogateDeviceStack and
IopActionConfigureChildServices.
Partial implementation of IoGetDeviceProperty.
ntoskrnl/io/pnpdma.c:
Implementation of IoGetDmaAdapter.
ntoskrnl/io/wdm.c:
New file. Contains implementation of IoIsWdmVersionAvailable.
ntoskrnl/ke/spinlock.c:
Added KeAcquireSpinLockAtDpcLevel and KefReleaseSpinLockFromDpcLevel.
ntoskrnl/mm/pool.c:
Partial implementation of ExFreePoolWithTag.
svn path=/trunk/; revision=6136
2003-09-25 15:54:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|