mirror of
https://github.com/reactos/reactos.git
synced 2024-09-09 20:30:04 +00:00
Added Spinlock in ObpGetHandleCountbyHandleTable.
svn path=/trunk/; revision=9306
This commit is contained in:
parent
4aeca8b2b1
commit
311d1ab004
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: handle.c,v 1.55 2004/05/02 04:40:25 jimtabor Exp $
|
||||
/* $Id: handle.c,v 1.56 2004/05/04 20:18:52 jimtabor Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -957,8 +957,12 @@ unsigned int i, Count=0;
|
|||
PHANDLE_BLOCK blk;
|
||||
POBJECT_HEADER Header;
|
||||
PVOID ObjectBody;
|
||||
KIRQL oldIrql;
|
||||
|
||||
PLIST_ENTRY current = HandleTable->ListHead.Flink;
|
||||
|
||||
KeAcquireSpinLock(&HandleTable->ListLock, &oldIrql);
|
||||
|
||||
while (current != &HandleTable->ListHead)
|
||||
{
|
||||
blk = CONTAINING_RECORD(current, HANDLE_BLOCK, entry);
|
||||
|
@ -977,6 +981,7 @@ PLIST_ENTRY current = HandleTable->ListHead.Flink;
|
|||
}
|
||||
current = current->Flink;
|
||||
}
|
||||
KeReleaseSpinLock(&HandleTable->ListLock, oldIrql);
|
||||
return (Count);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue