Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

unix: don't abort() when trylock functions return EBUSY

Fixes #500.
  • Loading branch information
chobie authored and bnoordhuis committed Jul 21, 2012
1 parent 94355e4 commit 22f004db61c11f63ed07da2a326c7edbbfee5730
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/unix/thread.c
@@ -78,7 +78,7 @@ int uv_mutex_trylock(uv_mutex_t* mutex) {

r = pthread_mutex_trylock(mutex);

if (r && r != EAGAIN)
if (r && r != EBUSY && r != EAGAIN)
abort();

if (r)
@@ -119,7 +119,7 @@ int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock) {

r = pthread_rwlock_tryrdlock(rwlock);

if (r && r != EAGAIN)
if (r && r != EBUSY && r != EAGAIN)
abort();

if (r)
@@ -146,7 +146,7 @@ int uv_rwlock_trywrlock(uv_rwlock_t* rwlock) {

r = pthread_rwlock_trywrlock(rwlock);

if (r && r != EAGAIN)
if (r && r != EBUSY && r != EAGAIN)
abort();

if (r)

0 comments on commit 22f004d

Please sign in to comment.
You can’t perform that action at this time.