src/add-ons/kernel/bus_managers/acpi/acpica/components/namespace/nsalloc.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiNsRemoveNode
 *
 * PARAMETERS:  Node            - Node to be removed/deleted
 *
 * RETURN:      None
 *
 * DESCRIPTION: Remove (unlink) and delete a namespace node
 *
 ******************************************************************************/
AcpiNsRemoveNode
PARAMETERS:  Node            - Node to be removed/deleted

None

Remove (unlink) and delete a namespace node
AcpiNsRemoveNode PARAMETERS : Node - Node to be removed / deleted None Remove ( unlink ) and delete a namespace node
void
AcpiNsRemoveNode (
    ACPI_NAMESPACE_NODE     *Node)
{
    ACPI_NAMESPACE_NODE     *ParentNode;
    ACPI_NAMESPACE_NODE     *PrevNode;
    ACPI_NAMESPACE_NODE     *NextNode;
    ACPI_FUNCTION_TRACE_PTR (NsRemoveNode, Node);
    ParentNode = Node->Parent;
    PrevNode = NULL;
    NextNode = ParentNode->Child;
    while (NextNode != Node)
    {
        PrevNode = NextNode;
        NextNode = NextNode->Peer;
    }
    if (PrevNode)
    {
        PrevNode->Peer = Node->Peer;
    }
    else
    {
        ParentNode->Child = Node->Peer;
    }
    AcpiNsDeleteNode (Node);
    return_VOID;
}
void AcpiNsRemoveNode ( ACPI_NAMESPACE_NODE * Node ) { ACPI_NAMESPACE_NODE * ParentNode ; ACPI_NAMESPACE_NODE * PrevNode ; ACPI_NAMESPACE_NODE * NextNode ; ACPI_FUNCTION_TRACE_PTR ( NsRemoveNode , Node ) ; ParentNode = Node -> Parent ; PrevNode = NULL ; NextNode = ParentNode -> Child ; while ( NextNode != Node ) { PrevNode = NextNode ; NextNode = NextNode -> Peer ; } if ( PrevNode ) { PrevNode -> Peer = Node -> Peer ; } else { ParentNode -> Child = Node -> Peer ; } AcpiNsDeleteNode ( Node ) ; return_VOID ; }
FUNCTION:    AcpiNsRemoveNode
 PARAMETERS:  Node            - Node to be removed/deleted
FUNCTION : AcpiNsRemoveNode PARAMETERS : Node - Node to be removed / deleted
/* Find the node that is the previous peer in the parent's child list */ /* Node is not first child, unlink it */ /*
         * Node is first child (has no previous peer).
         * Link peer list to parent
         */ /* Delete the node and any attached objects */