mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
- Fix logic error in PsDeleteCidHandle.
svn path=/trunk/; revision=11282
This commit is contained in:
parent
9b57fe0ffa
commit
56531ca70d
1 changed files with 3 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: cid.c,v 1.1 2004/09/28 15:02:29 weiden Exp $
|
||||
/* $Id: cid.c,v 1.2 2004/10/12 20:00:40 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -147,9 +147,8 @@ PsLockCidHandle(HANDLE CidHandle, POBJECT_TYPE ObjectType)
|
|||
|
||||
if(Found != NULL)
|
||||
{
|
||||
BOOL GotLock;
|
||||
ULONG Attempt = 0;
|
||||
do
|
||||
for (;;)
|
||||
{
|
||||
if(InterlockedCompareExchange(&Found->Lock, 1, 0) == 0)
|
||||
{
|
||||
|
@ -167,7 +166,7 @@ PsLockCidHandle(HANDLE CidHandle, POBJECT_TYPE ObjectType)
|
|||
/* try again, just wait shortly */
|
||||
KeDelayExecutionThread(KernelMode, FALSE, &ShortDelay);
|
||||
}
|
||||
} while(!GotLock);
|
||||
}
|
||||
}
|
||||
|
||||
return Found;
|
||||
|
|
Loading…
Reference in a new issue