diff options
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | ext/thread/thread.c | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -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 diff --git a/ext/thread/thread.c b/ext/thread/thread.c index 64215dca72..bf84a390c6 100644 --- a/ext/thread/thread.c +++ b/ext/thread/thread.c @@ -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; |
