mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
6dde5de022
commit
c56b2c1084
2 changed files with 7 additions and 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.
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue