Flush the register windows before we start changing the context.

Submitted by:	Andrew Belashov <bel (at) orel.ru> (slightly modified)
Reviewed by:	jake
This commit is contained in:
kensmith 2004-10-09 16:42:09 +00:00
parent 38ce00cc1c
commit 22149b5972

View File

@ -646,6 +646,8 @@ set_mcontext(struct thread *td, const mcontext_t *mc)
return (EINVAL);
tf = td->td_frame;
pcb = td->td_pcb;
/* Make sure the windows are spilled first. */
flushw();
wstate = tf->tf_wstate;
bcopy(mc, tf, sizeof(*tf));
tf->tf_wstate = wstate;