From 56531ca70da164fbce61928d83b41808f5cb0ab9 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Tue, 12 Oct 2004 20:00:40 +0000 Subject: [PATCH] - Fix logic error in PsDeleteCidHandle. svn path=/trunk/; revision=11282 --- reactos/ntoskrnl/ps/cid.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/ps/cid.c b/reactos/ntoskrnl/ps/cid.c index 88a27735006..e2d5cc1ea97 100644 --- a/reactos/ntoskrnl/ps/cid.c +++ b/reactos/ntoskrnl/ps/cid.c @@ -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;