mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
more correct fix by Alex
svn path=/trunk/; revision=34467
This commit is contained in:
@@ -209,18 +209,12 @@ ExpFreeHandleTable(IN PHANDLE_TABLE HandleTable)
|
||||
{
|
||||
PEPROCESS Process = HandleTable->QuotaProcess;
|
||||
ULONG i, j;
|
||||
ULONG TableLevel;
|
||||
ULONG_PTR TableBase;
|
||||
ULONG_PTR TableCode = HandleTable->TableCode;
|
||||
ULONG TableLevel = TableCode & 3;
|
||||
ULONG_PTR TableBase = TableCode & ~3;
|
||||
PHANDLE_TABLE_ENTRY Level1, *Level2, **Level3;
|
||||
PAGED_CODE();
|
||||
|
||||
/* Get the table code */
|
||||
TableBase = *(volatile ULONG_PTR*)&HandleTable->TableCode;
|
||||
|
||||
/* Extract the table level and actual table base */
|
||||
TableLevel = (ULONG)(TableBase & 3);
|
||||
TableBase = TableBase - TableLevel;
|
||||
|
||||
/* Check which level we're at */
|
||||
if (!TableLevel)
|
||||
{
|
||||
@@ -504,17 +498,11 @@ ExpAllocateHandleTableEntrySlow(IN PHANDLE_TABLE HandleTable,
|
||||
PHANDLE_TABLE_ENTRY Low = NULL, *Mid, **High, *SecondLevel, **ThirdLevel;
|
||||
ULONG NewFree, FirstFree;
|
||||
PVOID Value;
|
||||
ULONG_PTR TableBase;
|
||||
ULONG TableLevel;
|
||||
ULONG_PTR TableCode = HandleTable->TableCode;
|
||||
ULONG_PTR TableBase = TableCode & ~3;
|
||||
ULONG TableLevel = (ULONG)(TableCode & 3);
|
||||
PAGED_CODE();
|
||||
|
||||
/* Get the table code */
|
||||
TableBase = *(volatile ULONG_PTR*)&HandleTable->TableCode;
|
||||
|
||||
/* Extract the table level and actual table base */
|
||||
TableLevel = (ULONG)(TableBase & 3);
|
||||
TableBase = TableBase - TableLevel;
|
||||
|
||||
/* Check how many levels we already have */
|
||||
if (!TableLevel)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user