From 25f8c4c391a3f4c5ad40a5a21f3dd78b96b30849 Mon Sep 17 00:00:00 2001 From: knu Date: Mon, 26 Feb 2007 18:50:51 +0000 Subject: * ext/thread/thread.c (set_critical): Merge in thread_exclusive_ensure(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/thread/thread.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'ext') diff --git a/ext/thread/thread.c b/ext/thread/thread.c index bf84a390c6..7142459d83 100644 --- a/ext/thread/thread.c +++ b/ext/thread/thread.c @@ -18,6 +18,8 @@ static VALUE rb_cConditionVariable; static VALUE rb_cQueue; static VALUE rb_cSizedQueue; +static VALUE set_critical(VALUE value); + static VALUE thread_exclusive_do() { @@ -26,15 +28,6 @@ thread_exclusive_do() return rb_yield(Qundef); } -static VALUE -thread_exclusive_ensure(val) - VALUE val; -{ - rb_thread_critical = val; - - return Qundef; -} - /* * call-seq: * Thread.exclusive { block } => obj @@ -456,7 +449,7 @@ static VALUE set_critical(VALUE value) { rb_thread_critical = (int)value; - return Qnil; + return Qundef; } static VALUE -- cgit v1.2.3