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:
@@ -1289,10 +1289,9 @@ AcpiOsAcquireMutex(ACPI_MUTEX handle, UINT16 timeout)
|
|||||||
ACPI_STATUS result = AE_OK;
|
ACPI_STATUS result = AE_OK;
|
||||||
DEBUG_FUNCTION_VF("mutex: %ld; timeout: %u", handle, timeout);
|
DEBUG_FUNCTION_VF("mutex: %ld; timeout: %u", handle, timeout);
|
||||||
|
|
||||||
if (timeout == ACPI_WAIT_FOREVER) {
|
if (timeout == ACPI_WAIT_FOREVER)
|
||||||
result = mutex_lock_with_timeout(handle, 0, 0)
|
result = mutex_lock(handle) == B_OK ? AE_OK : AE_BAD_PARAMETER;
|
||||||
== B_OK ? AE_OK : AE_BAD_PARAMETER;
|
else {
|
||||||
} else {
|
|
||||||
switch (mutex_lock_with_timeout(handle, B_RELATIVE_TIMEOUT,
|
switch (mutex_lock_with_timeout(handle, B_RELATIVE_TIMEOUT,
|
||||||
(bigtime_t)timeout * 1000)) {
|
(bigtime_t)timeout * 1000)) {
|
||||||
case B_OK:
|
case B_OK:
|
||||||
|
|||||||
Reference in New Issue
Block a user