subr_trap.c (78946) | subr_trap.c (78962) |
---|---|
1/*- 2 * Copyright (C) 1994, David Greenman 3 * Copyright (c) 1990, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the University of Utah, and William Jolitz. 8 * --- 21 unchanged lines hidden (view full) --- 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 | 1/*- 2 * Copyright (C) 1994, David Greenman 3 * Copyright (c) 1990, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the University of Utah, and William Jolitz. 8 * --- 21 unchanged lines hidden (view full) --- 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 |
38 * $FreeBSD: head/sys/kern/subr_trap.c 78946 2001-06-29 04:18:10Z jhb $ | 38 * $FreeBSD: head/sys/kern/subr_trap.c 78962 2001-06-29 11:10:41Z jhb $ |
39 */ 40 41/* 42 * 386 Trap and System call handling 43 */ 44 45#include "opt_clock.h" 46#include "opt_cpu.h" --- 225 unchanged lines hidden (view full) --- 272 273 if ((ISPL(frame.tf_cs) == SEL_UPL) || 274 ((frame.tf_eflags & PSL_VM) && !in_vm86call)) { 275 /* user trap */ 276 277 mtx_lock_spin(&sched_lock); 278 sticks = p->p_sticks; 279 mtx_unlock_spin(&sched_lock); | 39 */ 40 41/* 42 * 386 Trap and System call handling 43 */ 44 45#include "opt_clock.h" 46#include "opt_cpu.h" --- 225 unchanged lines hidden (view full) --- 272 273 if ((ISPL(frame.tf_cs) == SEL_UPL) || 274 ((frame.tf_eflags & PSL_VM) && !in_vm86call)) { 275 /* user trap */ 276 277 mtx_lock_spin(&sched_lock); 278 sticks = p->p_sticks; 279 mtx_unlock_spin(&sched_lock); |
280 p->p_md.md_regs = &frame; | 280 p->p_frame = &frame; |
281 282 switch (type) { 283 case T_PRIVINFLT: /* privileged instruction fault */ 284 ucode = type; 285 i = SIGILL; 286 break; 287 288 case T_BPTFLT: /* bpt instruction fault */ --- 801 unchanged lines hidden (view full) --- 1090 /* NOT REACHED */ 1091 } 1092#endif 1093 1094 mtx_lock_spin(&sched_lock); 1095 sticks = p->p_sticks; 1096 mtx_unlock_spin(&sched_lock); 1097 | 281 282 switch (type) { 283 case T_PRIVINFLT: /* privileged instruction fault */ 284 ucode = type; 285 i = SIGILL; 286 break; 287 288 case T_BPTFLT: /* bpt instruction fault */ --- 801 unchanged lines hidden (view full) --- 1090 /* NOT REACHED */ 1091 } 1092#endif 1093 1094 mtx_lock_spin(&sched_lock); 1095 sticks = p->p_sticks; 1096 mtx_unlock_spin(&sched_lock); 1097 |
1098 p->p_md.md_regs = &frame; | 1098 p->p_frame = &frame; |
1099 params = (caddr_t)frame.tf_esp + sizeof(int); 1100 code = frame.tf_eax; 1101 1102 if (p->p_sysent->sv_prepsyscall) { 1103 /* 1104 * The prep code is not MP aware. 1105 */ 1106 mtx_lock(&Giant); --- 167 unchanged lines hidden (view full) --- 1274 */ 1275 mtx_lock_spin(&sched_lock); 1276 if (!(astpending(p) || resched_wanted(p))) { 1277 mtx_unlock_spin(&sched_lock); 1278 return; 1279 } 1280 1281 sticks = p->p_sticks; | 1099 params = (caddr_t)frame.tf_esp + sizeof(int); 1100 code = frame.tf_eax; 1101 1102 if (p->p_sysent->sv_prepsyscall) { 1103 /* 1104 * The prep code is not MP aware. 1105 */ 1106 mtx_lock(&Giant); --- 167 unchanged lines hidden (view full) --- 1274 */ 1275 mtx_lock_spin(&sched_lock); 1276 if (!(astpending(p) || resched_wanted(p))) { 1277 mtx_unlock_spin(&sched_lock); 1278 return; 1279 } 1280 1281 sticks = p->p_sticks; |
1282 p->p_md.md_regs = framep; | 1282 p->p_frame = framep; |
1283 1284 astoff(p); 1285 cnt.v_soft++; 1286 mtx_intr_enable(&sched_lock); 1287 if (p->p_sflag & PS_OWEUPC) { 1288 p->p_sflag &= ~PS_OWEUPC; 1289 mtx_unlock_spin(&sched_lock); 1290 mtx_lock(&Giant); --- 39 unchanged lines hidden --- | 1283 1284 astoff(p); 1285 cnt.v_soft++; 1286 mtx_intr_enable(&sched_lock); 1287 if (p->p_sflag & PS_OWEUPC) { 1288 p->p_sflag &= ~PS_OWEUPC; 1289 mtx_unlock_spin(&sched_lock); 1290 mtx_lock(&Giant); --- 39 unchanged lines hidden --- |