avoid tsleep also during shutdown (and in particular ACPI poweroff),

should fix PR kern/39141 by Takahiro Kambe and PR port-i386/41110
by Reinoud Zandijk
This commit is contained in:
drochner 2009-03-31 17:17:47 +00:00
parent ef7be3ace7
commit 0785c6f16e
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: OsdSchedule.c,v 1.9 2009/01/30 12:51:03 jmcneill Exp $ */
/* $NetBSD: OsdSchedule.c,v 1.10 2009/03/31 17:17:47 drochner Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: OsdSchedule.c,v 1.9 2009/01/30 12:51:03 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: OsdSchedule.c,v 1.10 2009/03/31 17:17:47 drochner Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@ -165,7 +165,7 @@ AcpiOsSleep(ACPI_INTEGER Milliseconds)
{
ACPI_FUNCTION_TRACE(__func__);
if (cold || acpi_suspended)
if (cold || doing_shutdown || acpi_suspended)
DELAY(Milliseconds * 1000);
else {
mutex_enter(&acpi_osd_sleep_mtx);

View File

@ -1,4 +1,4 @@
/* $NetBSD: OsdSynch.c,v 1.11 2009/01/30 12:51:03 jmcneill Exp $ */
/* $NetBSD: OsdSynch.c,v 1.12 2009/03/31 17:17:47 drochner Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: OsdSynch.c,v 1.11 2009/01/30 12:51:03 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: OsdSynch.c,v 1.12 2009/03/31 17:17:47 drochner Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@ -183,7 +183,7 @@ AcpiOsWaitSemaphore(ACPI_SEMAPHORE Handle, UINT32 Units, UINT16 Timeout)
if (as == NULL)
return_ACPI_STATUS(AE_BAD_PARAMETER);
if (cold || acpi_suspended)
if (cold || doing_shutdown || acpi_suspended)
return_ACPI_STATUS(AE_OK);
/* A timeout of 0xFFFF means "forever". */