summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-15 22:34:30 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-15 22:34:30 +0000
commit6f6238a70cecb8532f6f181e1e73940289d269ce (patch)
treef33a411e74a47cdddbcd255528fcc42a20cebca1 /cont.c
parent2a61ff2e6502426405c64177d51b5f315ac2ec1d (diff)
cont.c: Remove unused prev_fiber/next_fiber fields
They were added in r19890 (8a0d53a), with the explanation that it's a double linked list of fibers in the same thread, but without any code using them. * cont.c (rb_fiber_t): remove prev_fiber/next_fiber (fiber_link_join, fiber_link_remove): remove functions (fiber_free, fiber_init, root_fiber_alloc): remove references to removed fields and functions [ruby-core:65518] [Feature #10341] Author: Knut Franke <Knut.Franke@gmx.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/cont.c b/cont.c
index 2ff2cbb..412f20a 100644
--- a/cont.c
+++ b/cont.c
@@ -140,8 +140,6 @@ typedef struct rb_fiber_struct {
*/
int transfered;
- struct rb_fiber_struct *prev_fiber;
- struct rb_fiber_struct *next_fiber;
#if FIBER_USE_NATIVE
#ifdef _WIN32
void *fib_handle;
@@ -319,27 +317,6 @@ fiber_mark(void *ptr)
}
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");
@@ -349,7 +326,6 @@ fiber_free(void *ptr)
fib->cont.saved_thread.local_storage) {
st_free_table(fib->cont.saved_thread.local_storage);
}
- fiber_link_remove(fib);
cont_free(&fib->cont);
}
@@ -1187,8 +1163,6 @@ fiber_init(VALUE fibval, VALUE proc)
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);
@@ -1331,7 +1305,6 @@ root_fiber_alloc(rb_thread_t *th)
#endif
#endif
fib->status = RUNNING;
- fib->prev_fiber = fib->next_fiber = fib;
return fib;
}