From 89117798073aab561c965f74c682cc9edd8fced1 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 14 Jan 2005 20:16:41 +0000 Subject: Remove redundant code to drop per-thread debug register state from cpu_exit() as this is already performed in cpu_thread_exit() and the debug state is per-thread rather than per-process. --- sys/amd64/amd64/vm_machdep.c | 7 ------- sys/i386/i386/vm_machdep.c | 8 +------- 2 files changed, 1 insertion(+), 14 deletions(-) (limited to 'sys') diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index b144dfb..d784d02 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -185,13 +185,6 @@ cpu_set_fork_handler(td, func, arg) void cpu_exit(struct thread *td) { - struct pcb *pcb = td->td_pcb; - - if (pcb->pcb_flags & PCB_DBREGS) { - /* disable all hardware breakpoints */ - reset_dbregs(); - pcb->pcb_flags &= ~PCB_DBREGS; - } } void diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index cc98727..1b002dc 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -291,8 +291,6 @@ void cpu_exit(struct thread *td) { struct mdproc *mdp; - struct pcb *pcb = td->td_pcb; - /* Reset pc->pcb_gs and %gs before possibly invalidating it. */ mdp = &td->td_proc->p_md; @@ -301,17 +299,13 @@ cpu_exit(struct thread *td) load_gs(_udatasel); user_ldt_free(td); } - if (pcb->pcb_flags & PCB_DBREGS) { - /* disable all hardware breakpoints */ - reset_dbregs(); - pcb->pcb_flags &= ~PCB_DBREGS; - } } void cpu_thread_exit(struct thread *td) { struct pcb *pcb = td->td_pcb; + #ifdef DEV_NPX if (td == PCPU_GET(fpcurthread)) npxdrop(); -- cgit v1.1