mirror of
https://github.com/reactos/reactos.git
synced 2024-07-22 04:08:08 +00:00
fixed IopLockFileObject
svn path=/trunk/; revision=27391
This commit is contained in:
parent
be2228c407
commit
6fccf28376
|
@ -10,12 +10,13 @@ VOID
|
||||||
static __inline
|
static __inline
|
||||||
IopLockFileObject(IN PFILE_OBJECT FileObject)
|
IopLockFileObject(IN PFILE_OBJECT FileObject)
|
||||||
{
|
{
|
||||||
/* Lock the FO and check for contention */
|
/* Lock the FO and check for contention */
|
||||||
if (InterlockedExchange((PLONG)&FileObject->Busy, TRUE))
|
InterlockedIncrement((PLONG)&FileObject->Waiters);
|
||||||
|
while (InterlockedCompareExchange((PLONG)&FileObject->Busy, TRUE, FALSE) != FALSE)
|
||||||
{
|
{
|
||||||
/* FIXME: Implement contention case */
|
/* FIXME - pause for a little while? */
|
||||||
KEBUGCHECK(0);
|
|
||||||
}
|
}
|
||||||
|
InterlockedDecrement((PLONG)&FileObject->Waiters);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
|
Loading…
Reference in a new issue