-/* $OpenBSD: acpi.c,v 1.175 2010/07/10 04:59:56 jordan Exp $ */
+/* $OpenBSD: acpi.c,v 1.176 2010/07/13 21:01:05 deraadt Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
#define ACPIEN_RETRIES 15
-void acpi_isr_thread(void *);
+void acpi_thread(void *);
void acpi_create_thread(void *);
void acpi_pci_match(struct device *, struct pci_attach_args *);
}
if (processed) {
- sc->sc_wakeup = 0;
+ sc->sc_threadwaiting = 0;
wakeup(sc);
}
{
struct acpi_softc *sc = (struct acpi_softc *)arg;
- sc->sc_wakeup = 0;
+ sc->sc_threadwaiting = 0;
wakeup(sc);
}
extern int aml_busy;
void
-acpi_isr_thread(void *arg)
+acpi_thread(void *arg)
{
struct acpi_thread *thread = arg;
struct acpi_softc *sc = thread->sc;
sc->sc_fadt->flags & FADT_SLP_BUTTON ? 'n' : 'y',
sc->sc_fadt->flags & FADT_PWR_BUTTON ? 'n' : 'y');
dnprintf(10, "Enabling acpi interrupts...\n");
- sc->sc_wakeup = 1;
+ sc->sc_threadwaiting = 1;
/* Enable Sleep/Power buttons if they exist */
flag = acpi_read_pmreg(sc, ACPIREG_PM1_EN, 0);
}
while (thread->running) {
- dnprintf(10, "sleep... %d\n", sc->sc_wakeup);
- while (sc->sc_wakeup)
+ dnprintf(10, "sleep... %d\n", sc->sc_threadwaiting);
+ while (sc->sc_threadwaiting)
tsleep(sc, PWAIT, "acpi_idle", 0);
- sc->sc_wakeup = 1;
+ sc->sc_threadwaiting = 1;
dnprintf(10, "wakeup..\n");
if (aml_busy)
continue;
{
struct acpi_softc *sc = arg;
- if (kthread_create(acpi_isr_thread, sc->sc_thread, NULL, DEVNAME(sc))
+ if (kthread_create(acpi_thread, sc->sc_thread, NULL, DEVNAME(sc))
!= 0) {
printf("%s: unable to create isr thread, GPEs disabled\n",
DEVNAME(sc));
-/* $OpenBSD: dsdt.c,v 1.165 2010/07/08 20:56:31 jordan Exp $ */
+/* $OpenBSD: dsdt.c,v 1.166 2010/07/13 21:01:05 deraadt Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
acpi_poll(void *arg)
{
dsdt_softc->sc_poll = 1;
- dsdt_softc->sc_wakeup = 0;
+ dsdt_softc->sc_threadwaiting = 0;
wakeup(dsdt_softc);
timeout_add_sec(&dsdt_softc->sc_dev_timeout, 10);