From 28937bf81f25eb950afe94809174ffc6eced3dd8 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 6 Feb 2011 10:59:03 +0000 Subject: [PATCH] * thread_pthread.c (register_cached_thread_and_wait): move invalid storage class function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_pthread.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/thread_pthread.c b/thread_pthread.c index aabf36de42..ad6f716a3f 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -345,6 +345,10 @@ native_thread_destroy(rb_thread_t *th) #define USE_THREAD_CACHE 0 +#if USE_THREAD_CACHE +static rb_thread_t *register_cached_thread_and_wait(void); +#endif + #if defined HAVE_PTHREAD_GETATTR_NP || defined HAVE_PTHREAD_ATTR_GET_NP #define STACKADDR_AVAILABLE 1 #elif defined HAVE_PTHREAD_GET_STACKADDR_NP && defined HAVE_PTHREAD_GET_STACKSIZE_NP @@ -525,7 +529,6 @@ thread_start_func_1(void *th_ptr) if (1) { /* cache thread */ rb_thread_t *th; - static rb_thread_t *register_cached_thread_and_wait(void); if ((th = register_cached_thread_and_wait()) != 0) { th_ptr = (void *)th; th->thread_id = pthread_self();