Drop the high FP state of an exiting thread in cpu_thread_exit() and

not in cpu_exit(). The latter is called after td_md.md_highfp_mtx
has been destroyed, which results in a race condition when another
thread wants to use the high FP registers on the CPU that still has
the high FP registers in question.
This commit is contained in:
marcel 2009-06-20 05:36:53 +00:00
parent 40e33db11b
commit 1c7681de49

View File

@ -99,6 +99,9 @@
void
cpu_thread_exit(struct thread *td)
{
/* Throw away the high FP registers. */
ia64_highfp_drop(td);
}
void
@ -319,10 +322,6 @@ cpu_set_fork_handler(td, func, arg)
void
cpu_exit(struct thread *td)
{
/* XXX: Should this be in cpu_thread_exit() instead? */
/* Throw away the high FP registers. */
ia64_highfp_drop(td);
}
/*