* 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
This commit is contained in:
ko1 2007-01-04 04:47:59 +00:00
parent 26608663cd
commit 424eec36a6
2 changed files with 8 additions and 7 deletions

View File

@ -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>

View File

@ -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);