Print this page
update to acpica-unix2-20131115
acpica-unix2-20130823
PANKOVs restructure

*** 3,13 **** * Module Name: nsalloc - Namespace allocation and deletion utilities * ******************************************************************************/ /* ! * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: --- 3,13 ---- * Module Name: nsalloc - Namespace allocation and deletion utilities * ******************************************************************************/ /* ! * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
*** 119,128 **** --- 119,129 ---- void AcpiNsDeleteNode ( ACPI_NAMESPACE_NODE *Node) { ACPI_OPERAND_OBJECT *ObjDesc; + ACPI_OPERAND_OBJECT *NextDesc; ACPI_FUNCTION_NAME (NsDeleteNode);
*** 129,156 **** /* Detach an object if there is one */ AcpiNsDetachObject (Node); /* ! * Delete an attached data object if present (an object that was created ! * and attached via AcpiAttachData). Note: After any normal object is ! * detached above, the only possible remaining object is a data object. */ ObjDesc = Node->Object; ! if (ObjDesc && (ObjDesc->Common.Type == ACPI_TYPE_LOCAL_DATA)) { /* Invoke the attached data deletion handler if present */ if (ObjDesc->Data.Handler) { ObjDesc->Data.Handler (Node, ObjDesc->Data.Pointer); } AcpiUtRemoveReference (ObjDesc); } /* Now we can delete the node */ (void) AcpiOsReleaseObject (AcpiGbl_NamespaceCache, Node); ACPI_MEM_TRACKING (AcpiGbl_NsNodeList->TotalFreed++); --- 130,167 ---- /* Detach an object if there is one */ AcpiNsDetachObject (Node); /* ! * Delete an attached data object list if present (objects that were ! * attached via AcpiAttachData). Note: After any normal object is ! * detached above, the only possible remaining object(s) are data ! * objects, in a linked list. */ ObjDesc = Node->Object; ! while (ObjDesc && (ObjDesc->Common.Type == ACPI_TYPE_LOCAL_DATA)) { /* Invoke the attached data deletion handler if present */ if (ObjDesc->Data.Handler) { ObjDesc->Data.Handler (Node, ObjDesc->Data.Pointer); } + NextDesc = ObjDesc->Common.NextObject; AcpiUtRemoveReference (ObjDesc); + ObjDesc = NextDesc; } + /* Special case for the statically allocated root node */ + + if (Node == AcpiGbl_RootNode) + { + return; + } + /* Now we can delete the node */ (void) AcpiOsReleaseObject (AcpiGbl_NamespaceCache, Node); ACPI_MEM_TRACKING (AcpiGbl_NsNodeList->TotalFreed++);
*** 582,588 **** } (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); return_VOID; } - - --- 593,597 ----