yarv-dev:1018
From: "U.Nakamura" <usa garbagecollect.jp>
Date: Mon, 05 Jun 2006 17:57:42 +0900
Subject: [yarv-dev:1018] open> cannot compile if PTHREAD_STACK_MIN is not defined
こんにちは、なかむら(う)です。
手元のちょっと古いかもしれないNetBSD-currentだと、コンパイル
が通らないことに気付きました。
とりあえず逃げとくパッチです。
Index: thread_pthread.h
===================================================================
--- thread_pthread.h (revision 504)
+++ thread_pthread.h (working copy)
@@ -189,9 +189,11 @@
pthread_attr_t attr;
size_t stack_size = 512 * 1024 - sizeof(int); /* 512KB */
+#ifdef PTHREAD_STACK_MIN
if (stack_size < PTHREAD_STACK_MIN) {
stack_size = PTHREAD_STACK_MIN * 2;
}
+#endif
thread_debug("create: %p, stack size: %ld\n", th, stack_size);
@@ -418,11 +420,15 @@
make_timer_thread()
{
if (!time_thread) {
+#ifdef PTHREAD_STACK_MIN
size_t stack_size = PTHREAD_STACK_MIN;
+#endif
pthread_attr_t attr;
pthread_attr_init(&attr);
+#ifdef PTHREAD_STACK_MIN
pthread_attr_setstacksize(&attr, stack_size);
+#endif
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
pthread_create(&time_thread, &attr, thread_timer, 0);
}
それでは。
--
U.Nakamura <usa garbagecollect.jp>
--
ML: yarv-dev quickml.atdot.net
使い方: http://www.atdot.net/~ko1/quickml
-> 1018 2006-06-05 17:57 [usa garbagecollect.j] open> cannot compile if PTHREAD_STACK_MIN is not defined 1021 2006-06-07 23:58 ┗[ko1 atdot.net ] fixed> Re: open> cannot compile if PTHREAD_STACK_MIN is not defined