diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-10 13:57:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-10 13:57:11 +0000 |
commit | c51a826764c3307a7fe9258e1d18ddca93cb7b5f (patch) | |
tree | b6139e61fe139e418a606ff611b0b6c30ce30dfe /process.c | |
parent | 1a853390ee08af1b8ff3d1882a8762155d151306 (diff) |
rb_thread_call_without_gvl
* include/ruby/thread.h: new header file for thread stuff.
* thread.c (rb_thread_call_without_gvl): export. [Feature#4328]
returns void* instead of VALUE. [Feature #5543]
* thread.c (rb_thread_blocking_region): deprecate. [ruby-core:46295]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -13,6 +13,7 @@ #include "ruby/ruby.h" #include "ruby/io.h" +#include "ruby/thread.h" #include "ruby/util.h" #include "internal.h" #include "vm_core.h" @@ -628,7 +629,7 @@ struct waitpid_arg { }; #endif -static VALUE +static void * rb_waitpid_blocking(void *data) { rb_pid_t result; @@ -644,7 +645,7 @@ rb_waitpid_blocking(void *data) result = wait4(arg->pid, arg->st, arg->flags, NULL); #endif - return (VALUE)result; + return (void *)result; } rb_pid_t @@ -658,8 +659,8 @@ rb_waitpid(rb_pid_t pid, int *st, int flags) arg.pid = pid; arg.st = st; arg.flags = flags; - result = (rb_pid_t)rb_thread_blocking_region(rb_waitpid_blocking, &arg, - RUBY_UBF_PROCESS, 0); + result = (rb_pid_t)rb_thread_call_without_gvl(rb_waitpid_blocking, &arg, + RUBY_UBF_PROCESS, 0); if (result < 0) { if (errno == EINTR) { RUBY_VM_CHECK_INTS(); |