Author: pschweitzer
Date: Fri Jan 16 07:10:53 2009
New Revision: 38787
URL:
http://svn.reactos.org/svn/reactos?rev=38787&view=rev
Log:
Fixed code
Modified:
branches/pierre-fsd/ntoskrnl/fsrtl/notify.c
Modified: branches/pierre-fsd/ntoskrnl/fsrtl/notify.c
URL:
http://svn.reactos.org/svn/reactos/branches/pierre-fsd/ntoskrnl/fsrtl/notif…
==============================================================================
--- branches/pierre-fsd/ntoskrnl/fsrtl/notify.c [iso-8859-1] (original)
+++ branches/pierre-fsd/ntoskrnl/fsrtl/notify.c [iso-8859-1] Fri Jan 16 07:10:53 2009
@@ -43,11 +43,13 @@
FORCEINLINE
FsRtlNotifyAcquireFastMutex(IN PREAL_NOTIFY_SYNC RealNotifySync)
{
+ ULONG_PTR CurrentThread = (ULONG_PTR)KeGetCurrentThread();
+
/* Only acquire fast mutex if it's not already acquired by the current thread */
- if (RealNotifySync->OwningThread != (ULONG_PTR)KeGetCurrentThread())
+ if (RealNotifySync->OwningThread != CurrentThread)
{
ExAcquireFastMutexUnsafe(&(RealNotifySync->FastMutex));
- RealNotifySync->OwningThread = (ULONG_PTR)KeGetCurrentThread();
+ RealNotifySync->OwningThread = CurrentThread;
}
/* Whatever the case, keep trace of the attempt to acquire fast mutex */
RealNotifySync->OwnerCount++;
@@ -215,7 +217,7 @@
/* Remove from the list */
RemoveEntryList(NotifyChange->NotifyList);
- /* Downcrease reference number and if 0 is reached, it's time to do total
cleanup */
+ /* Downcrease reference number and if 0 is reached, it's time to do
complete cleanup */
if (!InterlockedDecrement((PLONG)&(NotifyChange->ReferenceCount)))
{
/* In case there was an allocated buffer, free it */