Use npxdrop in cpu_thread_exit to save some cycles.
Clear FPU pcb flags for new upcall thread, these flags needn't be inherited, the new thread should start from clean FPU status.
This commit is contained in:
parent
b767de36df
commit
f2c5a17d79
@ -286,7 +286,8 @@ cpu_thread_exit(struct thread *td)
|
||||
{
|
||||
struct pcb *pcb = td->td_pcb;
|
||||
#ifdef DEV_NPX
|
||||
npxexit(td);
|
||||
if (td == PCPU_GET(fpcurthread))
|
||||
npxdrop();
|
||||
#endif
|
||||
if (pcb->pcb_flags & PCB_DBREGS) {
|
||||
/* disable all hardware breakpoints */
|
||||
@ -369,6 +370,7 @@ cpu_set_upcall(struct thread *td, struct thread *td0)
|
||||
* more analysis) (need a good safe default).
|
||||
*/
|
||||
bcopy(td0->td_pcb, pcb2, sizeof(*pcb2));
|
||||
pcb2->pcb_flags &= ~(PCB_NPXTRAP|PCB_NPXINITDONE);
|
||||
|
||||
/*
|
||||
* Create a new fresh stack for the new thread.
|
||||
|
Loading…
Reference in New Issue
Block a user