vm.c: remove unused USE_THREAD_RECYCLE [misc #10198]

Unused feature, and it is a no-op even if enabled.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2014-09-04 21:05:31 +00:00
parent f0b12c0461
commit 670c6e8ce9
2 changed files with 5 additions and 15 deletions

View File

@ -1,3 +1,7 @@
Fri Sep 5 06:04:22 2014 Eric Wong <e@80x24.org>
* vm.c: remove unused USE_THREAD_RECYCLE [misc #10198]
Fri Sep 5 00:29:08 2014 Tanaka Akira <akr@fsij.org>
* configure.in (dirfd): Check function.

16
vm.c
View File

@ -1967,16 +1967,6 @@ rb_thread_recycle_stack_release(VALUE *stack)
ruby_xfree(stack);
}
#ifdef USE_THREAD_RECYCLE
static rb_thread_t *
thread_recycle_struct(void)
{
void *p = ALLOC_N(rb_thread_t, 1);
memset(p, 0, sizeof(rb_thread_t));
return p;
}
#endif
void
rb_thread_mark(void *ptr)
{
@ -2134,13 +2124,9 @@ static VALUE
thread_alloc(VALUE klass)
{
VALUE volatile obj;
#ifdef USE_THREAD_RECYCLE
rb_thread_t *th = thread_recycle_struct();
obj = TypedData_Wrap_Struct(klass, &thread_data_type, th);
#else
rb_thread_t *th;
obj = TypedData_Make_Struct(klass, rb_thread_t, &thread_data_type, th);
#endif
return obj;
}