machdep.c (90128) | machdep.c (90132) |
---|---|
1/*- 2 * Copyright (c) 1992 Terrence R. Lambert. 3 * Copyright (c) 1982, 1987, 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * 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: @(#)machdep.c 7.4 (Berkeley) 6/3/91 | 1/*- 2 * Copyright (c) 1992 Terrence R. Lambert. 3 * Copyright (c) 1982, 1987, 1990 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * 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: @(#)machdep.c 7.4 (Berkeley) 6/3/91 |
38 * $FreeBSD: head/sys/i386/i386/machdep.c 90128 2002-02-03 04:09:02Z bde $ | 38 * $FreeBSD: head/sys/i386/i386/machdep.c 90132 2002-02-03 09:13:58Z bde $ |
39 */ 40 41#include "opt_atalk.h" 42#include "opt_compat.h" 43#include "opt_cpu.h" 44#include "opt_ddb.h" 45#include "opt_inet.h" 46#include "opt_ipx.h" --- 658 unchanged lines hidden (view full) --- 705int 706sigreturn(td, uap) 707 struct thread *td; 708 struct sigreturn_args /* { 709 ucontext_t *sigcntxp; 710 } */ *uap; 711{ 712 struct proc *p = td->td_proc; | 39 */ 40 41#include "opt_atalk.h" 42#include "opt_compat.h" 43#include "opt_cpu.h" 44#include "opt_ddb.h" 45#include "opt_inet.h" 46#include "opt_ipx.h" --- 658 unchanged lines hidden (view full) --- 705int 706sigreturn(td, uap) 707 struct thread *td; 708 struct sigreturn_args /* { 709 ucontext_t *sigcntxp; 710 } */ *uap; 711{ 712 struct proc *p = td->td_proc; |
713 struct osigcontext *oscp; 714 struct osigreturn_args *ouap; | |
715 struct trapframe *regs; 716 ucontext_t *ucp; 717 int cs, eflags; 718 | 713 struct trapframe *regs; 714 ucontext_t *ucp; 715 int cs, eflags; 716 |
719#ifdef COMPAT_43 720 ouap = (struct osigreturn_args *)uap; 721 oscp = ouap->sigcntxp; 722 if (fuword(&oscp->sc_trapno) == 0x01d516) 723 return (osigreturn(td, ouap)); 724#endif 725 | |
726 ucp = uap->sigcntxp; 727 if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ)) 728 return (EFAULT); 729 regs = td->td_frame; 730 eflags = ucp->uc_mcontext.mc_eflags; 731 if (eflags & PSL_VM) { 732 struct trapframe_vm86 *tf = (struct trapframe_vm86 *)regs; 733 struct vm86_kernel *vm86; --- 1658 unchanged lines hidden --- | 717 ucp = uap->sigcntxp; 718 if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ)) 719 return (EFAULT); 720 regs = td->td_frame; 721 eflags = ucp->uc_mcontext.mc_eflags; 722 if (eflags & PSL_VM) { 723 struct trapframe_vm86 *tf = (struct trapframe_vm86 *)regs; 724 struct vm86_kernel *vm86; --- 1658 unchanged lines hidden --- |