diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-09 09:17:09 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-09 09:17:09 +0000 |
| commit | 9a10bdc98eb60b07c9f4da7b8db30e5823523e51 (patch) | |
| tree | e45655d0fd5be25e82a27b4c7ed4f44f460216d8 | |
| parent | 5cba81a12d29690e067ae34be6054250aca949c0 (diff) | |
| download | ruby-9a10bdc98eb60b07c9f4da7b8db30e5823523e51.tar.gz ruby-9a10bdc98eb60b07c9f4da7b8db30e5823523e51.tar.xz ruby-9a10bdc98eb60b07c9f4da7b8db30e5823523e51.zip | |
* thread_{pthread,win32}.c (rb_thread_create_timer_thread): needs more
stack for debug.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | thread.c | 2 | ||||
| -rw-r--r-- | thread_pthread.c | 3 | ||||
| -rw-r--r-- | thread_win32.c | 3 |
4 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Wed Jul 9 18:17:06 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * thread_{pthread,win32}.c (rb_thread_create_timer_thread): needs more + stack for debug. + Wed Jul 9 11:13:39 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * lib/profiler.rb (Profiler__#print_profile): sort in the descending @@ -167,7 +167,7 @@ static void timer_thread_function(void *); #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); diff --git a/thread_pthread.c b/thread_pthread.c index 72a4dae8c..4787823b3 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -693,7 +693,8 @@ rb_thread_create_timer_thread(void) 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) { diff --git a/thread_win32.c b/thread_win32.c index 98fcb8d37..a810fb362 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -555,7 +555,8 @@ void 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); } } |
