diff options
author | jake <jake@FreeBSD.org> | 2002-03-29 16:45:03 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2002-03-29 16:45:03 +0000 |
commit | 855079d5b783ee8e14f5978f9f5d51cbc73bce90 (patch) | |
tree | 61c1a1fffd58e99a539f786a11b33fd43afcfd02 /sys/kern/subr_trap.c | |
parent | 8f9ce8398dc5c2f244495c3d0f279c47f0c2d58d (diff) | |
download | FreeBSD-src-855079d5b783ee8e14f5978f9f5d51cbc73bce90.zip FreeBSD-src-855079d5b783ee8e14f5978f9f5d51cbc73bce90.tar.gz |
Style fixes purposefully left out of last commit. I checked the kse tree
and didn't see any changes that this conflicts with.
Diffstat (limited to 'sys/kern/subr_trap.c')
-rw-r--r-- | sys/kern/subr_trap.c | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 81b4a75..4dcf90c 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -136,55 +136,55 @@ ast(framep) #endif mtx_assert(&Giant, MA_NOTOWNED); prticks = 0; /* XXX: Quiet warning. */ - td->td_frame = framep; - /* - * This updates the p_sflag's for the checks below in one - * "atomic" operation with turning off the astpending flag. - * If another AST is triggered while we are handling the - * AST's saved in sflag, the astpending flag will be set and - * ast() will be called again. - */ - mtx_lock_spin(&sched_lock); - sticks = ke->ke_sticks; - sflag = p->p_sflag; - flags = ke->ke_flags; - p->p_sflag &= ~(PS_PROFPEND | PS_ALRMPEND); - ke->ke_flags &= ~(KEF_OWEUPC | KEF_ASTPENDING); - cnt.v_soft++; - if (flags & KEF_OWEUPC && sflag & PS_PROFIL) { - prticks = p->p_stats->p_prof.pr_ticks; - p->p_stats->p_prof.pr_ticks = 0; - } - mtx_unlock_spin(&sched_lock); + td->td_frame = framep; + /* + * This updates the p_sflag's for the checks below in one + * "atomic" operation with turning off the astpending flag. + * If another AST is triggered while we are handling the + * AST's saved in sflag, the astpending flag will be set and + * ast() will be called again. + */ + mtx_lock_spin(&sched_lock); + sticks = ke->ke_sticks; + sflag = p->p_sflag; + flags = ke->ke_flags; + p->p_sflag &= ~(PS_PROFPEND | PS_ALRMPEND); + ke->ke_flags &= ~(KEF_OWEUPC | KEF_ASTPENDING); + cnt.v_soft++; + if (flags & KEF_OWEUPC && sflag & PS_PROFIL) { + prticks = p->p_stats->p_prof.pr_ticks; + p->p_stats->p_prof.pr_ticks = 0; + } + mtx_unlock_spin(&sched_lock); - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); - if (flags & KEF_OWEUPC && sflag & PS_PROFIL) - addupc_task(ke, p->p_stats->p_prof.pr_addr, prticks); - if (sflag & PS_ALRMPEND) { - PROC_LOCK(p); - psignal(p, SIGVTALRM); - PROC_UNLOCK(p); - } + if (td->td_ucred != p->p_ucred) + cred_update_thread(td); + if (flags & KEF_OWEUPC && sflag & PS_PROFIL) + addupc_task(ke, p->p_stats->p_prof.pr_addr, prticks); + if (sflag & PS_ALRMPEND) { + PROC_LOCK(p); + psignal(p, SIGVTALRM); + PROC_UNLOCK(p); + } #if defined(DEV_NPX) && !defined(SMP) - if (PCPU_GET(curpcb)->pcb_flags & PCB_NPXTRAP) { - atomic_clear_int(&PCPU_GET(curpcb)->pcb_flags, - PCB_NPXTRAP); - ucode = npxtrap(); - if (ucode != -1) { - trapsignal(p, SIGFPE, ucode); - } + if (PCPU_GET(curpcb)->pcb_flags & PCB_NPXTRAP) { + atomic_clear_int(&PCPU_GET(curpcb)->pcb_flags, + PCB_NPXTRAP); + ucode = npxtrap(); + if (ucode != -1) { + trapsignal(p, SIGFPE, ucode); } + } #endif - if (sflag & PS_PROFPEND) { - PROC_LOCK(p); - psignal(p, SIGPROF); - PROC_UNLOCK(p); - } + if (sflag & PS_PROFPEND) { + PROC_LOCK(p); + psignal(p, SIGPROF); + PROC_UNLOCK(p); + } - userret(td, framep, sticks); + userret(td, framep, sticks); #ifdef DIAGNOSTIC - cred_free_thread(td); + cred_free_thread(td); #endif mtx_assert(&Giant, MA_NOTOWNED); } |