1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00

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:
Ken Smith 2004-10-09 16:42:09 +00:00
parent 8353d82bfd
commit 27dd55ed35
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136325

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;