diff --git a/ChangeLog b/ChangeLog index 4eaad66d0a..6c3ecca8b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Sun Jun 6 08:26:01 2010 Tanaka Akira + + * vm.c (Init_BareVM): call Init_native_thread here. + + * thread.c (Init_Thread): don't call Init_native_thread. + + * thread_pthread.c (Init_native_thread): exported. + + * thread_win32.c (Init_native_thread): ditto. + + [ruby-dev:41536] + Sun Jun 6 08:21:17 2010 Nobuyoshi Nakada * NEWS: Enumerable#join has been reverted. [ruby-core:30604] diff --git a/thread.c b/thread.c index aff7182701..0b36f15bcb 100644 --- a/thread.c +++ b/thread.c @@ -4239,7 +4239,6 @@ Init_Thread(void) rb_define_method(rb_cThread, "add_trace_func", thread_add_trace_func_m, 1); /* init thread core */ - Init_native_thread(); { /* main thread setting */ { diff --git a/thread_pthread.c b/thread_pthread.c index 285852baa9..c2a555aa6c 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -163,7 +163,7 @@ ruby_thread_set_native(rb_thread_t *th) return pthread_setspecific(ruby_native_thread_key, th) == 0; } -static void +void Init_native_thread(void) { rb_thread_t *th = GET_THREAD(); diff --git a/thread_win32.c b/thread_win32.c index ec5a4e8769..1391bece54 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -44,7 +44,7 @@ ruby_thread_set_native(rb_thread_t *th) return TlsSetValue(ruby_native_thread_key, th); } -static void +void Init_native_thread(void) { rb_thread_t *th = GET_THREAD(); diff --git a/vm.c b/vm.c index 04d1c815c3..bc11094d4e 100644 --- a/vm.c +++ b/vm.c @@ -2110,6 +2110,8 @@ struct rb_objspace *rb_objspace_alloc(void); #endif void ruby_thread_init_stack(rb_thread_t *th); +extern void Init_native_thread(void); + void Init_BareVM(void) { @@ -2130,6 +2132,7 @@ Init_BareVM(void) #endif ruby_current_vm = vm; + Init_native_thread(); th_init2(th, 0); th->vm = vm; ruby_thread_init_stack(th);