Skip to content

Commit

Permalink
executer/exsystem: Add units to time variable names
Browse files Browse the repository at this point in the history
`HowLong` refers to different units in both functions, so make it more
clear, what unit they expect. That also makes one comment superfluous.
  • Loading branch information
paulmenzel committed Mar 2, 2022
1 parent 0914618 commit b69cbef
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions source/components/executer/exsystem.c
Expand Up @@ -265,7 +265,7 @@ AcpiExSystemWaitMutex (
*
* FUNCTION: AcpiExSystemDoStall
*
* PARAMETERS: HowLong - The amount of time to stall,
* PARAMETERS: HowLongUs - The amount of time to stall,
* in microseconds
*
* RETURN: Status
Expand All @@ -280,29 +280,29 @@ AcpiExSystemWaitMutex (

ACPI_STATUS
AcpiExSystemDoStall (
UINT32 HowLong)
UINT32 HowLongUs)
{
ACPI_STATUS Status = AE_OK;


ACPI_FUNCTION_ENTRY ();


if (HowLong > 255) /* 255 microseconds */
if (HowLongUs > 255)
{
/*
* Longer than 255 usec, this is an error
* Longer than 255 microseconds, this is an error
*
* (ACPI specifies 100 usec as max, but this gives some slack in
* order to support existing BIOSs)
*/
ACPI_ERROR ((AE_INFO,
"Time parameter is too large (%u)", HowLong));
"Time parameter is too large (%u)", HowLongUs));
Status = AE_AML_OPERAND_VALUE;
}
else
{
AcpiOsStall (HowLong);
AcpiOsStall (HowLongUs);
}

return (Status);
Expand All @@ -313,7 +313,7 @@ AcpiExSystemDoStall (
*
* FUNCTION: AcpiExSystemDoSleep
*
* PARAMETERS: HowLong - The amount of time to sleep,
* PARAMETERS: HowLongMs - The amount of time to sleep,
* in milliseconds
*
* RETURN: None
Expand All @@ -324,7 +324,7 @@ AcpiExSystemDoStall (

ACPI_STATUS
AcpiExSystemDoSleep (
UINT64 HowLong)
UINT64 HowLongMs)
{
ACPI_FUNCTION_ENTRY ();

Expand All @@ -337,12 +337,12 @@ AcpiExSystemDoSleep (
* For compatibility with other ACPI implementations and to prevent
* accidental deep sleeps, limit the sleep time to something reasonable.
*/
if (HowLong > ACPI_MAX_SLEEP)
if (HowLongMs > ACPI_MAX_SLEEP)
{
HowLong = ACPI_MAX_SLEEP;
HowLongMs = ACPI_MAX_SLEEP;
}

AcpiOsSleep (HowLong);
AcpiOsSleep (HowLongMs);

/* And now we must get the interpreter again */

Expand Down

0 comments on commit b69cbef

Please sign in to comment.