mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 04:13:33 +00:00
[NTOSKRNL/IO]
- Always use interlocked operations on DeviceObject->ReferenceCount svn path=/trunk/; revision=55128
This commit is contained in:
@@ -486,7 +486,7 @@ IopDereferenceDeviceObject(IN PDEVICE_OBJECT DeviceObject,
|
||||
ASSERT(DeviceObject->ReferenceCount);
|
||||
|
||||
/* 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
|
||||
|
||||
@@ -157,7 +157,7 @@ IopCheckDeviceAndDriver(IN POPEN_PACKET OpenPacket,
|
||||
else
|
||||
{
|
||||
/* Increase reference count */
|
||||
DeviceObject->ReferenceCount++;
|
||||
InterlockedIncrement(&DeviceObject->ReferenceCount);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user