aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-28 08:20:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-28 08:20:10 +0000
commitb7aa49b9a7dfe7572fab456ab4f5cde1377713b0 (patch)
tree9149d6ad0afac0c752c0510e1d60509b900ac868 /thread_pthread.c
parent50b17c701f0e49f09e8ae8faa924d87a99be9ce7 (diff)
downloadruby-b7aa49b9a7dfe7572fab456ab4f5cde1377713b0.tar.gz
thread_pthread.c: dup code
* thread_pthread.c (get_stack): merge duplicated code split by ifdef. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 8fb510e0e4..d915c10943 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -532,12 +532,11 @@ get_stack(void **addr, size_t *size)
CHECK_ERR(pthread_attr_get_np(pthread_self(), &attr));
# ifdef HAVE_PTHREAD_ATTR_GETSTACK
CHECK_ERR(pthread_attr_getstack(&attr, addr, size));
- STACK_DIR_UPPER((void)0, (void)(*addr = (char *)*addr + *size));
# else
CHECK_ERR(pthread_attr_getstackaddr(&attr, addr));
CHECK_ERR(pthread_attr_getstacksize(&attr, size));
- STACK_DIR_UPPER((void)0, (void)(*addr = (char *)*addr + *size));
# endif
+ STACK_DIR_UPPER((void)0, (void)(*addr = (char *)*addr + *size));
pthread_attr_destroy(&attr);
#elif (defined HAVE_PTHREAD_GET_STACKADDR_NP && defined HAVE_PTHREAD_GET_STACKSIZE_NP) /* MacOS X */
pthread_t th = pthread_self();