diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-01-10 13:34:21 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-01-10 13:34:21 +0000 |
commit | 771be10e033278ba3fe87b2fad592c9852b3e663 (patch) | |
tree | 0a6d3d603627743134eb50aae080763e88c0d49d /sys/arch/atari | |
parent | a0a5a476bb860c6ea968db2071b67dd7d860bec2 (diff) |
Generalize cpu_set_kpc to take any kind of arg; mostly from NetBSD
Diffstat (limited to 'sys/arch/atari')
-rw-r--r-- | sys/arch/atari/atari/vm_machdep.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/atari/atari/vm_machdep.c b/sys/arch/atari/atari/vm_machdep.c index c5742798609..8799926f17d 100644 --- a/sys/arch/atari/atari/vm_machdep.c +++ b/sys/arch/atari/atari/vm_machdep.c @@ -86,7 +86,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; @@ -109,9 +109,10 @@ cpu_fork(p1, p2) * should be invoked, to return to user mode. */ void -cpu_set_kpc(p, pc) +cpu_set_kpc(p, pc, arg) struct proc *p; - u_int32_t pc; + void (*pc) __P((void *)); + void *arg; { struct pcb *pcbp; struct switchframe *sf; @@ -120,8 +121,8 @@ cpu_set_kpc(p, pc) pcbp = &p->p_addr->u_pcb; sf = (struct switchframe *)pcbp->pcb_regs[11]; sf->sf_pc = (u_int)proc_trampoline; - pcbp->pcb_regs[6] = pc; /* A2 */ - pcbp->pcb_regs[7] = (int)p; /* A3 */ + pcbp->pcb_regs[6] = (int)pc; /* A2 */ + pcbp->pcb_regs[7] = (int)arg; /* A3 */ } /* |