subr_syscall.c (11343) | subr_syscall.c (11872) |
---|---|
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 * $Id: trap.c,v 1.60 1995/10/04 07:07:44 julian Exp $ | 38 * $Id: trap.c,v 1.61 1995/10/09 04:36:01 bde Exp $ |
39 */ 40 41/* 42 * 386 Trap and System call handling 43 */ 44 45#include <sys/param.h> 46#include <sys/systm.h> --- 129 unchanged lines hidden (view full) --- 176 177void 178trap(frame) 179 struct trapframe frame; 180{ 181 struct proc *p = curproc; 182 u_quad_t sticks = 0; 183 int i = 0, ucode = 0, type, code; | 39 */ 40 41/* 42 * 386 Trap and System call handling 43 */ 44 45#include <sys/param.h> 46#include <sys/systm.h> --- 129 unchanged lines hidden (view full) --- 176 177void 178trap(frame) 179 struct trapframe frame; 180{ 181 struct proc *p = curproc; 182 u_quad_t sticks = 0; 183 int i = 0, ucode = 0, type, code; |
184#ifdef DIAGNOSTIC | 184#ifdef DEBUG |
185 u_long eva; 186#endif 187 188 type = frame.tf_trapno; 189 code = frame.tf_err; 190 191 if (ISPL(frame.tf_cs) == SEL_UPL) { 192 /* user trap */ --- 411 unchanged lines hidden (view full) --- 604 605 if (frame->tf_err & PGEX_W) 606 ftype = VM_PROT_READ | VM_PROT_WRITE; 607 else 608 ftype = VM_PROT_READ; 609 610 if (map != kernel_map) { 611 vm_offset_t v; | 185 u_long eva; 186#endif 187 188 type = frame.tf_trapno; 189 code = frame.tf_err; 190 191 if (ISPL(frame.tf_cs) == SEL_UPL) { 192 /* user trap */ --- 411 unchanged lines hidden (view full) --- 604 605 if (frame->tf_err & PGEX_W) 606 ftype = VM_PROT_READ | VM_PROT_WRITE; 607 else 608 ftype = VM_PROT_READ; 609 610 if (map != kernel_map) { 611 vm_offset_t v; |
612 vm_page_t ptepg; | |
613 614 /* 615 * Keep swapout from messing with us during this 616 * critical time. 617 */ 618 ++p->p_lock; 619 620 /* --- 305 unchanged lines hidden (view full) --- 926#endif 927} 928 929#ifdef COMPAT_LINUX 930void 931linux_syscall(frame) 932 struct trapframe frame; 933{ | 612 613 /* 614 * Keep swapout from messing with us during this 615 * critical time. 616 */ 617 ++p->p_lock; 618 619 /* --- 305 unchanged lines hidden (view full) --- 925#endif 926} 927 928#ifdef COMPAT_LINUX 929void 930linux_syscall(frame) 931 struct trapframe frame; 932{ |
934 int i; | |
935 struct proc *p = curproc; 936 struct sysent *callp; 937 u_quad_t sticks; 938 int error; 939 int rval[2]; 940 u_int code; 941 struct linux_syscall_args { 942 int arg1; --- 81 unchanged lines hidden --- | 933 struct proc *p = curproc; 934 struct sysent *callp; 935 u_quad_t sticks; 936 int error; 937 int rval[2]; 938 u_int code; 939 struct linux_syscall_args { 940 int arg1; --- 81 unchanged lines hidden --- |