| 3035 | } |
| 3036 | |
| 3037 | static void |
| 3038 | fpstate_drop(struct thread *td) |
| 3039 | { |
| 3040 | |
| 3041 | KASSERT(PCB_USER_FPU(td->td_pcb), ("fpstate_drop: kernel-owned fpu")); |
| 3042 | critical_enter(); |
| 3043 | if (PCPU_GET(fpcurthread) == td) |
| 3044 | npxdrop(); |
| 3045 | /* |
| 3046 | * XXX force a full drop of the npx. The above only drops it if we |
| 3047 | * owned it. npxgetregs() has the same bug in the !cpu_fxsr case. |
| 3048 | * |
| 3049 | * XXX I don't much like npxgetregs()'s semantics of doing a full |
| 3050 | * drop. Dropping only to the pcb matches fnsave's behaviour. |
| 3051 | * We only need to drop to !PCB_INITDONE in sendsig(). But |
| 3052 | * sendsig() is the only caller of npxgetregs()... perhaps we just |
| 3053 | * have too many layers. |
| 3054 | */ |
| 3055 | curthread->td_pcb->pcb_flags &= ~(PCB_NPXINITDONE | |
| 3056 | PCB_NPXUSERINITDONE); |
| 3057 | critical_exit(); |
| 3058 | } |
| 3059 | |
| 3060 | int |
| 3061 | fill_dbregs(struct thread *td, struct dbreg *dbregs) |
no test coverage detected