Deleted Added
sdiff udiff text old ( 85756 ) new ( 87031 )
full compact
1/*******************************************************************************
2 *
3 * Module Name: nsalloc - Namespace allocation and deletion utilities
4 * $Revision: 62 $
5 *
6 ******************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.

--- 198 unchanged lines hidden (view full) ---

211 {
212 ParentNode->Child = NextNode->Peer;
213 }
214
215
216 ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].TotalFreed++);
217
218 /*
219 * Detach an object if there is one then delete the node
220 */
221 AcpiNsDetachObject (Node);
222 ACPI_MEM_FREE (Node);
223 return_VOID;
224}
225
226
227/*******************************************************************************
228 *
229 * FUNCTION: AcpiNsInstallNode
230 *
231 * PARAMETERS: WalkState - Current state of the walk
232 * ParentNode - The parent of the new Node
233 * Node - The new Node to install
234 * Type - ACPI object type of the new Node
235 *
236 * RETURN: None
237 *
238 * DESCRIPTION: Initialize a new namespace node and install it amongst
239 * its peers.
240 *
241 * Note: Current namespace lookup is linear search, so the nodes
242 * are not linked in any particular order.
243 *
244 ******************************************************************************/
245
246void
247AcpiNsInstallNode (
248 ACPI_WALK_STATE *WalkState,
249 ACPI_NAMESPACE_NODE *ParentNode, /* Parent */
250 ACPI_NAMESPACE_NODE *Node, /* New Child*/
251 ACPI_OBJECT_TYPE8 Type)

--- 10 unchanged lines hidden (view full) ---

262 * The owner ID is used to track table deletion and
263 * deletion of objects created by methods
264 */
265 if (WalkState)
266 {
267 OwnerId = WalkState->OwnerId;
268 }
269
270 /* Link the new entry into the parent and existing children */
271
272 ChildNode = ParentNode->Child;
273 if (!ChildNode)
274 {
275 ParentNode->Child = Node;
276 }
277 else
278 {
279 while (!(ChildNode->Flags & ANOBJ_END_OF_PEER_LIST))
280 {
281 ChildNode = ChildNode->Peer;
282 }
283
284 ChildNode->Peer = Node;

--- 204 unchanged lines hidden (view full) ---

489 * There is at least one child of this node,
490 * visit the node
491 */
492 Level++;
493 ParentNode = ChildNode;
494 ChildNode = 0;
495 }
496 }
497 else
498 {
499 /*
500 * No more children of this parent node.
501 * Move up to the grandparent.
502 */
503 Level--;
504

--- 126 unchanged lines hidden (view full) ---

631 /*
632 * There is at least one child of this node,
633 * visit the node
634 */
635 Level++;
636 ParentNode = ChildNode;
637 ChildNode = 0;
638 }
639 else if (ChildNode->OwnerId == OwnerId)
640 {
641 AcpiNsRemoveReference (ChildNode);
642 }
643 }
644 else
645 {
646 /*
647 * No more children of this parent node.
648 * Move up to the grandparent.
649 */
650 Level--;
651

--- 22 unchanged lines hidden ---