Reference count fix.

date	2000.03.09.21.15.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 18:31:09 +00:00
parent 0cc9fcde83
commit 14a2b6f06d

View File

@ -119,8 +119,8 @@
#include <acpi.h> #include <acpi.h>
#include <amlcode.h> #include <amlcode.h>
#include <namespace.h> #include <namesp.h>
#include <interpreter.h> #include <interp.h>
#include <tables.h> #include <tables.h>
@ -388,7 +388,7 @@ NsAttachObject (
/* Install the object and set the type, flags */ /* Install the object and set the type, flags */
ThisEntry->Object = ObjDesc; ThisEntry->Object = ObjDesc;
ThisEntry->Type = ObjType; ThisEntry->Type = (UINT8) ObjType;
ThisEntry->Flags = Flags; ThisEntry->Flags = Flags;
} }
CmReleaseMutex (MTX_NAMESPACE); CmReleaseMutex (MTX_NAMESPACE);
@ -542,13 +542,10 @@ NsDetachObject (
/* Not every value is an object allocated via CmCallocate, must check */ /* Not every value is an object allocated via CmCallocate, must check */
if (!TbSystemTablePointer (ObjDesc)) /*&& if (!TbSystemTablePointer (ObjDesc))
!VALID_DESCRIPTOR_TYPE (ObjDesc, DESC_TYPE_NTE))*/
{ {
/* Attempt to delete the object (and all subobjects) */
/* Delete the object (and all subobjects) */
CmUpdateObjectReference (ObjDesc, REF_DECREMENT); /* Removed from Namespace */
CmDeleteInternalObject (ObjDesc); CmDeleteInternalObject (ObjDesc);
} }
@ -605,7 +602,7 @@ IsNsObject (
FUNCTION_TRACE ("IsNsObject"); FUNCTION_TRACE ("IsNsObject");
RetHandle = NsFindAttachedObject (ObjDesc, NS_ALL, ACPI_INT_MAX); RetHandle = NsFindAttachedObject (ObjDesc, NS_ALL, ACPI_INT32_MAX);
return_VALUE ((RetHandle != (ACPI_HANDLE) 0)); return_VALUE ((RetHandle != (ACPI_HANDLE) 0));
} }