summaryrefslogtreecommitdiff
path: root/locks/beos/thread_mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'locks/beos/thread_mutex.c')
-rw-r--r--locks/beos/thread_mutex.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/locks/beos/thread_mutex.c b/locks/beos/thread_mutex.c
index f9353509f..e4099d882 100644
--- a/locks/beos/thread_mutex.c
+++ b/locks/beos/thread_mutex.c
@@ -143,12 +143,9 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_timedlock(apr_thread_mutex_t *mutex,
}
if (atomic_add(&mutex->LockCount, 1) > 0) {
- if (!timeout) {
+ if (timeout <= 0) {
stat = B_TIMED_OUT;
}
- else if (timeout < 0) {
- stat = acquire_sem(mutex->Lock);
- }
else {
stat = acquire_sem_etc(mutex->Lock, 1, B_RELATIVE_TIMEOUT,
timeout);