ruby-changes:49635
From: normal <ko1@a...>
Date: Wed, 10 Jan 2018 08:47:24 +0900 (JST)
Subject: [ruby-changes:49635] normal:r61750 (trunk): thread_pthread.c: remove dead code around "get_stack_of"
normal 2018-01-10 08:47:19 +0900 (Wed, 10 Jan 2018) New Revision: 61750 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61750 Log: thread_pthread.c: remove dead code around "get_stack_of" "get_stack_of" was only in a proposed patch for [Feature #8793] https://bugs.ruby-lang.org/issues/8793 and never applied. Modified files: trunk/thread_pthread.c Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 61749) +++ thread_pthread.c (revision 61750) @@ -834,11 +834,6 @@ native_thread_init_stack(rb_thread_t *th https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L834 th->ec->machine.stack_start = (VALUE *)&curr; th->ec->machine.stack_maxsize = size - diff; } -#elif defined get_stack_of - if (!th->ec->machine.stack_maxsize) { - native_mutex_lock(&th->interrupt_lock); - native_mutex_unlock(&th->interrupt_lock); - } #else rb_raise(rb_eNotImpError, "ruby engine can initialize only in the main thread"); #endif @@ -1010,18 +1005,7 @@ native_thread_create(rb_thread_t *th) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1005 # endif CHECK_ERR(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)); -#ifdef get_stack_of - native_mutex_lock(&th->interrupt_lock); -#endif err = pthread_create(&th->thread_id, attrp, thread_start_func_1, th); -#ifdef get_stack_of - if (!err) { - get_stack_of(th->thread_id, - &th->ec->machine.stack_start, - &th->ec->machine.stack_maxsize); - } - native_mutex_unlock(&th->interrupt_lock); -#endif thread_debug("create: %p (%d)\n", (void *)th, err); /* should be done in the created thread */ fill_thread_id_str(th); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/