diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2007-04-03 10:14:48 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2007-04-03 10:14:48 +0000 |
commit | 54694685d91ea2b7c9905c9c9951428dacbc0c83 (patch) | |
tree | 6df5060d9519ba7b2621fb41c6c9feacd808a9f8 /sys/arch/i386/include | |
parent | 5580441acd58a8850e70767fc09899dacbd178c8 (diff) |
Make the ast on i386 per-process instead of per-cpu. This makes
signal delivery more reliable in some cases when a process switches
cpu.
kettenis@ ok
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r-- | sys/arch/i386/include/cpu.h | 10 | ||||
-rw-r--r-- | sys/arch/i386/include/intr.h | 3 | ||||
-rw-r--r-- | sys/arch/i386/include/proc.h | 3 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h index faebea52539..de3390846aa 100644 --- a/sys/arch/i386/include/cpu.h +++ b/sys/arch/i386/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.89 2007/03/19 09:29:33 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.90 2007/04/03 10:14:47 art Exp $ */ /* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */ /*- @@ -124,7 +124,6 @@ struct cpu_info { void (*cpu_setup)(struct cpu_info *); /* proc-dependant init */ int ci_want_resched; - int ci_astpending; union descriptor *ci_gdt; union descriptor *ci_ldt; /* per-cpu default LDT */ @@ -202,7 +201,6 @@ extern void cpu_init_idle_pcbs(void); #define curpcb curcpu()->ci_curpcb #define want_resched (curcpu()->ci_want_resched) -#define astpending (curcpu()->ci_astpending) /* * Preempt the current process if in interrupt from user mode, @@ -219,18 +217,20 @@ extern void need_resched(struct cpu_info *); */ #define PROC_PC(p) ((p)->p_md.md_regs->tf_eip) +#define aston(p) ((p)->p_md.md_astpending = 1) + /* * Give a profiling tick to the current process when the user profiling * buffer pages are invalid. On the i386, request an ast to send us * through trap(), marking the proc as needing a profiling tick. */ -#define need_proftick(p) setsoftast() +#define need_proftick(p) aston(p) /* * Notify the current process (p) that it has a signal pending, * process as soon as possible. */ -#define signotify(p) setsoftast() +#define signotify(p) aston(p) /* * We need a machine-independent name for this. diff --git a/sys/arch/i386/include/intr.h b/sys/arch/i386/include/intr.h index a78cfcb116f..63f1e93bbc0 100644 --- a/sys/arch/i386/include/intr.h +++ b/sys/arch/i386/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.28 2007/03/23 16:03:52 art Exp $ */ +/* $OpenBSD: intr.h,v 1.29 2007/04/03 10:14:47 art Exp $ */ /* $NetBSD: intr.h,v 1.5 1996/05/13 06:11:28 mycroft Exp $ */ /* @@ -129,7 +129,6 @@ void splassert_check(int, const char *); #define spllock() splhigh() #define spl0() spllower(IPL_NONE) -#define setsoftast() (astpending = 1) #define setsoftclock() softintr(1 << SIR_CLOCK, IPL_SOFTCLOCK) #define setsoftnet() softintr(1 << SIR_NET, IPL_SOFTNET) #define setsofttty() softintr(1 << SIR_TTY, IPL_SOFTTTY) diff --git a/sys/arch/i386/include/proc.h b/sys/arch/i386/include/proc.h index e5393cd22e4..8027e2f3e27 100644 --- a/sys/arch/i386/include/proc.h +++ b/sys/arch/i386/include/proc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.h,v 1.4 2004/06/13 21:49:16 niklas Exp $ */ +/* $OpenBSD: proc.h,v 1.5 2007/04/03 10:14:47 art Exp $ */ /* $NetBSD: proc.h,v 1.10 1995/08/06 05:33:23 mycroft Exp $ */ /* @@ -39,6 +39,7 @@ struct mdproc { struct trapframe *md_regs; /* registers on current frame */ int md_flags; /* machine-dependent flags */ int md_tss_sel; /* TSS selector */ + int md_astpending; }; /* md_flags */ |