AcpiOsGetThreadId should return lwpid, not pid -- otherwise we always return
the same value! Fixes the AE_AML_MUTEX_NOT_ACQUIRED issue when evaluating _BST on ASUS Eee PC. Who knows what other mysterious bugs this has caused over the years...
This commit is contained in:
parent
d5063688b1
commit
fd495c5ce3
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: OsdSchedule.c,v 1.5 2007/12/21 18:42:38 jmcneill Exp $ */
|
/* $NetBSD: OsdSchedule.c,v 1.6 2008/04/22 02:02:50 jmcneill Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2001 Wasabi Systems, Inc.
|
* Copyright 2001 Wasabi Systems, Inc.
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: OsdSchedule.c,v 1.5 2007/12/21 18:42:38 jmcneill Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: OsdSchedule.c,v 1.6 2008/04/22 02:02:50 jmcneill Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/malloc.h>
|
#include <sys/malloc.h>
|
||||||
|
@ -106,13 +106,7 @@ acpi_osd_sched_fini(void)
|
||||||
ACPI_THREAD_ID
|
ACPI_THREAD_ID
|
||||||
AcpiOsGetThreadId(void)
|
AcpiOsGetThreadId(void)
|
||||||
{
|
{
|
||||||
|
return curlwp->l_lid + 1;
|
||||||
/* XXX ACPI CA can call this function in interrupt context */
|
|
||||||
if (curlwp == NULL)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
/* XXX Bleh, we're not allowed to return 0 (how stupid!) */
|
|
||||||
return (curlwp->l_proc->p_pid + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue