1/******************************************************************************
2 *
3 * Module Name: excreate - Named object creation
4 * $Revision: 101 $
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
686 MethodFlags = (UINT8) Operand[1]->Integer.Value;
687
688 ObjDesc->Method.MethodFlags = MethodFlags;
689 ObjDesc->Method.ParamCount = (UINT8) (MethodFlags & METHOD_FLAGS_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 */
695 if (MethodFlags & METHOD_FLAGS_SERIALIZED)
696 {
697 /*
698 * ACPI 1.0: Concurrency = 1
699 * ACPI 2.0: Concurrency = (SyncLevel (in method declaration) + 1)
700 */
701 ObjDesc->Method.Concurrency = (UINT8)
702 (((MethodFlags & METHOD_FLAGS_SYNCH_LEVEL) >> 4) + 1);
703 }
704 else
705 {
706 ObjDesc->Method.Concurrency = 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
2 *
3 * Module Name: excreate - Named object creation
4 * $Revision: 101 $
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
686 MethodFlags = (UINT8) Operand[1]->Integer.Value;
687
688 ObjDesc->Method.MethodFlags = MethodFlags;
689 ObjDesc->Method.ParamCount = (UINT8) (MethodFlags & METHOD_FLAGS_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 */
695 if (MethodFlags & METHOD_FLAGS_SERIALIZED)
696 {
697 /*
698 * ACPI 1.0: Concurrency = 1
699 * ACPI 2.0: Concurrency = (SyncLevel (in method declaration) + 1)
700 */
701 ObjDesc->Method.Concurrency = (UINT8)
702 (((MethodFlags & METHOD_FLAGS_SYNCH_LEVEL) >> 4) + 1);
703 }
704 else
705 {
706 ObjDesc->Method.Concurrency = 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