Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nathanw_sa]: src/sys/arch/m68k LWPify.
details: https://anonhg.NetBSD.org/src/rev/48f2fc56eed4
branches: nathanw_sa
changeset: 506091:48f2fc56eed4
user: gmcgarry <gmcgarry%NetBSD.org@localhost>
date: Fri Aug 02 08:39:02 2002 +0000
description:
LWPify.
diffstat:
sys/arch/m68k/include/proc.h | 6 +++---
sys/arch/m68k/m68k/linux_syscall.c | 20 +++++++++++---------
sys/arch/m68k/m68k/m68k_syscall.c | 14 +++++++-------
sys/arch/m68k/m68k/sig_machdep.c | 4 ++--
sys/arch/m68k/m68k/sunos_syscall.c | 38 ++++++++++++++++++++------------------
5 files changed, 43 insertions(+), 39 deletions(-)
diffs (283 lines):
diff -r 6ce03e4774c2 -r 48f2fc56eed4 sys/arch/m68k/include/proc.h
--- a/sys/arch/m68k/include/proc.h Fri Aug 02 00:30:39 2002 +0000
+++ b/sys/arch/m68k/include/proc.h Fri Aug 02 08:39:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: proc.h,v 1.2.4.2 2002/08/01 02:42:15 nathanw Exp $ */
+/* $NetBSD: proc.h,v 1.2.4.3 2002/08/02 08:39:02 gmcgarry Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -60,8 +60,8 @@
* Machine-dependent part of the proc structure for m68k-based ports.
*/
struct mdproc {
- int md_flags; /* machine-dependent flags */
- void (*md_syscall)(register_t, struct proc *, struct frame *);
+ int mdp_flags; /* machine-dependent flags */
+ void (*md_syscall)(register_t, struct lwp *, struct frame *);
};
/*
diff -r 6ce03e4774c2 -r 48f2fc56eed4 sys/arch/m68k/m68k/linux_syscall.c
--- a/sys/arch/m68k/m68k/linux_syscall.c Fri Aug 02 00:30:39 2002 +0000
+++ b/sys/arch/m68k/m68k/linux_syscall.c Fri Aug 02 08:39:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscall.c,v 1.1.4.2 2002/08/01 02:42:17 nathanw Exp $ */
+/* $NetBSD: linux_syscall.c,v 1.1.4.3 2002/08/02 08:39:03 gmcgarry Exp $ */
/*-
* Portions Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -102,8 +102,8 @@
#include <uvm/uvm_extern.h>
void linux_syscall_intern(struct proc *);
-static void linux_syscall_plain(register_t, struct proc *, struct frame *);
-static void linux_syscall_fancy(register_t, struct proc *, struct frame *);
+static void linux_syscall_plain(register_t, struct lwp *, struct frame *);
+static void linux_syscall_fancy(register_t, struct lwp *, struct frame *);
void
linux_syscall_intern(struct proc *p)
@@ -123,8 +123,9 @@
}
static void
-linux_syscall_plain(register_t code, struct proc *p, struct frame *frame)
+linux_syscall_plain(register_t code, struct lwp *l, struct frame *frame)
{
+ struct proc *p = l->l_proc;
caddr_t params;
const struct sysent *callp;
int error, nsys;
@@ -170,7 +171,7 @@
rval[0] = 0;
rval[1] = frame->f_regs[D1];
- error = (*callp->sy_call)(p, args, rval);
+ error = (*callp->sy_call)(l, args, rval);
switch (error) {
case 0:
@@ -207,8 +208,9 @@
}
static void
-linux_syscall_fancy(register_t code, struct proc *p, struct frame *frame)
+linux_syscall_fancy(register_t code, struct lwp *l, struct frame *frame)
{
+ struct proc *p = l->l_proc;
caddr_t params;
const struct sysent *callp;
int error, nsys;
@@ -248,12 +250,12 @@
break;
}
- if ((error = trace_enter(p, code, args, rval)) != 0)
+ if ((error = trace_enter(l, code, args, rval)) != 0)
goto bad;
rval[0] = 0;
rval[1] = frame->f_regs[D1];
- error = (*callp->sy_call)(p, args, rval);
+ error = (*callp->sy_call)(l, args, rval);
switch (error) {
case 0:
@@ -285,5 +287,5 @@
break;
}
- trace_exit(p, code, args, rval, error);
+ trace_exit(l, code, args, rval, error);
}
diff -r 6ce03e4774c2 -r 48f2fc56eed4 sys/arch/m68k/m68k/m68k_syscall.c
--- a/sys/arch/m68k/m68k/m68k_syscall.c Fri Aug 02 00:30:39 2002 +0000
+++ b/sys/arch/m68k/m68k/m68k_syscall.c Fri Aug 02 08:39:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: m68k_syscall.c,v 1.1.10.7 2002/08/01 02:42:17 nathanw Exp $ */
+/* $NetBSD: m68k_syscall.c,v 1.1.10.8 2002/08/02 08:39:03 gmcgarry Exp $ */
/*-
* Portions Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -116,9 +116,9 @@
#ifdef COMPAT_AOUT_M68K
void aoutm68k_syscall_intern(struct proc *);
#endif
-static void syscall_plain(register_t, struct proc *, struct frame *);
+static void syscall_plain(register_t, struct lwp *, struct frame *);
#if defined(KTRACE) || defined(SYSTRACE)
-static void syscall_fancy(register_t, struct proc *, struct frame *);
+static void syscall_fancy(register_t, struct lwp *, struct frame *);
#endif
@@ -248,7 +248,7 @@
}
#ifdef SYSCALL_DEBUG
- scdebug_call(p, code, args);
+ scdebug_call(l, code, args);
#endif
rval[0] = 0;
@@ -372,7 +372,7 @@
goto bad;
rval[0] = 0;
- rval[1] = frame.f_regs[D1];
+ rval[1] = frame->f_regs[D1];
error = (*callp->sy_call)(l, args, rval);
switch (error) {
@@ -383,8 +383,8 @@
*/
l = curlwp;
p = l->l_proc;
- frame.f_regs[D0] = rval[0];
- frame.f_regs[D1] = rval[1];
+ frame->f_regs[D0] = rval[0];
+ frame->f_regs[D1] = rval[1];
frame->f_sr &= ~PSL_C; /* carry bit */
#ifdef COMPAT_AOUT_M68K
{
diff -r 6ce03e4774c2 -r 48f2fc56eed4 sys/arch/m68k/m68k/sig_machdep.c
--- a/sys/arch/m68k/m68k/sig_machdep.c Fri Aug 02 00:30:39 2002 +0000
+++ b/sys/arch/m68k/m68k/sig_machdep.c Fri Aug 02 08:39:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sig_machdep.c,v 1.15.6.16 2002/08/01 02:42:17 nathanw Exp $ */
+/* $NetBSD: sig_machdep.c,v 1.15.6.17 2002/08/02 08:39:03 gmcgarry Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -154,7 +154,7 @@
default:
/* Don't know what trampoline version; kill it. */
- sigexit(p, SIGILL);
+ sigexit(l, SIGILL);
}
kf.sf_signum = sig;
diff -r 6ce03e4774c2 -r 48f2fc56eed4 sys/arch/m68k/m68k/sunos_syscall.c
--- a/sys/arch/m68k/m68k/sunos_syscall.c Fri Aug 02 00:30:39 2002 +0000
+++ b/sys/arch/m68k/m68k/sunos_syscall.c Fri Aug 02 08:39:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunos_syscall.c,v 1.1.4.2 2002/08/01 02:42:18 nathanw Exp $ */
+/* $NetBSD: sunos_syscall.c,v 1.1.4.3 2002/08/02 08:39:03 gmcgarry Exp $ */
/*-
* Portions Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -105,8 +105,8 @@
#include <compat/sunos/sunos_exec.h>
void sunos_syscall_intern(struct proc *);
-static void sunos_syscall_plain(register_t, struct proc *, struct frame *);
-static void sunos_syscall_fancy(register_t, struct proc *, struct frame *);
+static void sunos_syscall_plain(register_t, struct lwp *, struct frame *);
+static void sunos_syscall_fancy(register_t, struct lwp *, struct frame *);
void
sunos_syscall_intern(struct proc *p)
@@ -126,8 +126,9 @@
}
static void
-sunos_syscall_plain(register_t code, struct proc *p, struct frame *frame)
+sunos_syscall_plain(register_t code, struct lwp *l, struct frame *frame)
{
+ struct proc *p = l->l_proc;
caddr_t params;
const struct sysent *callp;
int error, nsys;
@@ -159,9 +160,9 @@
* might have to undo this if the system call
* returns ERESTART.
*/
- p->p_md.md_flags |= MDP_STACKADJ;
+ l->l_md.md_flags |= MDL_STACKADJ;
} else
- p->p_md.md_flags &= ~MDP_STACKADJ;
+ l->l_md.md_flags &= ~MDL_STACKADJ;
params = (caddr_t)frame->f_regs[SP] + sizeof(int);
@@ -190,12 +191,12 @@
}
#ifdef SYSCALL_DEBUG
- scdebug_call(p, code, args);
+ scdebug_call(l, code, args);
#endif
rval[0] = 0;
rval[1] = frame->f_regs[D1];
- error = (*callp->sy_call)(p, args, rval);
+ error = (*callp->sy_call)(l, args, rval);
switch (error) {
case 0:
@@ -226,8 +227,8 @@
}
/* need new p-value for this */
- if (p->p_md.md_flags & MDP_STACKADJ) {
- p->p_md.md_flags &= ~MDP_STACKADJ;
+ if (l->l_md.md_flags & MDL_STACKADJ) {
+ l->l_md.md_flags &= ~MDL_STACKADJ;
if (error == ERESTART)
frame->f_regs[SP] -= sizeof (int);
}
@@ -238,8 +239,9 @@
}
static void
-sunos_syscall_fancy(register_t code, struct proc *p, struct frame *frame)
+sunos_syscall_fancy(register_t code, struct lwp *l, struct frame *frame)
{
+ struct proc *p = l->l_proc;
caddr_t params;
const struct sysent *callp;
int error, nsys;
@@ -271,9 +273,9 @@
* might have to undo this if the system call
* returns ERESTART.
*/
- p->p_md.md_flags |= MDP_STACKADJ;
+ l->l_md.md_flags |= MDL_STACKADJ;
} else
- p->p_md.md_flags &= ~MDP_STACKADJ;
+ l->l_md.md_flags &= ~MDL_STACKADJ;
params = (caddr_t)frame->f_regs[SP] + sizeof(int);
@@ -301,12 +303,12 @@
goto bad;
}
- if ((error = trace_enter(p, code, args, rval)) != 0)
+ if ((error = trace_enter(l, code, args, rval)) != 0)
goto bad;
rval[0] = 0;
rval[1] = frame->f_regs[D1];
- error = (*callp->sy_call)(p, args, rval);
+ error = (*callp->sy_call)(l, args, rval);
switch (error) {
case 0:
@@ -337,11 +339,11 @@
}
/* need new p-value for this */
- if (p->p_md.md_flags & MDP_STACKADJ) {
- p->p_md.md_flags &= ~MDP_STACKADJ;
+ if (l->l_md.md_flags & MDL_STACKADJ) {
+ l->l_md.md_flags &= ~MDL_STACKADJ;
if (error == ERESTART)
frame->f_regs[SP] -= sizeof (int);
}
- trace_exit(p, code, args, rval, error);
+ trace_exit(l, code, args, rval, error);
}
Home |
Main Index |
Thread Index |
Old Index