diff options
author | mav <mav@FreeBSD.org> | 2008-11-02 12:50:16 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2008-11-02 12:50:16 +0000 |
commit | ba374a2c728b61a2fe09ab45f2f870f80ec08e70 (patch) | |
tree | 4613f316d35b067af51cd70cf757c880e5ed43b3 /sys | |
parent | 495f7968295cddb6ece888ef1840379f69ea68f5 (diff) | |
download | FreeBSD-src-ba374a2c728b61a2fe09ab45f2f870f80ec08e70.zip FreeBSD-src-ba374a2c728b61a2fe09ab45f2f870f80ec08e70.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/acpica/Osd/OsdSchedule.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/dev/acpica/Osd/OsdSchedule.c b/sys/dev/acpica/Osd/OsdSchedule.c index 48e4dfe..548a97d 100644 --- a/sys/dev/acpica/Osd/OsdSchedule.c +++ b/sys/dev/acpica/Osd/OsdSchedule.c @@ -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); } |