diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-23 01:56:43 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-23 01:56:43 +0000 |
commit | b62ccc0eeb825a44b0d3449c51bc915ae984efc5 (patch) | |
tree | 4ea48dc1c712aa88decdc8eb1d245d09b2a8b806 | |
parent | 6afb90f5846837a2f63d4e195542c0df149f385d (diff) | |
download | ruby-b62ccc0eeb825a44b0d3449c51bc915ae984efc5.tar.gz ruby-b62ccc0eeb825a44b0d3449c51bc915ae984efc5.tar.xz ruby-b62ccc0eeb825a44b0d3449c51bc915ae984efc5.zip |
* thread_pthread.ci (native_mutex_lock): do not call
pthread_mutex_trylock().
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | thread_pthread.ci | 9 |
2 files changed, 7 insertions, 7 deletions
@@ -1,3 +1,8 @@ +Fri Feb 23 10:53:21 2007 Shugo Maeda <shugo@ruby-lang.org> + + * thread_pthread.ci (native_mutex_lock): do not call + pthread_mutex_trylock(). + Fri Feb 23 10:31:16 2007 Minero Aoki <aamine@loveruby.net> * dln.c: use dlopen on Mac OS X 10.3 or later. diff --git a/thread_pthread.ci b/thread_pthread.ci index a8ffcb0c7..b28301704 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); } } |