parent
13bbb4d8f2
commit
64408be772
@ -1238,7 +1238,8 @@ AcpiOsAcquireGlobalLock(volatile uint32_t *lock)
|
|||||||
if ((oldValue & ACPI_GLOCK_OWNED) != 0)
|
if ((oldValue & ACPI_GLOCK_OWNED) != 0)
|
||||||
newValue |= ACPI_GLOCK_PENDING;
|
newValue |= ACPI_GLOCK_PENDING;
|
||||||
} while (atomic_test_and_set((int32*)lock, newValue, oldValue) != (int32)oldValue);
|
} while (atomic_test_and_set((int32*)lock, newValue, oldValue) != (int32)oldValue);
|
||||||
return (newValue & ACPI_GLOCK_PENDING) != 0;
|
|
||||||
|
return (newValue & ACPI_GLOCK_PENDING) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1259,6 +1260,7 @@ AcpiOsReleaseGlobalLock(volatile uint32_t *lock)
|
|||||||
oldValue = *lock;
|
oldValue = *lock;
|
||||||
newValue = oldValue & ~(ACPI_GLOCK_PENDING | ACPI_GLOCK_OWNED);
|
newValue = oldValue & ~(ACPI_GLOCK_PENDING | ACPI_GLOCK_OWNED);
|
||||||
} while (atomic_test_and_set((int32*)lock, newValue, oldValue) != (int32)oldValue);
|
} while (atomic_test_and_set((int32*)lock, newValue, oldValue) != (int32)oldValue);
|
||||||
|
|
||||||
return (oldValue & ACPI_GLOCK_PENDING) != 0;
|
return (oldValue & ACPI_GLOCK_PENDING) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user