diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | thread.c | 12 | ||||
-rw-r--r-- | thread_pthread.ci | 12 | ||||
-rw-r--r-- | thread_win32.ci | 5 |
4 files changed, 14 insertions, 20 deletions
@@ -1,3 +1,8 @@ +Thu Jul 12 10:19:16 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * thread_pthread.ci (thread_start_func_2): not use a directive inside + a macro argument. [ruby-talk:258763] + Thu Jul 12 05:32:28 2007 NAKAMURA Usaku <usa@ruby-lang.org> * include/ruby/ruby.h (FIX2ULONG): drop sign bit for LLP64 platform. @@ -137,6 +137,12 @@ rb_thread_s_debug_set(VALUE self, VALUE val) #define thread_debug if(0)printf #endif +#ifndef __ia64 +#define thread_start_func_2(th, st, rst) thread_start_func_2(th, st) +#endif +NOINLINE(static int thread_start_func_2(rb_thread_t *th, VALUE *stack_start, + VALUE *register_stack_start)); + #if defined(_WIN32) #include "thread_win32.ci" @@ -272,11 +278,7 @@ thread_cleanup_func(void *th_ptr) } static int -thread_start_func_2(rb_thread_t *th, VALUE *stack_start -#ifdef __ia64 - , VALUE *register_stack_start -#endif -) +thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_start) { int state; VALUE args = th->first_args; diff --git a/thread_pthread.ci b/thread_pthread.ci index 18f3577111..0f91a86063 100644 --- a/thread_pthread.ci +++ b/thread_pthread.ci @@ -86,12 +86,6 @@ Init_native_thread() posix_signal(SIGVTALRM, null_func); } -NOINLINE(static int thread_start_func_2(rb_thread_t *th, VALUE *stack_start -#ifdef __ia64 - , VALUE *register_stack_start -#endif -)); - static void native_thread_destroy(rb_thread_t *th) { @@ -111,11 +105,7 @@ thread_start_func_1(void *th_ptr) VALUE stack_start; /* run */ - thread_start_func_2(th, &stack_start -#ifdef __ia64 - , rb_ia64_bsp() -#endif - ); + thread_start_func_2(th, &stack_start, rb_ia64_bsp()); } #if USE_THREAD_CACHE if (1) { diff --git a/thread_win32.ci b/thread_win32.ci index 1a0ef7d71d..ca4241b9e9 100644 --- a/thread_win32.ci +++ b/thread_win32.ci @@ -280,9 +280,6 @@ native_mutex_destroy(rb_thread_lock_t *lock) } -NOINLINE(static int - thread_start_func_2(rb_thread_t *th, VALUE *stack_start)); - static void native_thread_destroy(rb_thread_t *th) { @@ -304,7 +301,7 @@ thread_start_func_1(void *th_ptr) /* run */ thread_debug("thread created (th: %p, thid: %p, event: %p)\n", th, th->thread_id, th->native_thread_data.interrupt_event); - thread_start_func_2(th, &stack_start); + thread_start_func_2(th, &stack_start, 0); w32_close_handle(thread_id); thread_debug("thread deleted (th: %p)\n", th); |