excreate.c (126372) | excreate.c (127175) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: excreate - Named object creation | 1/****************************************************************************** 2 * 3 * Module Name: excreate - Named object creation |
4 * $Revision: 101 $ | 4 * $Revision: 102 $ |
5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. --- 663 unchanged lines hidden (view full) --- 676 return_ACPI_STATUS (AE_NO_MEMORY); 677 } 678 679 /* Save the method's AML pointer and length */ 680 681 ObjDesc->Method.AmlStart = AmlStart; 682 ObjDesc->Method.AmlLength = AmlLength; 683 | 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. --- 663 unchanged lines hidden (view full) --- 676 return_ACPI_STATUS (AE_NO_MEMORY); 677 } 678 679 /* Save the method's AML pointer and length */ 680 681 ObjDesc->Method.AmlStart = AmlStart; 682 ObjDesc->Method.AmlLength = AmlLength; 683 |
684 /* disassemble the method flags */ 685 | 684 /* 685 * Disassemble the method flags. Split off the Arg Count 686 * for efficiency 687 */ |
686 MethodFlags = (UINT8) Operand[1]->Integer.Value; 687 | 688 MethodFlags = (UINT8) Operand[1]->Integer.Value; 689 |
688 ObjDesc->Method.MethodFlags = MethodFlags; 689 ObjDesc->Method.ParamCount = (UINT8) (MethodFlags & METHOD_FLAGS_ARG_COUNT); | 690 ObjDesc->Method.MethodFlags = (UINT8) (MethodFlags & ~AML_METHOD_ARG_COUNT); 691 ObjDesc->Method.ParamCount = (UINT8) (MethodFlags & AML_METHOD_ARG_COUNT); |
690 691 /* 692 * Get the concurrency count. If required, a semaphore will be 693 * created for this method when it is parsed. 694 */ | 692 693 /* 694 * Get the concurrency count. If required, a semaphore will be 695 * created for this method when it is parsed. 696 */ |
695 if (MethodFlags & METHOD_FLAGS_SERIALIZED) | 697 if (AcpiGbl_AllMethodsSerialized) |
696 { | 698 { |
699 ObjDesc->Method.Concurrency = 1; 700 ObjDesc->Method.MethodFlags |= AML_METHOD_SERIALIZED; 701 } 702 else if (MethodFlags & AML_METHOD_SERIALIZED) 703 { |
|
697 /* 698 * ACPI 1.0: Concurrency = 1 699 * ACPI 2.0: Concurrency = (SyncLevel (in method declaration) + 1) 700 */ 701 ObjDesc->Method.Concurrency = (UINT8) | 704 /* 705 * ACPI 1.0: Concurrency = 1 706 * ACPI 2.0: Concurrency = (SyncLevel (in method declaration) + 1) 707 */ 708 ObjDesc->Method.Concurrency = (UINT8) |
702 (((MethodFlags & METHOD_FLAGS_SYNCH_LEVEL) >> 4) + 1); | 709 (((MethodFlags & AML_METHOD_SYNCH_LEVEL) >> 4) + 1); |
703 } 704 else 705 { | 710 } 711 else 712 { |
706 ObjDesc->Method.Concurrency = INFINITE_CONCURRENCY; | 713 ObjDesc->Method.Concurrency = ACPI_INFINITE_CONCURRENCY; |
707 } 708 709 /* Attach the new object to the method Node */ 710 711 Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) Operand[0], 712 ObjDesc, ACPI_TYPE_METHOD); 713 714 /* Remove local reference to the object */ 715 716 AcpiUtRemoveReference (ObjDesc); 717 718 /* Remove a reference to the operand */ 719 720 AcpiUtRemoveReference (Operand[1]); 721 return_ACPI_STATUS (Status); 722} 723 724 | 714 } 715 716 /* Attach the new object to the method Node */ 717 718 Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) Operand[0], 719 ObjDesc, ACPI_TYPE_METHOD); 720 721 /* Remove local reference to the object */ 722 723 AcpiUtRemoveReference (ObjDesc); 724 725 /* Remove a reference to the operand */ 726 727 AcpiUtRemoveReference (Operand[1]); 728 return_ACPI_STATUS (Status); 729} 730 731 |