Project

General

Profile

Feature #10341 » 0001-Remove-unused-prev_fiber-next_fiber-fields.patch

nome (Knut Franke), 10/08/2014 11:59 AM

View differences:

cont.c
*/
int transfered;
struct rb_fiber_struct *prev_fiber;
struct rb_fiber_struct *next_fiber;
#if FIBER_USE_NATIVE
#ifdef _WIN32
void *fib_handle;
......
}
static void
fiber_link_join(rb_fiber_t *fib)
{
VALUE current_fibval = rb_fiber_current();
rb_fiber_t *current_fib;
GetFiberPtr(current_fibval, current_fib);
/* join fiber link */
fib->next_fiber = current_fib->next_fiber;
fib->prev_fiber = current_fib;
current_fib->next_fiber->prev_fiber = fib;
current_fib->next_fiber = fib;
}
static void
fiber_link_remove(rb_fiber_t *fib)
{
fib->prev_fiber->next_fiber = fib->next_fiber;
fib->next_fiber->prev_fiber = fib->prev_fiber;
}
static void
fiber_free(void *ptr)
{
RUBY_FREE_ENTER("fiber");
......
fib->cont.saved_thread.local_storage) {
st_free_table(fib->cont.saved_thread.local_storage);
}
fiber_link_remove(fib);
cont_free(&fib->cont);
}
......
th->stack = 0;
th->stack_size = 0;
fiber_link_join(fib);
th->stack_size = th->vm->default_params.fiber_vm_stack_size / sizeof(VALUE);
th->stack = ALLOC_N(VALUE, th->stack_size);
......
#endif
#endif
fib->status = RUNNING;
fib->prev_fiber = fib->next_fiber = fib;
return fib;
}
(1-1/6)