summaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-17 12:58:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-17 12:58:31 +0000
commit2fe5f9c017d18be3a9e493c94c754e309eb415ce (patch)
treec2b1ace3fde5cbf22135144ecd58e92c3726ee25 /thread_pthread.c
parent2ea4f19e4f797b067d7e6f548743003e62acbeac (diff)
downloadruby-2fe5f9c017d18be3a9e493c94c754e309eb415ce.tar.gz
ruby-2fe5f9c017d18be3a9e493c94c754e309eb415ce.tar.xz
ruby-2fe5f9c017d18be3a9e493c94c754e309eb415ce.zip
* thread_pthread.c (native_thread_init_stack): suppress warnings.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 62ac28b80..bcab6acdd 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -229,13 +229,15 @@ native_thread_init_stack(rb_thread_t *th)
else {
#ifdef HAVE_PTHREAD_GETATTR_NP
pthread_attr_t attr;
+ void *start;
CHECK_ERR(pthread_getattr_np(curr, &attr));
# if defined HAVE_PTHREAD_ATTR_GETSTACK
- CHECK_ERR(pthread_attr_getstack(&attr, &th->machine_stack_start, &th->machine_stack_maxsize));
+ CHECK_ERR(pthread_attr_getstack(&attr, &start, &th->machine_stack_maxsize));
# elif defined HAVE_PTHREAD_ATTR_GETSTACKSIZE && defined HAVE_PTHREAD_ATTR_GETSTACKADDR
- CHECK_ERR(pthread_attr_getstackaddr(&attr, &th->machine_stack_start));
+ CHECK_ERR(pthread_attr_getstackaddr(&attr, &start));
CHECK_ERR(pthread_attr_getstacksize(&attr, &th->machine_stack_maxsize));
# endif
+ th->machine_stack_start = start;
#else
rb_raise(rb_eNotImpError, "ruby engine can initialize only in the main thread");
#endif