summaryrefslogtreecommitdiff
path: root/include/acpi
diff options
context:
space:
mode:
authorAdrien Destugues <adrien.destugues@opensource.viveris.fr>2023-12-12 12:28:17 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-08-29 17:26:51 +0200
commit7afea7bc49c5482ac11fc4488230827edc51e28a (patch)
tree15757bfacc693778dc86bcf26f84470fb75febda /include/acpi
parent36b5c1dc4b22913f9813a94350e24f6744db38a8 (diff)
ACPICA: haiku: Fix invalid value used for semaphores
ACPICA commit 49fe4f25483feec2f685b204ef19e28d92979e95 In Haiku, semaphores are represented by integers, not pointers. So, we can't use NULL as the invalid/destroyed value, the correct value is -1. Introduce a platform overridable define to allow this. Fixes #162 (which was closed after coming to the conclusion that this should be done, but the change was never done). Link: https://github.com/acpica/acpica/commit/49fe4f25 Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/platform/acenv.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 337ffa931ee8..3f31df09a9d6 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -252,6 +252,12 @@
#define ACPI_RELEASE_GLOBAL_LOCK(Glptr, pending) pending = 0
#endif
+/* NULL/invalid value to use for destroyed or not-yet-created semaphores. */
+
+#ifndef ACPI_SEMAPHORE_NULL
+#define ACPI_SEMAPHORE_NULL NULL
+#endif
+
/* Flush CPU cache - used when going to sleep. Wbinvd or similar. */
#ifndef ACPI_FLUSH_CPU_CACHE