1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/thread/thread.c: Consistently use 0 and 1 for

rb_thread_critical values.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2007-02-26 18:41:08 +00:00
parent e529cb40d0
commit 3bcf72a28c
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Tue Feb 27 03:40:09 2007 Akinori MUSHA <knu@iDaemons.org>
* ext/thread/thread.c: Consistently use 0 and 1 for
rb_thread_critical values.
Mon Feb 26 15:18:23 2007 Akinori MUSHA <knu@iDaemons.org>
* ext/thread/thread.c: Use xmalloc()/xfree() instead of

View file

@ -21,7 +21,7 @@ static VALUE rb_cSizedQueue;
static VALUE
thread_exclusive_do()
{
rb_thread_critical = Qtrue;
rb_thread_critical = 1;
return rb_yield(Qundef);
}
@ -639,11 +639,11 @@ wait_condvar(ConditionVariable *condvar, Mutex *mutex)
{
rb_thread_critical = 1;
if (!RTEST(mutex->owner)) {
rb_thread_critical = Qfalse;
rb_thread_critical = 0;
return;
}
if (mutex->owner != rb_thread_current()) {
rb_thread_critical = Qfalse;
rb_thread_critical = 0;
rb_raise(rb_eThreadError, "Not owner");
}
mutex->owner = Qnil;