diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-26 18:50:51 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-26 18:50:51 +0000 |
commit | 25f8c4c391a3f4c5ad40a5a21f3dd78b96b30849 (patch) | |
tree | b77175aeb6f4f57e01da2227dbb508c306f7a845 /ext/thread | |
parent | 3bcf72a28cb82a8d3ff05202f2c1e269261ae6aa (diff) |
* 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
Diffstat (limited to 'ext/thread')
-rw-r--r-- | ext/thread/thread.c | 13 |
1 files changed, 3 insertions, 10 deletions
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 |