fixed IopLockFileObject

svn path=/trunk/; revision=27391
This commit is contained in:
Christoph von Wittich 2007-07-04 17:05:31 +00:00
parent be2228c407
commit 6fccf28376

View file

@ -10,12 +10,13 @@ VOID
static __inline
IopLockFileObject(IN PFILE_OBJECT FileObject)
{
/* Lock the FO and check for contention */
if (InterlockedExchange((PLONG)&FileObject->Busy, TRUE))
/* Lock the FO and check for contention */
InterlockedIncrement((PLONG)&FileObject->Waiters);
while (InterlockedCompareExchange((PLONG)&FileObject->Busy, TRUE, FALSE) != FALSE)
{
/* FIXME: Implement contention case */
KEBUGCHECK(0);
/* FIXME - pause for a little while? */
}
InterlockedDecrement((PLONG)&FileObject->Waiters);
}
VOID