Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 518 of file bus.c.
Referenced by ButtonWaitThread().
{ // unsigned long flags = 0; struct acpi_bus_event *entry = NULL; KIRQL OldIrql; //DECLARE_WAITQUEUE(wait, current); DPRINT("acpi_bus_receive_event"); if (!event) return AE_BAD_PARAMETER; event_is_open++; KeWaitForSingleObject(&AcpiEventQueue, Executive, KernelMode, FALSE, NULL); event_is_open--; KeClearEvent(&AcpiEventQueue); if (list_empty(&acpi_bus_event_list)) return_VALUE(AE_NOT_FOUND); // spin_lock_irqsave(&acpi_bus_event_lock, flags); KeAcquireSpinLock(&acpi_bus_event_lock, &OldIrql); entry = list_entry(acpi_bus_event_list.next, struct acpi_bus_event, node); if (entry) list_del(&entry->node); KeReleaseSpinLock(&acpi_bus_event_lock, OldIrql); // spin_unlock_irqrestore(&acpi_bus_event_lock, flags); if (!entry) return_VALUE(AE_NOT_FOUND); memcpy(event, entry, sizeof(struct acpi_bus_event)); ExFreePoolWithTag(entry, 'IPCA'); return_VALUE(0); }