mirror of
https://github.com/acpica/acpica/
synced 2025-01-18 15:39:18 +03:00
Use sleep() for stall longer than 100 usec
date 2003.09.30.20.36.00; author rmoore1; state Exp;
This commit is contained in:
parent
c3e8b5382d
commit
bc0c44219d
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exsystem - Interface to OS services
|
||||
* $Revision: 1.76 $
|
||||
* $Revision: 1.77 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -206,19 +206,14 @@ AcpiExSystemDoStall (
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
if (HowLong > 1000) /* 1 millisecond */
|
||||
if (HowLong > 100) /* 100 microseconds */
|
||||
{
|
||||
/* Since this thread will sleep, we must release the interpreter */
|
||||
|
||||
AcpiExExitInterpreter ();
|
||||
|
||||
AcpiOsSleep (0, (HowLong / 1000) + 1);
|
||||
|
||||
/* And now we must get the interpreter again */
|
||||
|
||||
Status = AcpiExEnterInterpreter ();
|
||||
/*
|
||||
* Longer than 100 usec, use sleep instead
|
||||
* (according to ACPI specification)
|
||||
*/
|
||||
Status = AcpiExSystemDoSuspend ((HowLong / 1000) + 1);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
AcpiOsStall (HowLong);
|
||||
|
Loading…
Reference in New Issue
Block a user