diff options
author | msmith <msmith@FreeBSD.org> | 2001-06-29 20:33:29 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 2001-06-29 20:33:29 +0000 |
commit | 991fa83f02b9fdaad51c26dc8dbaa08d3ef51635 (patch) | |
tree | 33036b8e5789690353a90f95a2028258f41cb5a1 /sys/dev/acpica/acpivar.h | |
parent | 5b5c35cec2d5c28ad8f700ff0189f419f2045f52 (diff) | |
download | FreeBSD-src-991fa83f02b9fdaad51c26dc8dbaa08d3ef51635.zip FreeBSD-src-991fa83f02b9fdaad51c26dc8dbaa08d3ef51635.tar.gz |
Add ACPI subsystem mutex support, currently disabled. This implements
a private mutex we can use to wrap the ACPI subsystem proper.
Diffstat (limited to 'sys/dev/acpica/acpivar.h')
-rw-r--r-- | sys/dev/acpica/acpivar.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 66c61d4..cda0221 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -66,11 +66,31 @@ struct acpi_device { /* resources */ struct resource_list ad_rl; + }; /* + * The ACPI subsystem lives under a single mutex. You *must* + * acquire this mutex before calling any of the acpi_ or Acpi* functions. + * + * XXX the ACPI_MSLEEP macro should go away once locking is resolved + */ +extern struct mtx acpi_mutex; +#if 0 +# define ACPI_LOCK mtx_lock(&acpi_mutex) +# define ACPI_UNLOCK mtx_unlock(&acpi_mutex) +# define ACPI_ASSERTLOCK mtx_assert(&acpi_mutex, MA_OWNED) +# define ACPI_MSLEEP(a, b, c, d, e) msleep(a, b, c, d, e) +#else +# define ACPI_LOCK +# define ACPI_UNLOCK +# define ACPI_ASSERTLOCK +# define ACPI_MSLEEP(a, b, c, d, e) tsleep(a, c, d, e) +#endif + +/* * This is a cheap and nasty way to get around the horrid counted list - * argument format that AcpiEvalateMethod uses. + * argument format that AcpiEvalateObject uses. */ #define ACPI_OBJECTLIST_MAX 16 struct acpi_object_list { |