summaryrefslogtreecommitdiff
path: root/sys/arch/hp300
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1999-01-10 13:34:21 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1999-01-10 13:34:21 +0000
commit771be10e033278ba3fe87b2fad592c9852b3e663 (patch)
tree0a6d3d603627743134eb50aae080763e88c0d49d /sys/arch/hp300
parenta0a5a476bb860c6ea968db2071b67dd7d860bec2 (diff)
Generalize cpu_set_kpc to take any kind of arg; mostly from NetBSD
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r--sys/arch/hp300/hp300/vm_machdep.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/arch/hp300/hp300/vm_machdep.c b/sys/arch/hp300/hp300/vm_machdep.c
index bb54c8c3215..c9eeb9ab78f 100644
--- a/sys/arch/hp300/hp300/vm_machdep.c
+++ b/sys/arch/hp300/hp300/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.11 1998/07/28 00:13:34 millert Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.12 1999/01/10 13:34:17 niklas Exp $ */
/* $NetBSD: vm_machdep.c,v 1.37 1997/05/26 00:27:43 thorpej Exp $ */
/*
@@ -90,7 +90,7 @@ cpu_fork(p1, p2)
/*
* Copy the trap frame, and arrange for the child to return directly
- * through return_to_user().
+ * through return_to_user(). Note the inline cpu_set_kpc().
*/
tf = (struct trapframe *)((u_int)p2->p_addr + USPACE) - 1;
p2->p_md.md_regs = (int *)tf;
@@ -103,12 +103,13 @@ cpu_fork(p1, p2)
}
void
-cpu_set_kpc(p, pc)
+cpu_set_kpc(p, pc, arg)
struct proc *p;
- void (*pc) __P((struct proc *));
+ void (*pc) __P((void *));
+ void *arg;
{
-
- p->p_addr->u_pcb.pcb_regs[6] = (int) pc; /* A2 */
+ p->p_addr->u_pcb.pcb_regs[6] = (int)pc; /* A2 */
+ p->p_addr->u_pcb.pcb_regs[7] = (int)arg; /* A3 */
}
/*