diff options
author | Mike Smith <msmith@FreeBSD.org> | 2001-10-31 02:32:29 +0000 |
---|---|---|
committer | Mike Smith <msmith@FreeBSD.org> | 2001-10-31 02:32:29 +0000 |
commit | 0c794f32134774ae8f3645df68425c5f234a990e (patch) | |
tree | b9cb5f0ef2b19b51331c445a1773fd55ce0b739e /sys/contrib/dev/acpica/nswalk.c | |
parent | 831a948d299c639898d67606cfff849ca99110a6 (diff) | |
download | src-0c794f32134774ae8f3645df68425c5f234a990e.tar.gz src-0c794f32134774ae8f3645df68425c5f234a990e.zip |
Import the Intel ACPI CA 20011018 snapshot
Notes
Notes:
svn path=/vendor-sys/acpica/dist/; revision=85756
Diffstat (limited to 'sys/contrib/dev/acpica/nswalk.c')
-rw-r--r-- | sys/contrib/dev/acpica/nswalk.c | 82 |
1 files changed, 36 insertions, 46 deletions
diff --git a/sys/contrib/dev/acpica/nswalk.c b/sys/contrib/dev/acpica/nswalk.c index 1cd54ce3d45d..c39e7a3f8546 100644 --- a/sys/contrib/dev/acpica/nswalk.c +++ b/sys/contrib/dev/acpica/nswalk.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: nswalk - Functions for walking the ACPI namespace - * $Revision: 24 $ + * $Revision: 26 $ * *****************************************************************************/ @@ -126,27 +126,27 @@ MODULE_NAME ("nswalk") -/**************************************************************************** +/******************************************************************************* * - * FUNCTION: AcpiGetNextObject + * FUNCTION: AcpiNsGetNextNode * - * PARAMETERS: Type - Type of object to be searched for - * Parent - Parent object whose children we are - * getting - * LastChild - Previous child that was found. + * PARAMETERS: Type - Type of node to be searched for + * ParentNode - Parent node whose children we are + * getting + * ChildNode - Previous child that was found. * The NEXT child will be returned * * RETURN: ACPI_NAMESPACE_NODE - Pointer to the NEXT child or NULL if - * none is found. + * none is found. * - * DESCRIPTION: Return the next peer object within the namespace. If Handle - * is valid, Scope is ignored. Otherwise, the first object + * DESCRIPTION: Return the next peer node within the namespace. If Handle + * is valid, Scope is ignored. Otherwise, the first node * within Scope is returned. * - ****************************************************************************/ + ******************************************************************************/ ACPI_NAMESPACE_NODE * -AcpiNsGetNextObject ( +AcpiNsGetNextNode ( ACPI_OBJECT_TYPE8 Type, ACPI_NAMESPACE_NODE *ParentNode, ACPI_NAMESPACE_NODE *ChildNode) @@ -169,12 +169,11 @@ AcpiNsGetNextObject ( else { - /* Start search at the NEXT object */ + /* Start search at the NEXT node */ - NextNode = AcpiNsGetNextValidObject (ChildNode); + NextNode = AcpiNsGetNextValidNode (ChildNode); } - /* If any type is OK, we are done */ if (Type == ACPI_TYPE_ANY) @@ -184,8 +183,7 @@ AcpiNsGetNextObject ( return (NextNode); } - - /* Must search for the object -- but within this scope only */ + /* Must search for the node -- but within this scope only */ while (NextNode) { @@ -196,19 +194,18 @@ AcpiNsGetNextObject ( return (NextNode); } - /* Otherwise, move on to the next object */ + /* Otherwise, move on to the next node */ - NextNode = AcpiNsGetNextValidObject (NextNode); + NextNode = AcpiNsGetNextValidNode (NextNode); } - /* Not found */ return (NULL); } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiNsWalkNamespace * @@ -219,13 +216,13 @@ AcpiNsGetNextObject ( * the callback routine * UserFunction - Called when an object of "Type" is found * Context - Passed to user function - * - * RETURNS Return value from the UserFunction if terminated early. - * Otherwise, returns NULL. + * ReturnValue - from the UserFunction if terminated early. + * Otherwise, returns NULL. + * RETURNS: Status * * DESCRIPTION: Performs a modified depth-first walk of the namespace tree, - * starting (and ending) at the object specified by StartHandle. - * The UserFunction is called whenever an object that matches + * starting (and ending) at the node specified by StartHandle. + * The UserFunction is called whenever a node that matches * the type parameter is found. If the user function returns * a non-zero value, the search is terminated immediately and this * value is returned to the caller. @@ -265,34 +262,28 @@ AcpiNsWalkNamespace ( StartNode = AcpiGbl_RootNode; } + /* Null child means "get first node" */ - /* Null child means "get first object" */ - - ParentNode = StartNode; - ChildNode = 0; + ParentNode = StartNode; + ChildNode = 0; ChildType = ACPI_TYPE_ANY; Level = 1; /* - * Traverse the tree of objects until we bubble back up to where we + * Traverse the tree of nodes until we bubble back up to where we * started. When Level is zero, the loop is done because we have * bubbled up to (and passed) the original parent handle (StartEntry) */ while (Level > 0) { - /* - * Get the next typed object in this scope. Null returned - * if not found - */ - Status = AE_OK; - ChildNode = AcpiNsGetNextObject (ACPI_TYPE_ANY, - ParentNode, - ChildNode); + /* Get the next node in this scope. Null if not found */ + Status = AE_OK; + ChildNode = AcpiNsGetNextNode (ACPI_TYPE_ANY, ParentNode, ChildNode); if (ChildNode) { /* - * Found an object, Get the type if we are not + * Found node, Get the type if we are not * searching for ANY */ if (Type != ACPI_TYPE_ANY) @@ -303,7 +294,7 @@ AcpiNsWalkNamespace ( if (ChildType == Type) { /* - * Found a matching object, invoke the user + * Found a matching node, invoke the user * callback function */ if (UnlockBeforeCallback) @@ -353,12 +344,11 @@ AcpiNsWalkNamespace ( */ if ((Level < MaxDepth) && (Status != AE_CTRL_DEPTH)) { - if (AcpiNsGetNextObject (ACPI_TYPE_ANY, - ChildNode, 0)) + if (AcpiNsGetNextNode (ACPI_TYPE_ANY, ChildNode, 0)) { /* * There is at least one child of this - * object, visit the object + * node, visit the onde */ Level++; ParentNode = ChildNode; @@ -370,9 +360,9 @@ AcpiNsWalkNamespace ( else { /* - * No more children in this object (AcpiNsGetNextObject + * No more children of this node (AcpiNsGetNextNode * failed), go back upwards in the namespace tree to - * the object's parent. + * the node's parent. */ Level--; ChildNode = ParentNode; |