diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-07-13 21:01:06 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-07-13 21:01:06 +0000 |
commit | 9243aa8c20f63b5e59e6c7b0b4264b88862aea4d (patch) | |
tree | 606fe8bdff6765a9c812f21acd99f014724afade /sys | |
parent | 37650de80f1f1cd3ab55de8d230c0c7855269e02 (diff) |
rename some thread related interfaces so they are logical
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/acpi/acpi.c | 20 | ||||
-rw-r--r-- | sys/dev/acpi/acpivar.h | 4 | ||||
-rw-r--r-- | sys/dev/acpi/dsdt.c | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index b1bfcb2473c..c13b734095b 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $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> @@ -68,7 +68,7 @@ int acpi_saved_spl; #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 *); @@ -1603,7 +1603,7 @@ acpi_interrupt(void *arg) } if (processed) { - sc->sc_wakeup = 0; + sc->sc_threadwaiting = 0; wakeup(sc); } @@ -2291,7 +2291,7 @@ acpi_wakeup(void *arg) { struct acpi_softc *sc = (struct acpi_softc *)arg; - sc->sc_wakeup = 0; + sc->sc_threadwaiting = 0; wakeup(sc); } @@ -2311,7 +2311,7 @@ acpi_powerdown(void) 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; @@ -2329,7 +2329,7 @@ acpi_isr_thread(void *arg) 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); @@ -2349,10 +2349,10 @@ acpi_isr_thread(void *arg) } 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; @@ -2408,7 +2408,7 @@ acpi_create_thread(void *arg) { 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)); diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h index 9016af5c36e..fb0db0eaf9d 100644 --- a/sys/dev/acpi/acpivar.h +++ b/sys/dev/acpi/acpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpivar.h,v 1.58 2010/07/06 20:14:17 deraadt Exp $ */ +/* $OpenBSD: acpivar.h,v 1.59 2010/07/13 21:01:05 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -218,7 +218,7 @@ struct acpi_softc { struct gpe_block *gpe_table; - int sc_wakeup; + int sc_threadwaiting; u_int32_t sc_gpe_sts; u_int32_t sc_gpe_en; struct acpi_thread *sc_thread; diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c index b4d0fb272fb..32f33d3b9df 100644 --- a/sys/dev/acpi/dsdt.c +++ b/sys/dev/acpi/dsdt.c @@ -1,4 +1,4 @@ -/* $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> * @@ -522,7 +522,7 @@ void 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); |