summaryrefslogtreecommitdiff
path: root/ruby.h
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-21 08:37:35 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-21 08:37:35 +0000
commit44e53b1dea9172407dd05a284d17b82c02886e42 (patch)
treeadfa3913cd7cd6adb00e5392fc2c9da751df9546 /ruby.h
parent9248ddea8c6b6ca0d6f20ae50a659910e2f2d06f (diff)
* signal.c (ruby_nativethread_signal, posix_nativethread_signal,
sigsend_to_ruby_thread, install_nativethread_sighandler): nativethread-support on signal handler (backport from 1.9). * ruby.h (HAVE_NATIVETHREAD_KILL): ditto. * eval.c (ruby_native_thread_kill): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/ruby.h b/ruby.h
index c23a60d..a4a8753 100644
--- a/ruby.h
+++ b/ruby.h
@@ -696,6 +696,9 @@ typedef pthread_t rb_nativethread_t;
# define NATIVETHREAD_CURRENT() pthread_self()
# define NATIVETHREAD_EQUAL(t1,t2) pthread_equal((t1),(t2))
# define HAVE_NATIVETHREAD
+
+# define NATIVETHREAD_KILL(th,sig) pthread_kill((th),(sig))
+# define HAVE_NATIVETHREAD_KILL
#elif defined(_WIN32) || defined(_WIN32_WCE)
typedef DWORD rb_nativethread_t;
# define NATIVETHREAD_CURRENT() GetCurrentThreadId()
@@ -703,10 +706,13 @@ typedef DWORD rb_nativethread_t;
# define HAVE_NATIVETHREAD
#endif
#ifdef HAVE_NATIVETHREAD
-RUBY_EXTERN int is_ruby_native_thread();
+int is_ruby_native_thread _((void));
#else
#define is_ruby_native_thread() (1)
#endif
+#ifdef HAVE_NATIVETHREAD_KILL
+void ruby_native_thread_kill _((int));
+#endif
#if defined(__cplusplus)
#if 0