Project

General

Profile

Feature #10341 ยป 0003-Small-code-cleanup.patch

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

View differences:

cont.c
450 450
cont_capture(volatile int *stat)
451 451
{
452 452
    rb_context_t *cont;
453
    rb_thread_t *th = GET_THREAD(), *sth;
453
    rb_thread_t *th = GET_THREAD();
454 454
    volatile VALUE contval;
455 455

  
456 456
    THREAD_MUST_BE_RUNNING(th);
457 457
    rb_vm_stack_to_heap(th);
458 458
    cont = cont_new(rb_cContinuation);
459 459
    contval = cont->self;
460
    sth = &cont->saved_thread;
461 460

  
462 461
#ifdef CAPTURE_JUST_VALID_VM_STACK
463 462
    cont->vm_stack_slen = th->cfp->sp + th->mark_stack_len - th->stack;
......
469 468
    cont->vm_stack = ALLOC_N(VALUE, th->stack_size);
470 469
    MEMCPY(cont->vm_stack, th->stack, VALUE, th->stack_size);
471 470
#endif
472
    sth->stack = 0;
471
    cont->saved_thread.stack = 0;
473 472

  
474 473
    cont_save_machine_stack(th, cont);
475 474

  
476
-