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 | 4ccd99734480f7ac4524e6c1e6fe51839dbb4c76 (patch) | |
| tree | 9269306b6508b72e371146550a82350a74815bd5 /thread.c | |
| parent | 9a207a840db34f04d7b08603f0debb251eb48893 (diff) | |
| download | ruby-4ccd99734480f7ac4524e6c1e6fe51839dbb4c76.tar.gz ruby-4ccd99734480f7ac4524e6c1e6fe51839dbb4c76.tar.xz ruby-4ccd99734480f7ac4524e6c1e6fe51839dbb4c76.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@19477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
| -rw-r--r-- | thread.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -899,6 +899,15 @@ rb_thread_check_trap_pending(void) return GET_THREAD()->exec_signal != 0; } +/* This function can be called in blocking region. */ +int +rb_thread_interrupted(VALUE thval) +{ + rb_thread_t *th; + GetThreadPtr(thval, th); + return RUBY_VM_INTERRUPTED(th); +} + struct timeval rb_time_timeval(); void |
