ruby-changes:6454
From: nobu <ko1@a...>
Date: Wed, 9 Jul 2008 18:17:25 +0900 (JST)
Subject: [ruby-changes:6454] Ruby:r17970 (trunk): * thread_{pthread,win32}.c (rb_thread_create_timer_thread): needs more
nobu 2008-07-09 18:17:09 +0900 (Wed, 09 Jul 2008) New Revision: 17970 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=17970 Log: * thread_{pthread,win32}.c (rb_thread_create_timer_thread): needs more stack for debug. Modified files: trunk/ChangeLog trunk/thread.c trunk/thread_pthread.c trunk/thread_win32.c Index: thread_win32.c =================================================================== --- thread_win32.c (revision 17969) +++ thread_win32.c (revision 17970) @@ -555,7 +555,8 @@ rb_thread_create_timer_thread(void) { if (timer_thread_id == 0) { - timer_thread_id = w32_create_thread(1024, timer_thread_func, GET_VM()); + timer_thread_id = w32_create_thread(1024 + (THREAD_DEBUG ? BUFSIZ : 0), + timer_thread_func, GET_VM()); w32_resume_thread(timer_thread_id); } } Index: ChangeLog =================================================================== --- ChangeLog (revision 17969) +++ ChangeLog (revision 17970) @@ -1,3 +1,8 @@ +Wed Jul 9 18:17:06 2008 Nobuyoshi Nakada <nobu@r...> + + * thread_{pthread,win32}.c (rb_thread_create_timer_thread): needs more + stack for debug. + Wed Jul 9 11:13:39 2008 Nobuyoshi Nakada <nobu@r...> * lib/profiler.rb (Profiler__#print_profile): sort in the descending Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 17969) +++ thread_pthread.c (revision 17970) @@ -693,7 +693,8 @@ pthread_attr_init(&attr); #ifdef PTHREAD_STACK_MIN - pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN); + pthread_attr_setstacksize(&attr, + PTHREAD_STACK_MIN + (THREAD_DEBUG ? BUFSIZ : 0)); #endif err = pthread_create(&timer_thread_id, &attr, thread_timer, GET_VM()); if (err != 0) { Index: thread.c =================================================================== --- thread.c (revision 17969) +++ thread.c (revision 17970) @@ -167,7 +167,7 @@ #define DEBUG_OUT() \ pthread_mutex_lock(&debug_mutex); \ - printf("%p - %s", pthread_self(), buf); \ + printf("%#"PRIxVALUE" - %s", (VALUE)pthread_self(), buf); \ fflush(stdout); \ pthread_mutex_unlock(&debug_mutex); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/