subr_trap.c (92809bc001e064f282f84d2a4b18a6ff131ac192) | subr_trap.c (6be523bca7a9ffdeef7141602017ab1b2f833a52) |
---|---|
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 * --- 263 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); | 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 * --- 263 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 --- |