ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

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);
}

Generated on Sun May 27 2012 05:23:00 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.