1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2018-01-09 23:47:19 +00:00
parent 3e8b9f85ff
commit 0c60f22ec5

View file

@ -834,11 +834,6 @@ native_thread_init_stack(rb_thread_t *th)
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)
# 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);