nseval.c (71867) | nseval.c (73561) |
---|---|
1/******************************************************************************* 2 * 3 * Module Name: nseval - Object evaluation interfaces -- includes control 4 * method lookup and execution. | 1/******************************************************************************* 2 * 3 * Module Name: nseval - Object evaluation interfaces -- includes control 4 * method lookup and execution. |
5 * $Revision: 81 $ | 5 * $Revision: 83 $ |
6 * 7 ******************************************************************************/ 8 9/****************************************************************************** 10 * 11 * 1. Copyright Notice 12 * 13 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. --- 369 unchanged lines hidden (view full) --- 383 384 /* Get the prefix handle and Node */ 385 386 AcpiCmAcquireMutex (ACPI_MTX_NAMESPACE); 387 388 Node = AcpiNsConvertHandleToEntry (Handle); 389 if (!Node) 390 { | 6 * 7 ******************************************************************************/ 8 9/****************************************************************************** 10 * 11 * 1. Copyright Notice 12 * 13 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. --- 369 unchanged lines hidden (view full) --- 383 384 /* Get the prefix handle and Node */ 385 386 AcpiCmAcquireMutex (ACPI_MTX_NAMESPACE); 387 388 Node = AcpiNsConvertHandleToEntry (Handle); 389 if (!Node) 390 { |
391 Status = AE_BAD_PARAMETER; 392 goto UnlockAndExit; | 391 AcpiCmReleaseMutex (ACPI_MTX_NAMESPACE); 392 return_ACPI_STATUS (AE_BAD_PARAMETER); |
393 } 394 395 396 /* 397 * Two major cases here: 398 * 1) The object is an actual control method -- execute it. 399 * 2) The object is not a method -- just return it's current 400 * value --- 50 unchanged lines hidden (view full) --- 451 } 452 } 453 454 /* 455 * Namespace was unlocked by the handling AcpiNs* function, 456 * so we just return 457 */ 458 return_ACPI_STATUS (Status); | 393 } 394 395 396 /* 397 * Two major cases here: 398 * 1) The object is an actual control method -- execute it. 399 * 2) The object is not a method -- just return it's current 400 * value --- 50 unchanged lines hidden (view full) --- 451 } 452 } 453 454 /* 455 * Namespace was unlocked by the handling AcpiNs* function, 456 * so we just return 457 */ 458 return_ACPI_STATUS (Status); |
459 460 461UnlockAndExit: 462 463 AcpiCmReleaseMutex (ACPI_MTX_NAMESPACE); 464 return_ACPI_STATUS (Status); | |
465} 466 467 468/******************************************************************************* 469 * 470 * FUNCTION: AcpiNsExecuteControlMethod 471 * 472 * PARAMETERS: MethodNode - The object/method --- 19 unchanged lines hidden (view full) --- 492{ 493 ACPI_STATUS Status; 494 ACPI_OPERAND_OBJECT *ObjDesc; 495 496 497 FUNCTION_TRACE ("NsExecuteControlMethod"); 498 499 | 459} 460 461 462/******************************************************************************* 463 * 464 * FUNCTION: AcpiNsExecuteControlMethod 465 * 466 * PARAMETERS: MethodNode - The object/method --- 19 unchanged lines hidden (view full) --- 486{ 487 ACPI_STATUS Status; 488 ACPI_OPERAND_OBJECT *ObjDesc; 489 490 491 FUNCTION_TRACE ("NsExecuteControlMethod"); 492 493 |
494 /* 495 * Unlock the namespace before execution. This allows namespace access 496 * via the external Acpi* interfaces while a method is being executed. 497 * However, any namespace deletion must acquire both the namespace and 498 * interpreter locks to ensure that no thread is using the portion of the 499 * namespace that is being deleted. 500 */ 501 502 AcpiCmReleaseMutex (ACPI_MTX_NAMESPACE); 503 |
|
500 /* Verify that there is a method associated with this object */ 501 502 ObjDesc = AcpiNsGetAttachedObject ((ACPI_HANDLE) MethodNode); 503 if (!ObjDesc) 504 { 505 DEBUG_PRINT (ACPI_ERROR, 506 ("Control method is undefined (nil value)\n")); 507 return_ACPI_STATUS (AE_ERROR); --- 5 unchanged lines hidden (view full) --- 513 ObjDesc->Method.PcodeLength - 1)); 514 515 DUMP_PATHNAME (MethodNode, "NsExecuteControlMethod: Executing", 516 TRACE_NAMES, _COMPONENT); 517 518 DEBUG_PRINT (TRACE_NAMES, 519 ("At offset %8XH\n", ObjDesc->Method.Pcode + 1)); 520 | 504 /* Verify that there is a method associated with this object */ 505 506 ObjDesc = AcpiNsGetAttachedObject ((ACPI_HANDLE) MethodNode); 507 if (!ObjDesc) 508 { 509 DEBUG_PRINT (ACPI_ERROR, 510 ("Control method is undefined (nil value)\n")); 511 return_ACPI_STATUS (AE_ERROR); --- 5 unchanged lines hidden (view full) --- 517 ObjDesc->Method.PcodeLength - 1)); 518 519 DUMP_PATHNAME (MethodNode, "NsExecuteControlMethod: Executing", 520 TRACE_NAMES, _COMPONENT); 521 522 DEBUG_PRINT (TRACE_NAMES, 523 ("At offset %8XH\n", ObjDesc->Method.Pcode + 1)); 524 |
521 | |
522 /* | 525 /* |
523 * Unlock the namespace before execution. This allows namespace access 524 * via the external Acpi* interfaces while a method is being executed. 525 * However, any namespace deletion must acquire both the namespace and 526 * interpreter locks to ensure that no thread is using the portion of the 527 * namespace that is being deleted. | 526 * Execute the method via the interpreter |
528 */ | 527 */ |
529 530 AcpiCmReleaseMutex (ACPI_MTX_NAMESPACE); 531 532 /* 533 * Excecute the method via the interpreter 534 */ | |
535 Status = AcpiAmlExecuteMethod (MethodNode, Params, ReturnObjDesc); 536 537 return_ACPI_STATUS (Status); 538} 539 540 541/******************************************************************************* 542 * --- 128 unchanged lines hidden --- | 528 Status = AcpiAmlExecuteMethod (MethodNode, Params, ReturnObjDesc); 529 530 return_ACPI_STATUS (Status); 531} 532 533 534/******************************************************************************* 535 * --- 128 unchanged lines hidden --- |