svr4_machdep.c (76166) | svr4_machdep.c (78962) |
---|---|
1/* 2 * Copyright (c) 1998 Mark Newton 3 * Copyright (c) 1994 Christos Zoulas 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/* 2 * Copyright (c) 1998 Mark Newton 3 * Copyright (c) 1994 Christos Zoulas 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/i386/svr4/svr4_machdep.c 76166 2001-05-01 08:13:21Z markm $ | 28 * $FreeBSD: head/sys/i386/svr4/svr4_machdep.c 78962 2001-06-29 11:10:41Z jhb $ |
29 */ 30 31#include <sys/types.h> 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/exec.h> 35#include <sys/filedesc.h> 36#include <sys/lock.h> --- 54 unchanged lines hidden (view full) --- 91 92void 93svr4_getcontext(p, uc, mask, oonstack) 94 struct proc *p; 95 struct svr4_ucontext *uc; 96 sigset_t *mask; 97 int oonstack; 98{ | 29 */ 30 31#include <sys/types.h> 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/exec.h> 35#include <sys/filedesc.h> 36#include <sys/lock.h> --- 54 unchanged lines hidden (view full) --- 91 92void 93svr4_getcontext(p, uc, mask, oonstack) 94 struct proc *p; 95 struct svr4_ucontext *uc; 96 sigset_t *mask; 97 int oonstack; 98{ |
99 struct trapframe *tf = p->p_md.md_regs; | 99 struct trapframe *tf = p->p_frame; |
100 svr4_greg_t *r = uc->uc_mcontext.greg; 101 struct svr4_sigaltstack *s = &uc->uc_stack; 102#if defined(DONE_MORE_SIGALTSTACK_WORK) 103 struct sigacts *psp; 104 struct sigaltstack *sf; 105#endif 106 107 PROC_LOCK(p); --- 106 unchanged lines hidden (view full) --- 214 * set to 0 right now? 215 */ 216 217 if ((uc->uc_flags & SVR4_UC_CPU) == 0) 218 return 0; 219 220 DPRINTF(("svr4_setcontext(%d)\n", p->p_pid)); 221 | 100 svr4_greg_t *r = uc->uc_mcontext.greg; 101 struct svr4_sigaltstack *s = &uc->uc_stack; 102#if defined(DONE_MORE_SIGALTSTACK_WORK) 103 struct sigacts *psp; 104 struct sigaltstack *sf; 105#endif 106 107 PROC_LOCK(p); --- 106 unchanged lines hidden (view full) --- 214 * set to 0 right now? 215 */ 216 217 if ((uc->uc_flags & SVR4_UC_CPU) == 0) 218 return 0; 219 220 DPRINTF(("svr4_setcontext(%d)\n", p->p_pid)); 221 |
222 tf = p->p_md.md_regs; | 222 tf = p->p_frame; |
223 224 /* 225 * Restore register context. 226 */ 227#ifdef VM86 228#warning "VM86 doesn't work yet, please don't try to use it." 229 if (r[SVR4_X86_EFL] & PSL_VM) { 230 tf->tf_vm86_gs = r[SVR4_X86_GS]; --- 185 unchanged lines hidden (view full) --- 416 int oonstack; 417 418#if defined(DEBUG_SVR4) 419 printf("svr4_sendsig(%d)\n", sig); 420#endif 421 PROC_LOCK(p); 422 psp = p->p_sigacts; 423 | 223 224 /* 225 * Restore register context. 226 */ 227#ifdef VM86 228#warning "VM86 doesn't work yet, please don't try to use it." 229 if (r[SVR4_X86_EFL] & PSL_VM) { 230 tf->tf_vm86_gs = r[SVR4_X86_GS]; --- 185 unchanged lines hidden (view full) --- 416 int oonstack; 417 418#if defined(DEBUG_SVR4) 419 printf("svr4_sendsig(%d)\n", sig); 420#endif 421 PROC_LOCK(p); 422 psp = p->p_sigacts; 423 |
424 tf = p->p_md.md_regs; | 424 tf = p->p_frame; |
425 oonstack = sigonstack(tf->tf_esp); 426 427 /* 428 * Allocate space for the signal handler context. 429 */ 430 if ((p->p_flag & P_ALTSTACK) && !oonstack && 431 SIGISMEMBER(psp->ps_sigonstack, sig)) { 432 fp = (struct svr4_sigframe *)(p->p_sigstk.ss_sp + --- 162 unchanged lines hidden --- | 425 oonstack = sigonstack(tf->tf_esp); 426 427 /* 428 * Allocate space for the signal handler context. 429 */ 430 if ((p->p_flag & P_ALTSTACK) && !oonstack && 431 SIGISMEMBER(psp->ps_sigonstack, sig)) { 432 fp = (struct svr4_sigframe *)(p->p_sigstk.ss_sp + --- 162 unchanged lines hidden --- |