diff options
Diffstat (limited to 'sys/contrib/dev/acpica/dbexec.c')
-rw-r--r-- | sys/contrib/dev/acpica/dbexec.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/sys/contrib/dev/acpica/dbexec.c b/sys/contrib/dev/acpica/dbexec.c index 9a14b86..25cad77 100644 --- a/sys/contrib/dev/acpica/dbexec.c +++ b/sys/contrib/dev/acpica/dbexec.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: dbexec - debugger control method execution - * $Revision: 29 $ + * $Revision: 34 $ * ******************************************************************************/ @@ -132,7 +132,7 @@ MODULE_NAME ("dbexec") -DB_METHOD_INFO Info; +DB_METHOD_INFO AcpiGbl_DbMethodInfo; /******************************************************************************* @@ -159,7 +159,7 @@ AcpiDbExecuteMethod ( UINT32 i; - if (OutputToFile && !AcpiDbgLevel) + if (AcpiGbl_DbOutputToFile && !AcpiDbgLevel) { AcpiOsPrintf ("Warning: debug output is not enabled!\n"); } @@ -195,8 +195,8 @@ AcpiDbExecuteMethod ( /* Prepare for a return object of arbitrary size */ - ReturnObj->Pointer = Buffer; - ReturnObj->Length = BUFFER_SIZE; + ReturnObj->Pointer = AcpiGbl_DbBuffer; + ReturnObj->Length = ACPI_DEBUG_BUFFER_SIZE; /* Do the actual method execution */ @@ -233,7 +233,7 @@ AcpiDbExecuteSetup ( if ((Info->Name[0] != '\\') && (Info->Name[0] != '/')) { - STRCAT (Info->Pathname, ScopeBuf); + STRCAT (Info->Pathname, AcpiGbl_DbScopeBuf); } STRCAT (Info->Pathname, Info->Name); @@ -277,12 +277,13 @@ AcpiDbGetOutstandingAllocations (void) UINT32 i; UINT32 Outstanding = 0; + #ifdef ACPI_DBG_TRACK_ALLOCATIONS for (i = ACPI_MEM_LIST_FIRST_CACHE_LIST; i < ACPI_NUM_MEM_LISTS; i++) { - Outstanding += (AcpiGbl_MemoryLists[i].TotalAllocated - - AcpiGbl_MemoryLists[i].TotalFreed - + Outstanding += (AcpiGbl_MemoryLists[i].TotalAllocated - + AcpiGbl_MemoryLists[i].TotalFreed - AcpiGbl_MemoryLists[i].CacheDepth); } #endif @@ -326,12 +327,12 @@ AcpiDbExecute ( PreviousAllocations = AcpiDbGetOutstandingAllocations (); #endif - Info.Name = Name; - Info.Args = Args; - Info.Flags = Flags; + AcpiGbl_DbMethodInfo.Name = Name; + AcpiGbl_DbMethodInfo.Args = Args; + AcpiGbl_DbMethodInfo.Flags = Flags; - AcpiDbExecuteSetup (&Info); - Status = AcpiDbExecuteMethod (&Info, &ReturnObj); + AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo); + Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, &ReturnObj); /* * Allow any handlers in separate threads to complete. @@ -357,8 +358,8 @@ AcpiDbExecute ( if (ACPI_FAILURE (Status)) { - AcpiOsPrintf ("Execution of %s failed with status %s\n", - Info.Pathname, AcpiFormatException (Status)); + AcpiOsPrintf ("Execution of %s failed with status %s\n", + AcpiGbl_DbMethodInfo.Pathname, AcpiFormatException (Status)); } else @@ -368,7 +369,7 @@ AcpiDbExecute ( if (ReturnObj.Length) { AcpiOsPrintf ("Execution of %s returned object %p Buflen %X\n", - Info.Pathname, ReturnObj.Pointer, ReturnObj.Length); + AcpiGbl_DbMethodInfo.Pathname, ReturnObj.Pointer, ReturnObj.Length); AcpiDbDumpObject (ReturnObj.Pointer, 1); } } @@ -414,7 +415,6 @@ AcpiDbMethodThread ( } } - /* Signal our completion */ AcpiOsSignalSemaphore (Info->ThreadGate, 1); @@ -471,13 +471,13 @@ AcpiDbCreateExecutionThreads ( /* Setup the context to be passed to each thread */ - Info.Name = MethodNameArg; - Info.Args = NULL; - Info.Flags = 0; - Info.NumLoops = NumLoops; - Info.ThreadGate = ThreadGate; + AcpiGbl_DbMethodInfo.Name = MethodNameArg; + AcpiGbl_DbMethodInfo.Args = NULL; + AcpiGbl_DbMethodInfo.Flags = 0; + AcpiGbl_DbMethodInfo.NumLoops = NumLoops; + AcpiGbl_DbMethodInfo.ThreadGate = ThreadGate; - AcpiDbExecuteSetup (&Info); + AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo); /* Create the threads */ @@ -486,7 +486,7 @@ AcpiDbCreateExecutionThreads ( for (i = 0; i < (NumThreads); i++) { - AcpiOsQueueForExecution (OSD_PRIORITY_MED, AcpiDbMethodThread, &Info); + AcpiOsQueueForExecution (OSD_PRIORITY_MED, AcpiDbMethodThread, &AcpiGbl_DbMethodInfo); } |