mirror of
https://github.com/reactos/reactos.git
synced 2024-07-09 06:05:11 +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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue