As suggested by Ingo use the normal mutex_lock function in case of ACPI_WAIT_FOREVER.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34595 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler
2009-12-09 17:14:14 +00:00
parent 5f207b83ae
commit 3875331b37
@@ -1289,10 +1289,9 @@ AcpiOsAcquireMutex(ACPI_MUTEX handle, UINT16 timeout)
ACPI_STATUS result = AE_OK;
DEBUG_FUNCTION_VF("mutex: %ld; timeout: %u", handle, timeout);
if (timeout == ACPI_WAIT_FOREVER) {
result = mutex_lock_with_timeout(handle, 0, 0)
== B_OK ? AE_OK : AE_BAD_PARAMETER;
} else {
if (timeout == ACPI_WAIT_FOREVER)
result = mutex_lock(handle) == B_OK ? AE_OK : AE_BAD_PARAMETER;
else {
switch (mutex_lock_with_timeout(handle, B_RELATIVE_TIMEOUT,
(bigtime_t)timeout * 1000)) {
case B_OK: