dswscope.c (151600) | dswscope.c (151937) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: dswscope - Scope stack manipulation | 1/****************************************************************************** 2 * 3 * Module Name: dswscope - Scope stack manipulation |
4 * $Revision: 60 $ | 4 * $Revision: 1.63 $ |
5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * | 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * |
12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. | 12 * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp. |
13 * All rights reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. --- 98 unchanged lines hidden (view full) --- 119#include <contrib/dev/acpica/acpi.h> 120#include <contrib/dev/acpica/acdispat.h> 121 122 123#define _COMPONENT ACPI_DISPATCHER 124 ACPI_MODULE_NAME ("dswscope") 125 126 | 13 * All rights reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. --- 98 unchanged lines hidden (view full) --- 119#include <contrib/dev/acpica/acpi.h> 120#include <contrib/dev/acpica/acdispat.h> 121 122 123#define _COMPONENT ACPI_DISPATCHER 124 ACPI_MODULE_NAME ("dswscope") 125 126 |
127#define STACK_POP(head) head 128 129 | |
130/**************************************************************************** 131 * 132 * FUNCTION: AcpiDsScopeStackClear 133 * | 127/**************************************************************************** 128 * 129 * FUNCTION: AcpiDsScopeStackClear 130 * |
134 * PARAMETERS: None | 131 * PARAMETERS: WalkState - Current state |
135 * | 132 * |
133 * RETURN: None 134 * |
|
136 * DESCRIPTION: Pop (and free) everything on the scope stack except the 137 * root scope object (which remains at the stack top.) 138 * 139 ***************************************************************************/ 140 141void 142AcpiDsScopeStackClear ( 143 ACPI_WALK_STATE *WalkState) --- 6 unchanged lines hidden (view full) --- 150 while (WalkState->ScopeInfo) 151 { 152 /* Pop a scope off the stack */ 153 154 ScopeInfo = WalkState->ScopeInfo; 155 WalkState->ScopeInfo = ScopeInfo->Scope.Next; 156 157 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, | 135 * DESCRIPTION: Pop (and free) everything on the scope stack except the 136 * root scope object (which remains at the stack top.) 137 * 138 ***************************************************************************/ 139 140void 141AcpiDsScopeStackClear ( 142 ACPI_WALK_STATE *WalkState) --- 6 unchanged lines hidden (view full) --- 149 while (WalkState->ScopeInfo) 150 { 151 /* Pop a scope off the stack */ 152 153 ScopeInfo = WalkState->ScopeInfo; 154 WalkState->ScopeInfo = ScopeInfo->Scope.Next; 155 156 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, |
158 "Popped object type (%s)\n", AcpiUtGetTypeName (ScopeInfo->Common.Value))); | 157 "Popped object type (%s)\n", 158 AcpiUtGetTypeName (ScopeInfo->Common.Value))); |
159 AcpiUtDeleteGenericState (ScopeInfo); 160 } 161} 162 163 164/**************************************************************************** 165 * 166 * FUNCTION: AcpiDsScopeStackPush 167 * | 159 AcpiUtDeleteGenericState (ScopeInfo); 160 } 161} 162 163 164/**************************************************************************** 165 * 166 * FUNCTION: AcpiDsScopeStackPush 167 * |
168 * PARAMETERS: *Node, - Name to be made current 169 * Type, - Type of frame being pushed | 168 * PARAMETERS: Node - Name to be made current 169 * Type - Type of frame being pushed 170 * WalkState - Current state |
170 * | 171 * |
172 * RETURN: Status 173 * |
|
171 * DESCRIPTION: Push the current scope on the scope stack, and make the 172 * passed Node current. 173 * 174 ***************************************************************************/ 175 176ACPI_STATUS 177AcpiDsScopeStackPush ( 178 ACPI_NAMESPACE_NODE *Node, --- 14 unchanged lines hidden (view full) --- 193 ACPI_REPORT_ERROR (("DsScopeStackPush: null scope passed\n")); 194 return_ACPI_STATUS (AE_BAD_PARAMETER); 195 } 196 197 /* Make sure object type is valid */ 198 199 if (!AcpiUtValidObjectType (Type)) 200 { | 174 * DESCRIPTION: Push the current scope on the scope stack, and make the 175 * passed Node current. 176 * 177 ***************************************************************************/ 178 179ACPI_STATUS 180AcpiDsScopeStackPush ( 181 ACPI_NAMESPACE_NODE *Node, --- 14 unchanged lines hidden (view full) --- 196 ACPI_REPORT_ERROR (("DsScopeStackPush: null scope passed\n")); 197 return_ACPI_STATUS (AE_BAD_PARAMETER); 198 } 199 200 /* Make sure object type is valid */ 201 202 if (!AcpiUtValidObjectType (Type)) 203 { |
201 ACPI_REPORT_WARNING (("DsScopeStackPush: Invalid object type: 0x%X\n", Type)); | 204 ACPI_REPORT_WARNING (( 205 "DsScopeStackPush: Invalid object type: 0x%X\n", Type)); |
202 } 203 204 /* Allocate a new scope object */ 205 206 ScopeInfo = AcpiUtCreateGenericState (); 207 if (!ScopeInfo) 208 { 209 return_ACPI_STATUS (AE_NO_MEMORY); --- 35 unchanged lines hidden (view full) --- 245 return_ACPI_STATUS (AE_OK); 246} 247 248 249/**************************************************************************** 250 * 251 * FUNCTION: AcpiDsScopeStackPop 252 * | 206 } 207 208 /* Allocate a new scope object */ 209 210 ScopeInfo = AcpiUtCreateGenericState (); 211 if (!ScopeInfo) 212 { 213 return_ACPI_STATUS (AE_NO_MEMORY); --- 35 unchanged lines hidden (view full) --- 249 return_ACPI_STATUS (AE_OK); 250} 251 252 253/**************************************************************************** 254 * 255 * FUNCTION: AcpiDsScopeStackPop 256 * |
253 * PARAMETERS: Type - The type of frame to be found | 257 * PARAMETERS: WalkState - Current state |
254 * | 258 * |
255 * DESCRIPTION: Pop the scope stack until a frame of the requested type 256 * is found. | 259 * RETURN: Status |
257 * | 260 * |
258 * RETURN: Count of frames popped. If no frame of the requested type 259 * was found, the count is returned as a negative number and 260 * the scope stack is emptied (which sets the current scope 261 * to the root). If the scope stack was empty at entry, the 262 * function is a no-op and returns 0. | 261 * DESCRIPTION: Pop the scope stack once. |
263 * 264 ***************************************************************************/ 265 266ACPI_STATUS 267AcpiDsScopeStackPop ( 268 ACPI_WALK_STATE *WalkState) 269{ 270 ACPI_GENERIC_STATE *ScopeInfo; --- 42 unchanged lines hidden --- | 262 * 263 ***************************************************************************/ 264 265ACPI_STATUS 266AcpiDsScopeStackPop ( 267 ACPI_WALK_STATE *WalkState) 268{ 269 ACPI_GENERIC_STATE *ScopeInfo; --- 42 unchanged lines hidden --- |