1/****************************************************************************** 2 * 3 * Module Name: excreate - Named object creation |
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 |
684 /* 685 * Disassemble the method flags. Split off the Arg Count 686 * for efficiency 687 */ |
688 MethodFlags = (UINT8) Operand[1]->Integer.Value; 689 |
690 ObjDesc->Method.MethodFlags = (UINT8) (MethodFlags & ~AML_METHOD_ARG_COUNT); 691 ObjDesc->Method.ParamCount = (UINT8) (MethodFlags & AML_METHOD_ARG_COUNT); |
692 693 /* 694 * Get the concurrency count. If required, a semaphore will be 695 * created for this method when it is parsed. 696 */ |
697 if (AcpiGbl_AllMethodsSerialized) |
698 { |
699 ObjDesc->Method.Concurrency = 1; 700 ObjDesc->Method.MethodFlags |= AML_METHOD_SERIALIZED; 701 } 702 else if (MethodFlags & AML_METHOD_SERIALIZED) 703 { |
704 /* 705 * ACPI 1.0: Concurrency = 1 706 * ACPI 2.0: Concurrency = (SyncLevel (in method declaration) + 1) 707 */ 708 ObjDesc->Method.Concurrency = (UINT8) |
709 (((MethodFlags & AML_METHOD_SYNCH_LEVEL) >> 4) + 1); |
710 } 711 else 712 { |
713 ObjDesc->Method.Concurrency = ACPI_INFINITE_CONCURRENCY; |
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 |