diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-02 08:11:28 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-02 08:11:28 +0000 |
commit | 9815949157a76bb32dd516638f0f17549a15081c (patch) | |
tree | e63625a87f495ed2e96ebcea086b3f6723b9ab3d /eval.c | |
parent | 3124427ccbf02a5bd20f169ad6a328286e05c262 (diff) | |
download | ruby-9815949157a76bb32dd516638f0f17549a15081c.tar.gz |
* eval.c (ruby_native_thread_kill): call pthread_kill() to send a
signal to ruby's native thread
* ruby.h: add definition of ruby_native_thread_kill()
* signal.c (sigsend_to_ruby_thread): send the signal to ruby's native
thread ([ruby-dev:25744], [ruby-dev:25754]), and set signal mask to
the current native thread
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1238,9 +1238,19 @@ void Init_ext _((void)); #ifdef HAVE_NATIVETHREAD static rb_nativethread_t ruby_thid; int -is_ruby_native_thread() { +is_ruby_native_thread() +{ return NATIVETHREAD_EQUAL(ruby_thid, NATIVETHREAD_CURRENT()); } + +# ifdef HAVE_NATIVETHREAD_KILL +void +ruby_native_thread_kill(sig) + int sig; +{ + NATIVETHREAD_KILL(ruby_thid, sig); +} +# endif #endif NORETURN(static void rb_thread_start_1 _((void))); |