libkse: One more bug in kernel?
Andrew Belashov
bel at orel.ru
Tue Sep 28 05:55:31 PDT 2004
Hi!
I have found a bug in kernel.
Here a patch with short explanation.
See also my development set of patches for libkse:
<http://www.orel.ru/~bel/patches/libkse.patch>
--
Best regards,
Andrew Belashov.
-------------- next part --------------
--- sys/sparc64/sparc64/machdep.c.orig Thu Aug 5 09:42:40 2004
+++ sys/sparc64/sparc64/machdep.c Tue Sep 28 15:11:08 2004
@@ -623,6 +623,11 @@ set_mcontext(struct thread *td, const mc
tf = td->td_frame;
pcb = td->td_pcb;
wstate = tf->tf_wstate;
+ /* XXXKSE Make sure the pre-trap windows are spilled.
+ * This is needed for kse_switchin(2) for correct switching between
+ * threads stacks.
+ */
+ flushw();
bcopy(mc, tf, sizeof(*tf));
tf->tf_wstate = wstate;
if ((mc->mc_fprs & FPRS_FEF) != 0) {
More information about the freebsd-sparc64
mailing list