Page MenuHomeFreeBSD

D12292.id32848.diff
No OneTemporary

D12292.id32848.diff

Index: sys/arm/arm/machdep.c
===================================================================
--- sys/arm/arm/machdep.c
+++ sys/arm/arm/machdep.c
@@ -408,17 +408,17 @@
void
get_vfpcontext(struct thread *td, mcontext_vfp_t *vfp)
{
- struct pcb *curpcb;
+ struct pcb *pcb;
- curpcb = curthread->td_pcb;
- critical_enter();
-
- vfp_store(&curpcb->pcb_vfpstate, false);
- memcpy(vfp->mcv_reg, curpcb->pcb_vfpstate.reg,
+ pcb = td->td_pcb;
+ if (td == curthread) {
+ critical_enter();
+ vfp_store(&pcb->pcb_vfpstate, false);
+ critical_exit();
+ }
+ memcpy(vfp->mcv_reg, pcb->pcb_vfpstate.reg,
sizeof(vfp->mcv_reg));
- vfp->mcv_fpscr = curpcb->pcb_vfpstate.fpscr;
-
- critical_exit();
+ vfp->mcv_fpscr = pcb->pcb_vfpstate.fpscr;
}
/*
@@ -427,17 +427,18 @@
void
set_vfpcontext(struct thread *td, mcontext_vfp_t *vfp)
{
- struct pcb *curpcb;
+ struct pcb *pcb;
- curpcb = curthread->td_pcb;
- critical_enter();
-
- vfp_discard(td);
- memcpy(curpcb->pcb_vfpstate.reg, vfp->mcv_reg,
- sizeof(curpcb->pcb_vfpstate.reg));
- curpcb->pcb_vfpstate.fpscr = vfp->mcv_fpscr;
+ pcb = td->td_pcb;
- critical_exit();
+ if (td == curthread) {
+ critical_enter();
+ vfp_discard(td);
+ critical_exit();
+ }
+ memcpy(pcb->pcb_vfpstate.reg, vfp->mcv_reg,
+ sizeof(pcb->pcb_vfpstate.reg));
+ pcb->pcb_vfpstate.fpscr = vfp->mcv_fpscr;
}
#endif

File Metadata

Mime Type
text/plain
Expires
Sat, May 16, 6:56 PM (1 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33145983
Default Alt Text
D12292.id32848.diff (1 KB)

Event Timeline