diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-05-01 08:25:33 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-05-01 08:25:33 +0000 |
commit | a97b2b7bde244fd3f4eb544a004755e242e64f0f (patch) | |
tree | 4ba472595f2dd4c973876e81f279aa7664ca2c52 /sys/arch/powerpc | |
parent | 0b4c8887958a97173d0c54954daf289589bd6fcf (diff) |
Implement a nop IPI to signal other CPUs.
ok drahn@
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r-- | sys/arch/powerpc/include/cpu.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h index 49a41660224..500208b47db 100644 --- a/sys/arch/powerpc/include/cpu.h +++ b/sys/arch/powerpc/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.35 2008/04/29 04:08:25 drahn Exp $ */ +/* $OpenBSD: cpu.h,v 1.36 2008/05/01 08:25:32 kettenis Exp $ */ /* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */ /* @@ -137,10 +137,22 @@ extern struct cpu_info cpu_info[PPC_MAXPROCS]; void delay(unsigned); #define DELAY(n) delay(n) -#define need_resched(ci) (ci->ci_want_resched = 1, \ - ci->ci_curproc->p_md.md_astpending = 1) -#define need_proftick(p) do { p->p_md.md_astpending = 1; } while (0) -#define signotify(p) (p->p_md.md_astpending = 1) +#define aston(p) ((p)->p_md.md_astpending = 1) + +/* + * Preempt the current process if in interrupt from user mode, + * or after the current trap/syscall if in system mode. + */ +#define need_resched(ci) \ +do { \ + ci->ci_want_resched = 1; \ + if (ci->ci_curproc != NULL) \ + aston(ci->ci_curproc); \ +} while (0) + +#define need_proftick(p) aston(p) + +void signotify(struct proc *); extern char *bootpath; |