summaryrefslogtreecommitdiff
path: root/thread_pthread.ci
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-23 01:56:43 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-23 01:56:43 +0000
commitc56b2c10848b14e4cfa653bd73d372505ead499f (patch)
tree4ea48dc1c712aa88decdc8eb1d245d09b2a8b806 /thread_pthread.ci
parent6dde5de0228f9e61f409daa19fd26d12e2055843 (diff)
* thread_pthread.ci (native_mutex_lock): do not call
pthread_mutex_trylock(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.ci')
-rw-r--r--thread_pthread.ci9
1 files changed, 2 insertions, 7 deletions
diff --git a/thread_pthread.ci b/thread_pthread.ci
index a8ffcb0c78..b28301704a 100644
--- a/thread_pthread.ci
+++ b/thread_pthread.ci
@@ -16,13 +16,8 @@ void
native_mutex_lock(pthread_mutex_t *lock)
{
int r;
- r = pthread_mutex_trylock(lock);
- if (r == EBUSY) {
- r = pthread_mutex_lock(lock);
-
- if (r != 0) {
- rb_bug("pthread_mutex_lock: %d", r);
- }
+ if ((r = pthread_mutex_lock(lock)) != 0) {
+ rb_bug("pthread_mutex_lock: %d", r);
}
}