acpi_status acpi_ut_mutex_initialize(void) { u32 i; acpi_status status; ACPI_FUNCTION_TRACE(ut_mutex_initialize); /* Create each of the predefined mutex objects */ for (i = 0; i < ACPI_NUM_MUTEX; i++) { status = acpi_ut_create_mutex(i); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } } /* Create the spinlocks for use at interrupt level or for speed */ status = acpi_os_create_lock (&acpi_gbl_gpe_lock); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } status = acpi_os_create_lock (&acpi_gbl_hardware_lock); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } status = acpi_os_create_lock(&acpi_gbl_reference_count_lock); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* Mutex for _OSI support */ status = acpi_os_create_mutex(&acpi_gbl_osi_mutex); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* Create the reader/writer lock for namespace access */ status = acpi_ut_create_rw_lock(&acpi_gbl_namespace_rw_lock); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } #ifdef ACPI_DEBUGGER /* Debugger Support */ status = acpi_os_create_mutex(&acpi_gbl_db_command_ready); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } status = acpi_os_create_mutex(&acpi_gbl_db_command_complete); #endif return_ACPI_STATUS(status); }
acpi_status acpi_ev_init_global_lock_handler(void) { acpi_status status; ACPI_FUNCTION_TRACE(ev_init_global_lock_handler); if (acpi_gbl_reduced_hardware) { return_ACPI_STATUS(AE_OK); } status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL, acpi_ev_global_lock_handler, NULL); acpi_gbl_global_lock_present = FALSE; if (status == AE_NO_HARDWARE_RESPONSE) { ACPI_ERROR((AE_INFO, "No response from Global Lock hardware, disabling lock")); return_ACPI_STATUS(AE_OK); } status = acpi_os_create_lock(&acpi_gbl_global_lock_pending_lock); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } acpi_gbl_global_lock_pending = FALSE; acpi_gbl_global_lock_present = TRUE; return_ACPI_STATUS(status); }
acpi_status acpi_os_initialize(void) { acpi_status status; acpi_gbl_output_file = stdout; os_enter_line_edit_mode(); status = acpi_os_create_lock(&acpi_gbl_print_lock); if (ACPI_FAILURE(status)) { return (status); } return (AE_OK); }
acpi_status acpi_ut_mutex_initialize(void) { u32 i; acpi_status status; ACPI_FUNCTION_TRACE("ut_mutex_initialize"); /* * Create each of the predefined mutex objects */ for (i = 0; i < NUM_MUTEX; i++) { status = acpi_ut_create_mutex(i); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } } status = acpi_os_create_lock(&acpi_gbl_gpe_lock); return_ACPI_STATUS(status); }
acpi_status acpi_ev_init_global_lock_handler(void) { acpi_status status; ACPI_FUNCTION_TRACE(ev_init_global_lock_handler); /* If Hardware Reduced flag is set, there is no global lock */ if (acpi_gbl_reduced_hardware) { return_ACPI_STATUS(AE_OK); } /* Attempt installation of the global lock handler */ status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL, acpi_ev_global_lock_handler, NULL); /* * If the global lock does not exist on this platform, the attempt to * enable GBL_STATUS will fail (the GBL_ENABLE bit will not stick). * Map to AE_OK, but mark global lock as not present. Any attempt to * actually use the global lock will be flagged with an error. */ acpi_gbl_global_lock_present = FALSE; if (status == AE_NO_HARDWARE_RESPONSE) { ACPI_ERROR((AE_INFO, "No response from Global Lock hardware, disabling lock")); return_ACPI_STATUS(AE_OK); } status = acpi_os_create_lock(&acpi_gbl_global_lock_pending_lock); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } acpi_gbl_global_lock_pending = FALSE; acpi_gbl_global_lock_present = TRUE; return_ACPI_STATUS(status); }
ACPI_FUNCTION_TRACE(ut_mutex_initialize); /* Create each of the predefined mutex objects */ for (i = 0; i < ACPI_NUM_MUTEX; i++) { status = acpi_ut_create_mutex(i); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } } /* Create the spinlocks for use at interrupt level */ <<<<<<< HEAD status = acpi_os_create_lock (&acpi_gbl_gpe_lock); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } status = acpi_os_create_lock (&acpi_gbl_hardware_lock); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } /* Mutex for _OSI support */ status = acpi_os_create_mutex(&acpi_gbl_osi_mutex); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } =======