From 96adafa2c2e7d1982ca794991aa010da18c8ba39 Mon Sep 17 00:00:00 2001 From: aystarik Date: Wed, 29 Jun 2005 17:01:09 +0000 Subject: [PATCH] Save method call op so that we can look at the parent op when we return date 2000.03.13.22.21.00; author rmoore1; state Exp; --- source/components/dispatcher/dsmethod.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c index 362337db1..c3741659c 100644 --- a/source/components/dispatcher/dsmethod.c +++ b/source/components/dispatcher/dsmethod.c @@ -288,7 +288,8 @@ PsxCallControlMethod ( /* Save the (current) Op for when this walk is restarted */ - ThisWalkState->PrevOp = Op; + ThisWalkState->MethodCallOp = ThisWalkState->PrevOp; + ThisWalkState->PrevOp = Op; /* Create a new state for the preempting walk */ @@ -299,6 +300,15 @@ PsxCallControlMethod ( } + /* Open a new scope */ + + Status = NsScopeStackPush (MethodNte->Scope, ACPI_TYPE_Method); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + + /* TBD: Do the operands always start at index 0? */ /* @@ -367,8 +377,6 @@ PsxRestartControlMethod ( ACPI_WALK_STATE *WalkState, ACPI_OBJECT_INTERNAL *ReturnDesc) { - ACPI_GENERIC_OP *MethodCallOp = NULL; - FUNCTION_TRACE_PTR ("PsxRestartControlMethod", WalkState); @@ -381,11 +389,11 @@ PsxRestartControlMethod ( /* Delete the return value if it will not be used by the calling method */ - PsxDeleteResultIfNotUsed (WalkState->NextOp, ReturnDesc, WalkState); + PsxDeleteResultIfNotUsed (WalkState->MethodCallOp, ReturnDesc, WalkState); } DEBUG_PRINT (TRACE_PARSE, ("PsxRestart: Method=%p Return=%p State=%p\n", - MethodCallOp, ReturnDesc, WalkState)); + WalkState->MethodCallOp, ReturnDesc, WalkState)); /* * Currently, the only way a method can be preempted is by the nested execution