From ab8aa06a5c0b75974fb1949365cbb20a15cedf14 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Fri, 7 Jul 2006 20:11:07 -0400 Subject: ACPI: acpi_os_get_thread_id() returns current Linux mutexes and the debug code that that reference acpi_os_get_thread_id() are happy with 0. But the AML mutexes in exmutex.c expect a unique non-zero number for each thread - as they track this thread_id to permit the mutex re-entrancy defined by the ACPI spec. http://bugzilla.kernel.org/show_bug.cgi?id=6687 Signed-off-by: Len Brown --- include/acpi/platform/aclinux.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/acpi/platform/aclinux.h') diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 3f853cabbd41..1cb51bf96ece 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -59,6 +59,7 @@ #include #include #include +#include /* Host-dependent types and defines */ @@ -100,8 +101,8 @@ #define acpi_cpu_flags unsigned long -#define acpi_thread_id u32 +#define acpi_thread_id struct task_struct * -static inline acpi_thread_id acpi_os_get_thread_id(void) { return 0; } +static inline acpi_thread_id acpi_os_get_thread_id(void) { return current; } #endif /* __ACLINUX_H__ */ -- cgit v1.2.3-55-g7522