diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-12 08:14:54 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-12 08:14:54 +0000 |
commit | 0089455e53628edf94060b56203279ad59c32553 (patch) | |
tree | fb38b6f2fe8a01adc8cfdabad03d8ae7e30f52b0 /thread_pthread.ci | |
parent | e0943c481ab3fc3a5a35e3f7a71d97ad93f7036f (diff) | |
download | ruby-0089455e53628edf94060b56203279ad59c32553.tar.gz |
* thread.c (mutex_try_lock): check and set owner thread.
* thread_pthread.ci: fix to show error code in error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.ci')
-rw-r--r-- | thread_pthread.ci | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/thread_pthread.ci b/thread_pthread.ci index 34bb5362b9..43dac0be5a 100644 --- a/thread_pthread.ci +++ b/thread_pthread.ci @@ -48,16 +48,18 @@ native_mutex_trylock(pthread_mutex_t *lock) void native_mutex_initialize(pthread_mutex_t *lock) { - if (pthread_mutex_init(lock, 0) != 0) { - rb_bug("native_mutex_initialize return non-zero"); + int r = pthread_mutex_init(lock, 0); + if (r != 0) { + rb_bug("native_mutex_initialize return non-zero: %d", r); } } void native_mutex_destroy(pthread_mutex_t *lock) { - if (pthread_mutex_destroy(lock) != 0) { - rb_bug("native_mutex_destroy return non-zero"); + int r = pthread_mutex_destroy(lock); + if (r != 0) { + rb_bug("native_mutex_destroy return non-zero: %d", r); } } |