mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 14:54:24 +00:00
Add ACPI subsystem mutex support, currently disabled. This implements
a private mutex we can use to wrap the ACPI subsystem proper.
This commit is contained in:
parent
e71b638175
commit
03b5e1982a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78994
|
@ -66,11 +66,31 @@ struct acpi_device {
|
||||||
|
|
||||||
/* resources */
|
/* resources */
|
||||||
struct resource_list ad_rl;
|
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
|
* 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
|
#define ACPI_OBJECTLIST_MAX 16
|
||||||
struct acpi_object_list {
|
struct acpi_object_list {
|
||||||
|
|
Loading…
Reference in a new issue