mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 08:52:57 +00:00
Added Spinlock in ObpGetHandleCountbyHandleTable.
svn path=/trunk/; revision=9306
This commit is contained in:
parent
4aeca8b2b1
commit
311d1ab004
1 changed files with 6 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -957,8 +957,12 @@ unsigned int i, Count=0;
|
||||||
PHANDLE_BLOCK blk;
|
PHANDLE_BLOCK blk;
|
||||||
POBJECT_HEADER Header;
|
POBJECT_HEADER Header;
|
||||||
PVOID ObjectBody;
|
PVOID ObjectBody;
|
||||||
|
KIRQL oldIrql;
|
||||||
|
|
||||||
PLIST_ENTRY current = HandleTable->ListHead.Flink;
|
PLIST_ENTRY current = HandleTable->ListHead.Flink;
|
||||||
|
|
||||||
|
KeAcquireSpinLock(&HandleTable->ListLock, &oldIrql);
|
||||||
|
|
||||||
while (current != &HandleTable->ListHead)
|
while (current != &HandleTable->ListHead)
|
||||||
{
|
{
|
||||||
blk = CONTAINING_RECORD(current, HANDLE_BLOCK, entry);
|
blk = CONTAINING_RECORD(current, HANDLE_BLOCK, entry);
|
||||||
|
@ -977,6 +981,7 @@ PLIST_ENTRY current = HandleTable->ListHead.Flink;
|
||||||
}
|
}
|
||||||
current = current->Flink;
|
current = current->Flink;
|
||||||
}
|
}
|
||||||
|
KeReleaseSpinLock(&HandleTable->ListLock, oldIrql);
|
||||||
return (Count);
|
return (Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue