diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-01-04 04:47:59 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-01-04 04:47:59 +0000 |
commit | 424eec36a63bfc3b35297f54bc3c3b5d671edae3 (patch) | |
tree | 0afa17750ed309c311d22694f321ff57686706ad | |
parent | 26608663cd480f265ada34856aaebdcae133a222 (diff) | |
download | ruby-424eec36a63bfc3b35297f54bc3c3b5d671edae3.tar.gz |
* thread_pthread.ci : fix last changes around PTHREAD_STACK_MIN.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | thread_pthread.ci | 7 |
2 files changed, 8 insertions, 7 deletions
@@ -1,6 +1,10 @@ -Thu Jan 04 13:42:47 2007 +Thu Jan 04 13:45:10 2007 Koichi Sasada <ko1@atdot.net> - * common.mk : restore changes + * thread_pthread.ci : fix last changes around PTHREAD_STACK_MIN. + +Thu Jan 04 13:42:47 2007 Koichi Sasada <ko1@atdot.net> + + * common.mk : restore changes. Thu Jan 04 10:33:54 2007 Koichi Sasada <ko1@atdot.net> diff --git a/thread_pthread.ci b/thread_pthread.ci index c2c9d9967f..df1ed7e5d4 100644 --- a/thread_pthread.ci +++ b/thread_pthread.ci @@ -179,9 +179,9 @@ native_thread_create(yarv_thread_t *th) } else { pthread_attr_t attr; + size_t stack_size = 512 * 1024 - sizeof(int); /* 512KB */ #ifdef PTHREAD_STACK_MIN - size_t stack_size = 512 * 1024 - sizeof(int); /* 512KB */ if (stack_size < PTHREAD_STACK_MIN) { stack_size = PTHREAD_STACK_MIN * 2; } @@ -419,15 +419,12 @@ rb_thread_create_timer_thread(void) rb_enable_interrupt(); if (!timer_thread_id) { -#ifdef PTHREAD_STACK_MIN - size_t stack_size = PTHREAD_STACK_MIN; -#endif pthread_attr_t attr; int err; pthread_attr_init(&attr); #ifdef PTHREAD_STACK_MIN - pthread_attr_setstacksize(&attr, stack_size); + pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN); #endif pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); err = pthread_create(&timer_thread_id, &attr, thread_timer, 0); |