rem: Scheme_Thread * volatile p;
add: Scheme_Thread *p;
context: Scheme_Object *scheme_dynamic_wind(void (*pre)(void *),				   Scheme_Object *(* volatile act)(void *),				   void (* volatile post)(void *),				   Scheme_Object *(*jmp_handler)(void *),				   void * volatile data){  mz_jmp_buf newbuf;  Scheme_Object * volatile v, ** volatile save_values;  volatile int err;  Scheme_Dynamic_Wind * volatile dw;  volatile int save_count;  Scheme_Thread * volatile p;  p = scheme_current_thread;  dw = MALLOC_ONE_RT(Scheme_Dynamic_Wind);#ifdef MZTAG_REQUIRED  dw->type = scheme_rt_dyn_wind;#endif  dw->data = data;  dw->pre = pre;  dw->post = post;  dw->prev = p->dw;  if (pre) {    p->suspend_break++;    pre(data);    p = scheme_current_thread;    --p->suspend_break;  }  p->dw = dw;    dw->saveerr = scheme_current_thread->error_buf;  scheme_current_thread->error_buf = &newbuf;  scheme_save_env_stack_w_thread(dw->envss, p);  if (scheme_setjmp(newbuf)) {    p = scheme_current_thread;    scheme_restore_env_stack_w_thread(dw->envss, p);    if (p->dw != dw) {      /* Apparently, a full continuation jump was interrupted by an	 escape continuation jump (in a dw pre or post thunk). Either	 1) this dw's post is already done for an interupted upward	 jump; or	 2) we never actually got this far for an interrupted	 downward jump.	 In either case, skip up until we get to the right level. */      scheme_longjmp(*dw->saveerr, 1);    } else {      if (jmp_handler)	v = jmp_handler(data);      else	v = NULL;      err = !v;    }  } else {    if (pre) {      /* Need to check for a break, in case one was queued during	 pre: */      scheme_check_break_now();    }    v = act(data);    err = 0;  }  p = scheme_current_thread;  if (SAME_OBJ(v, SCHEME_MULTIPLE_VALUES)) {    save_count = p->ku.multiple.count;    save_values = p->ku.multiple.array;    p->ku.multiple.array = NULL;    if (SAME_OBJ(save_values, p->values_buffer))      p->values_buffer = NULL;  } else {    save_count = 0;    save_values = NULL;  }  p->dw = dw->prev;  /* Don't run Scheme-based dyn-winds when we're killing a nested thread. */  if (err && p->cjs.is_kill && (post == post_dyn_wind))    post = NULL;  if (post) {    p->error_buf = &newbuf;    if (scheme_setjmp(newbuf)) {      p = scheme_current_thread;      scheme_restore_env_stack_w_thread(dw->envss, p);      err = 1;    } else {      p->suspend_break++;      post(data);      p = scheme_current_thread;      --p->suspend_break;    }  }  if (err)    scheme_longjmp(*dw->saveerr, 1);  p->error_buf = dw->saveerr;  if (post) {    /* Need to check for a break, in case one was queued during post: */    scheme_check_break_now();  }  if (save_values) {    p->ku.multiple.count = save_count;    p->ku.multiple.array = save_values;    return SCHEME_MULTIPLE_VALUES;  }  return v;}