mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 20:34:59 +00:00
fixed IopLockFileObject
svn path=/trunk/; revision=27391
This commit is contained in:
parent
be2228c407
commit
6fccf28376
1 changed files with 5 additions and 4 deletions
|
@ -11,11 +11,12 @@ 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…
Add table
Add a link
Reference in a new issue