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 /thread_pthread.ci | |
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
Diffstat (limited to 'thread_pthread.ci')
-rw-r--r-- | thread_pthread.ci | 7 |
1 files changed, 2 insertions, 5 deletions
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); |