/* If acpi_terminate has been called, terminate this thread */
- if (acpi_gbl_db_terminate_threads) {
+ if (acpi_gbl_db_terminate_loop) {
return (AE_CTRL_TERMINATE);
}
* re-creating the semaphores!
*/
+ acpi_gbl_db_terminate_loop = TRUE;
/* acpi_initialize (NULL); */
break;
#ifdef ACPI_APPLICATION
acpi_db_close_debug_file();
#endif
- acpi_gbl_db_terminate_threads = TRUE;
+ acpi_gbl_db_terminate_loop = TRUE;
return (AE_CTRL_TERMINATE);
case CMD_NOT_FOUND:
acpi_status status = AE_OK;
acpi_status Mstatus;
- while (status != AE_CTRL_TERMINATE) {
+ while (status != AE_CTRL_TERMINATE && !acpi_gbl_db_terminate_loop) {
acpi_gbl_method_executing = FALSE;
acpi_gbl_step_to_next_call = FALSE;
acpi_os_release_mutex(acpi_gbl_db_command_complete);
}
+ acpi_gbl_db_threads_terminated = TRUE;
}
/*******************************************************************************
/* TBD: [Restructure] Need a separate command line buffer for step mode */
- while (!acpi_gbl_db_terminate_threads) {
+ while (!acpi_gbl_db_terminate_loop) {
/* Force output to console until a command is entered */
}
}
- /* Shut down the debugger */
-
- acpi_terminate_debugger();
-
- /*
- * Only this thread (the original thread) should actually terminate the
- * subsystem, because all the semaphores are deleted during termination
- */
- status = acpi_terminate();
return (status);
}