[前][次][番号順一覧][スレッド一覧]

ruby-changes:30636

From: nobu <ko1@a...>
Date: Wed, 28 Aug 2013 17:20:15 +0900 (JST)
Subject: [ruby-changes:30636] nobu:r42715 (trunk): thread_pthread.c: dup code

nobu	2013-08-28 17:20:10 +0900 (Wed, 28 Aug 2013)

  New Revision: 42715

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42715

  Log:
    thread_pthread.c: dup code
    
    * thread_pthread.c (get_stack): merge duplicated code split by ifdef.

  Modified files:
    trunk/thread_pthread.c
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 42714)
+++ thread_pthread.c	(revision 42715)
@@ -532,12 +532,11 @@ get_stack(void **addr, size_t *size) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L532
     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();

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]