rem: Scheme_Thread * volatile p = scheme_current_thread;
add: Scheme_Thread *p = scheme_current_thread;
context: call_cc (int argc, Scheme_Object *argv[]){  Scheme_Object *ret;  Scheme_Cont * volatile cont;  Scheme_Dynamic_Wind *dw;  Scheme_Thread * volatile p = scheme_current_thread;  Scheme_Saved_Stack *saved;  Scheme_Cont_Mark *msaved;  scheme_check_proc_arity("call-with-current-continuation", 1,			  0, argc, argv);  cont = MALLOC_ONE_TAGGED(Scheme_Cont);  cont->so.type = scheme_cont_type;  scheme_init_jmpup_buf(&cont->buf);  cont->ok = p->cc_ok;  *(p->cc_ok) = 2; /* Marks it as used */  cont->dw = p->dw;  cont->suspend_break = p->suspend_break;  copy_cjs(&cont->cjs, &p->cjs);  cont->save_overflow = p->overflow;  cont->save_overflow_buf = p->overflow_buf;  scheme_save_env_stack_w_thread(cont->ss, p);  cont->init_config = p->init_config;  cont->init_break_cell = p->init_break_cell;  {    Scheme_Overflow *overflow;    /* Mark overflows as captured: */    for (overflow = p->overflow; overflow && !overflow->captured; overflow = overflow->prev) {      overflow->captured = 1;    }  }  scheme_cont_capture_count++;  if (p->cc_ok == thread_init_cc_ok) {    /* This continuation can be used by other threads,       so we need to track ownership of the runstack */    if (!p->runstack_owner) {      Scheme_Thread **owner;      owner = MALLOC_N(Scheme_Thread *, 1);      p->runstack_owner = owner;      *owner = p;    }    if (p->cont_mark_stack && !p->cont_mark_stack_owner) {      Scheme_Thread **owner;      owner = MALLOC_N(Scheme_Thread *, 1);      p->cont_mark_stack_owner = owner;      *owner = p;    }  }  /* Hide call/cc's arg off of stack */  p->ku.k.p1 = argv[0];  argv[0] = NULL;  saved = copy_out_runstack(p, MZ_RUNSTACK, MZ_RUNSTACK_START);  cont->runstack_copied = saved;  msaved = copy_out_mark_stack(p, MZ_CONT_MARK_STACK);  cont->cont_mark_stack_copied = msaved;  cont->runstack_owner = p->runstack_owner;  cont->cont_mark_stack_owner = p->cont_mark_stack_owner;  cont->stack_start = p->stack_start;  cont->o_start = p->o_start;  cont->savebuf = p->error_buf;  scheme_zero_unneeded_rands(p);  scheme_flatten_config(scheme_current_config());  if (scheme_setjmpup(&cont->buf, cont, p->next ? p->stack_start : p->o_start)) {    /* We arrive here when the continuation is applied */    MZ_MARK_STACK_TYPE copied_cms = 0;    Scheme_Object *result, **mv;    int mc;        result = cont->value;    cont->value = NULL;    p = scheme_current_thread; /* maybe different than before */    if (SAME_OBJ(result, SCHEME_MULTIPLE_VALUES)) {      /* Get values out before GC */      mv = p->ku.multiple.array;      mc = p->ku.multiple.count;      if (SAME_OBJ(mv, p->values_buffer))	p->values_buffer = NULL;    } else {      mv = NULL;      mc = 0;    }    p->error_buf = cont->savebuf;    p->stack_start = cont->stack_start;    p->o_start = cont->o_start;    p->init_config = cont->init_config;    p->init_break_cell = cont->init_break_cell;    p->suspend_break = cont->suspend_break;        copy_cjs(&p->cjs, &cont->cjs);    p->overflow_buf = cont->save_overflow_buf;    p->overflow = cont->save_overflow;    scheme_restore_env_stack_w_thread(cont->ss, p);    if (p->runstack_owner)      *p->runstack_owner = NULL;    p->runstack_owner = cont->runstack_owner;    if (p->runstack_owner && (*p->runstack_owner != p)) {      Scheme_Thread *op;      op = *p->runstack_owner;      if (op) {	saved = copy_out_runstack(op, op->runstack, op->runstack_start);	op->runstack_swapped = saved;      }      *p->runstack_owner = p;    }    /* Copy stack back in: (p->runstack and p->runstack_saved arrays       are already restored, so the shape is certainly the same as       when cont->runstack_copied was made) */    copy_in_runstack(p, cont->runstack_copied);    p->cont_mark_stack_owner = cont->cont_mark_stack_owner;    if (p->cont_mark_stack_owner	&& (*p->cont_mark_stack_owner != p)) {      Scheme_Thread *op;      op = *p->cont_mark_stack_owner;      if (op) {	msaved = copy_out_mark_stack(op, op->cont_mark_stack);	op->cont_mark_stack_swapped = msaved;      }      *p->cont_mark_stack_owner = p;    }    /* For dynamic-winds after the "common" intersection       (see eval.c), execute the pre thunks. Make a list       of these first because they have to be done in the       inverse order of `prev' linkage. */    if (cont->dw) {      Scheme_Dynamic_Wind_List *dwl = NULL;      p->suspend_break++;      for (dw = cont->dw; dw != cont->common; dw = dw->prev) {	Scheme_Dynamic_Wind_List *cell;	cell = MALLOC_ONE_RT(Scheme_Dynamic_Wind_List);#ifdef MZTAG_REQUIRED	cell->type = scheme_rt_dyn_wind_cell;#endif	cell->dw = dw;	cell->next = dwl;	dwl = cell;      }      for (; dwl; dwl = dwl->next) {	if (dwl->dw->pre) {	  DW_PrePost_Proc pre = dwl->dw->pre;	  /* Restore the needed part of the mark stack for this	     dynamic-wind context. */	  MZ_CONT_MARK_POS = dwl->dw->envss.cont_mark_pos;	  MZ_CONT_MARK_STACK = dwl->dw->envss.cont_mark_stack;	  copy_in_mark_stack(p, cont->cont_mark_stack_copied, 			     MZ_CONT_MARK_STACK, copied_cms);	  p->dw = dwl->dw->prev;	  pre(dwl->dw->data);	  p = scheme_current_thread;	}      }      --p->suspend_break;    }    p->dw = cont->dw;    /* Finish copying cont mark stack back in. */        MZ_CONT_MARK_POS = cont->ss.cont_mark_pos;    MZ_CONT_MARK_STACK = cont->ss.cont_mark_stack;    copy_in_mark_stack(p, cont->cont_mark_stack_copied, 		       MZ_CONT_MARK_STACK, copied_cms);        /* We may have just re-activated breaking: */    scheme_check_break_now();    if (SAME_OBJ(result, SCHEME_MULTIPLE_VALUES)) {      p->ku.multiple.array = mv;      p->ku.multiple.count = mc;    }    return result;  } else {    Scheme_Object *argv2[1];    /* Restore call/cc's arg to stack. */    /* (We aren't actually allowed to modify argv! :) */    argv[0] = p->ku.k.p1;    p->ku.k.p1 = NULL;    argv2[0] = (Scheme_Object *)cont;    ret = _scheme_tail_apply(argv[0], 1, argv2);    return ret;  }}