1
0
mirror of https://github.com/winfsp/winfsp.git synced 2026-06-29 15:51:04 -05:00
This commit is contained in:
Bill Zissimopoulos
2015-11-30 10:07:56 -08:00
parent 7c3d69f63b
commit 427f8a20e6
3 changed files with 106 additions and 67 deletions
+17
View File
@@ -22,6 +22,7 @@ static NTSTATUS FspFsvolDeviceInit(PDEVICE_OBJECT DeviceObject);
static VOID FspFsvolDeviceFini(PDEVICE_OBJECT DeviceObject);
BOOLEAN FspDeviceRetain(PDEVICE_OBJECT DeviceObject);
VOID FspDeviceRelease(PDEVICE_OBJECT DeviceObject);
BOOLEAN FspDeviceDeleted(PDEVICE_OBJECT DeviceObject);
NTSTATUS FspDeviceCopyList(
PDEVICE_OBJECT **PDeviceObjects, PULONG PDeviceObjectCount);
VOID FspDeviceDeleteList(
@@ -240,6 +241,22 @@ VOID FspDeviceRelease(PDEVICE_OBJECT DeviceObject)
FspDeviceDelete(DeviceObject);
}
BOOLEAN FspDeviceDeleted(PDEVICE_OBJECT DeviceObject)
{
// !PAGED_CODE();
BOOLEAN Result;
FSP_DEVICE_EXTENSION *DeviceExtension;
KIRQL Irql;
DeviceExtension = FspDeviceExtension(DeviceObject);
KeAcquireSpinLock(&DeviceExtension->SpinLock, &Irql);
Result = 0 == DeviceExtension->RefCount;
KeReleaseSpinLock(&DeviceExtension->SpinLock, Irql);
return Result;
}
NTSTATUS FspDeviceCopyList(
PDEVICE_OBJECT **PDeviceObjects, PULONG PDeviceObjectCount)
{