excreate.c (127175) | excreate.c (128212) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: excreate - Named object creation | 1/****************************************************************************** 2 * 3 * Module Name: excreate - Named object creation |
4 * $Revision: 102 $ | 4 * $Revision: 103 $ |
5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. --- 141 unchanged lines hidden (view full) --- 154 ACPI_FUNCTION_TRACE ("ExCreateAlias"); 155 156 157 /* Get the source/alias operands (both namespace nodes) */ 158 159 AliasNode = (ACPI_NAMESPACE_NODE *) WalkState->Operands[0]; 160 TargetNode = (ACPI_NAMESPACE_NODE *) WalkState->Operands[1]; 161 | 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. --- 141 unchanged lines hidden (view full) --- 154 ACPI_FUNCTION_TRACE ("ExCreateAlias"); 155 156 157 /* Get the source/alias operands (both namespace nodes) */ 158 159 AliasNode = (ACPI_NAMESPACE_NODE *) WalkState->Operands[0]; 160 TargetNode = (ACPI_NAMESPACE_NODE *) WalkState->Operands[1]; 161 |
162 if (TargetNode->Type == ACPI_TYPE_LOCAL_ALIAS) | 162 if ((TargetNode->Type == ACPI_TYPE_LOCAL_ALIAS) || 163 (TargetNode->Type == ACPI_TYPE_LOCAL_METHOD_ALIAS)) |
163 { 164 /* 165 * Dereference an existing alias so that we don't create a chain 166 * of aliases. With this code, we guarantee that an alias is 167 * always exactly one level of indirection away from the 168 * actual aliased name. 169 */ | 164 { 165 /* 166 * Dereference an existing alias so that we don't create a chain 167 * of aliases. With this code, we guarantee that an alias is 168 * always exactly one level of indirection away from the 169 * actual aliased name. 170 */ |
170 TargetNode = (ACPI_NAMESPACE_NODE *) TargetNode->Object; | 171 TargetNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, TargetNode->Object); |
171 } 172 173 /* 174 * For objects that can never change (i.e., the NS node will 175 * permanently point to the same object), we can simply attach 176 * the object to the new NS node. For other objects (such as 177 * Integers, buffers, etc.), we have to point the Alias node 178 * to the original Node. --- 10 unchanged lines hidden (view full) --- 189 * The new alias has the type ALIAS and points to the original 190 * NS node, not the object itself. This is because for these 191 * types, the object can change dynamically via a Store. 192 */ 193 AliasNode->Type = ACPI_TYPE_LOCAL_ALIAS; 194 AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode); 195 break; 196 | 172 } 173 174 /* 175 * For objects that can never change (i.e., the NS node will 176 * permanently point to the same object), we can simply attach 177 * the object to the new NS node. For other objects (such as 178 * Integers, buffers, etc.), we have to point the Alias node 179 * to the original Node. --- 10 unchanged lines hidden (view full) --- 190 * The new alias has the type ALIAS and points to the original 191 * NS node, not the object itself. This is because for these 192 * types, the object can change dynamically via a Store. 193 */ 194 AliasNode->Type = ACPI_TYPE_LOCAL_ALIAS; 195 AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode); 196 break; 197 |
198 case ACPI_TYPE_METHOD: 199 200 /* 201 * The new alias has the type ALIAS and points to the original 202 * NS node, not the object itself. This is because for these 203 * types, the object can change dynamically via a Store. 204 */ 205 AliasNode->Type = ACPI_TYPE_LOCAL_METHOD_ALIAS; 206 AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode); 207 break; 208 |
|
197 default: 198 199 /* Attach the original source object to the new Alias Node */ 200 201 /* 202 * The new alias assumes the type of the target, and it points 203 * to the same object. The reference count of the object has an 204 * additional reference to prevent deletion out from under either the --- 527 unchanged lines hidden --- | 209 default: 210 211 /* Attach the original source object to the new Alias Node */ 212 213 /* 214 * The new alias assumes the type of the target, and it points 215 * to the same object. The reference count of the object has an 216 * additional reference to prevent deletion out from under either the --- 527 unchanged lines hidden --- |