From 63034a52b88c7e6f4e54dc159b909f1ac535e6b1 Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 16 May 2010 12:15:59 +0000 Subject: merges r27789 from trunk into ruby_1_9_2. -- * vm_core.c (rb_thread_struct): add a field for sigaltstack. * thread_pthread.c (thread_start_func_1): initialize machine stack information. * thread.c (thread_start_func_2): set sigaltstack for each sub thread. [ruby-core:24540] [ruby-core:30207] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_core.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index 39dfe55556..1843567693 100644 --- a/vm_core.h +++ b/vm_core.h @@ -63,6 +63,10 @@ #define va_init_list(a,b) va_start(a) #endif +#if defined(SIGSEGV) && defined(HAVE_SIGALTSTACK) && defined(SA_SIGINFO) && !defined(__NetBSD__) +#define USE_SIGALTSTACK +#endif + /*****************/ /* configuration */ /*****************/ @@ -473,6 +477,9 @@ typedef struct rb_thread_struct /* misc */ int method_missing_reason; int abort_on_exception; +#ifdef USE_SIGALTSTACK + void *altstack; +#endif } rb_thread_t; /* iseq.c */ -- cgit v1.2.3