mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 14:30:57 +00:00
[NTOSKRNL/IO]
- Always use interlocked operations on DeviceObject->ReferenceCount svn path=/trunk/; revision=55128
This commit is contained in:
parent
d68b29a234
commit
2ea0f55590
2 changed files with 2 additions and 2 deletions
|
@ -486,7 +486,7 @@ IopDereferenceDeviceObject(IN PDEVICE_OBJECT DeviceObject,
|
||||||
ASSERT(DeviceObject->ReferenceCount);
|
ASSERT(DeviceObject->ReferenceCount);
|
||||||
|
|
||||||
/* Dereference the device */
|
/* Dereference the device */
|
||||||
DeviceObject->ReferenceCount--;
|
InterlockedDecrement(&DeviceObject->ReferenceCount);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if we can unload it and it's safe to unload (or if we're forcing
|
* Check if we can unload it and it's safe to unload (or if we're forcing
|
||||||
|
|
|
@ -157,7 +157,7 @@ IopCheckDeviceAndDriver(IN POPEN_PACKET OpenPacket,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Increase reference count */
|
/* Increase reference count */
|
||||||
DeviceObject->ReferenceCount++;
|
InterlockedIncrement(&DeviceObject->ReferenceCount);
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue