diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-23 08:17:17 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-23 08:17:17 +0000 |
commit | b9a12116fb2da007ef9059befc9b1b314bb079ed (patch) | |
tree | 9269306b6508b72e371146550a82350a74815bd5 /io.c | |
parent | 68a533c61164392a9524d19f11f163a6c7e811ba (diff) | |
download | ruby-b9a12116fb2da007ef9059befc9b1b314bb079ed.tar.gz |
* thread.c, include/ruby/intern.h (rb_thread_interrupted): added.
* io.c: use VALUE of thead instead of rb_tread_t to check interrupts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -13,7 +13,6 @@ #include "ruby/ruby.h" #include "ruby/io.h" -#include "vm_core.h" #include <ctype.h> #include <errno.h> @@ -6979,7 +6978,7 @@ struct copy_stream_struct { int error_no; const char *notimp; rb_fdset_t fds; - rb_thread_t *th; + VALUE th; }; static int @@ -7107,7 +7106,7 @@ copy_stream_sendfile(struct copy_stream_struct *stp) #endif if (copy_stream_wait_write(stp) == -1) return -1; - if (RUBY_VM_INTERRUPTED(stp->th)) + if (rb_thread_interrupted(stp->th)) return -1; goto retry_sendfile; } @@ -7237,7 +7236,7 @@ copy_stream_read_write(struct copy_stream_struct *stp) if (!use_eof) copy_length -= ss; - if (RUBY_VM_INTERRUPTED(stp->th)) + if (rb_thread_interrupted(stp->th)) return; } } @@ -7340,7 +7339,7 @@ copy_stream_body(VALUE arg) rb_io_t *src_fptr = 0, *dst_fptr = 0; int src_fd, dst_fd; - stp->th = GET_THREAD(); + stp->th = rb_thread_current(); stp->total = 0; |