goto unlock_and_exit;
}
+ /* Make sure all deferred tasks are completed */
+
+ (void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
+ acpi_os_wait_events_complete(NULL);
+ status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE);
+ if (ACPI_FAILURE (status)) {
+ return_ACPI_STATUS (status);
+ }
+
if (handler_type == ACPI_SYSTEM_NOTIFY) {
acpi_gbl_system_notify.node = NULL;
acpi_gbl_system_notify.handler = NULL;
goto unlock_and_exit;
}
+ /* Make sure all deferred tasks are completed */
+
+ (void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
+ acpi_os_wait_events_complete(NULL);
+ status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE);
+ if (ACPI_FAILURE (status)) {
+ return_ACPI_STATUS (status);
+ }
+
/* Remove the handler */
if (handler_type == ACPI_SYSTEM_NOTIFY) {
goto unlock_and_exit;
}
+ /* Make sure all deferred tasks are completed */
+
+ (void) acpi_ut_release_mutex (ACPI_MTX_EVENTS);
+ acpi_os_wait_events_complete(NULL);
+ status = acpi_ut_acquire_mutex (ACPI_MTX_EVENTS);
+ if (ACPI_FAILURE (status)) {
+ return_ACPI_STATUS (status);
+ }
+
/* Remove the handler */
acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);