As soon as we have several threads per process now, it is not correct to
use process ID as ACPI thread ID. Concurrent requests with equal thread IDs broke ACPI mutexes operation causing unpredictable errors including AE_AML_MUTEX_NOT_ACQUIRED that I have seen. Use kernel thread ID instead of process ID for ACPI thread.
This commit is contained in:
parent
2a9e5e2e7c
commit
57675eb3fa
@ -187,13 +187,9 @@ AcpiOsStall(UINT32 Microseconds)
|
||||
ACPI_THREAD_ID
|
||||
AcpiOsGetThreadId(void)
|
||||
{
|
||||
struct proc *p;
|
||||
|
||||
/* XXX do not add ACPI_FUNCTION_TRACE here, results in recursive call. */
|
||||
|
||||
p = curproc;
|
||||
KASSERT(p != NULL, ("%s: curproc is NULL!", __func__));
|
||||
|
||||
/* Returning 0 is not allowed. */
|
||||
return (p->p_pid + 1);
|
||||
return (curthread->td_tid + 1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user