diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c index e5975e2de4a..ca31103e919 100644 --- a/sys/alpha/alpha/trap.c +++ b/sys/alpha/alpha/trap.c @@ -298,13 +298,6 @@ trap(a0, a1, a2, entry, framep) td->td_frame = framep; if (td->td_ucred != p->p_ucred) cred_update_thread(td); - PROC_LOCK(p); - if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) { - mtx_lock_spin(&sched_lock); - thread_exit(); - /* NOTREACHED */ - } - PROC_UNLOCK(p); } else { sticks = 0; /* XXX bogus -Wuninitialized warning */ KASSERT(cold || td->td_ucred != NULL, diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index c0784fa1497..4b4cb81a83f 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -268,18 +268,6 @@ trap(frame) if (td->td_ucred != p->p_ucred) cred_update_thread(td); - /* - * First check that we shouldn't just abort. - * But check if we are the single thread first! - */ - PROC_LOCK(p); - if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) { - mtx_lock_spin(&sched_lock); - thread_exit(); - /* NOTREACHED */ - } - PROC_UNLOCK(p); - switch (type) { case T_PRIVINFLT: /* privileged instruction fault */ ucode = type; diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index c0784fa1497..4b4cb81a83f 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -268,18 +268,6 @@ trap(frame) if (td->td_ucred != p->p_ucred) cred_update_thread(td); - /* - * First check that we shouldn't just abort. - * But check if we are the single thread first! - */ - PROC_LOCK(p); - if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) { - mtx_lock_spin(&sched_lock); - thread_exit(); - /* NOTREACHED */ - } - PROC_UNLOCK(p); - switch (type) { case T_PRIVINFLT: /* privileged instruction fault */ ucode = type; diff --git a/sys/ia64/ia64/trap.c b/sys/ia64/ia64/trap.c index 0e86100574b..b2c8d26fcd5 100644 --- a/sys/ia64/ia64/trap.c +++ b/sys/ia64/ia64/trap.c @@ -334,13 +334,6 @@ trap(int vector, int imm, struct trapframe *framep) td->td_frame = framep; if (td->td_ucred != p->p_ucred) cred_update_thread(td); - PROC_LOCK(p); - if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) { - mtx_lock_spin(&sched_lock); - thread_exit(); - /* NOTREACHED */ - } - PROC_UNLOCK(p); } else { sticks = 0; /* XXX bogus -Wuninitialized warning */ KASSERT(cold || td->td_ucred != NULL, diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c index 2df2c58ffd8..c64eb6526eb 100644 --- a/sys/sparc64/sparc64/trap.c +++ b/sys/sparc64/sparc64/trap.c @@ -245,13 +245,6 @@ trap(struct trapframe *tf) td->td_frame = tf; if (td->td_ucred != p->p_ucred) cred_update_thread(td); - PROC_LOCK(p); - if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) { - mtx_lock_spin(&sched_lock); - thread_exit(); - /* NOTREACHED */ - } - PROC_UNLOCK(p); switch (tf->tf_type) { case T_DATA_MISS: