summaryrefslogtreecommitdiffstats
path: root/sys/alpha/include/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/alpha/include/cpu.h')
-rw-r--r--sys/alpha/include/cpu.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/alpha/include/cpu.h b/sys/alpha/include/cpu.h
index b9ff12d..12436a1 100644
--- a/sys/alpha/include/cpu.h
+++ b/sys/alpha/include/cpu.h
@@ -65,11 +65,7 @@ struct clockframe {
#define CLKF_BASEPRI(framep) \
(((framep)->cf_tf.tf_regs[FRAME_PS] & ALPHA_PSL_IPL_MASK) == 0)
#define CLKF_PC(framep) ((framep)->cf_tf.tf_regs[FRAME_PC])
-/*
- * XXX No way to accurately tell if we were in interrupt mode before taking
- * clock interrupt.
- */
-#define CLKF_INTR(framep) (0)
+#define CLKF_INTR(framep) (intr_nesting_level >= 2)
/*
* Preempt the current process if in interrupt from user mode,
@@ -96,6 +92,7 @@ struct clockframe {
#ifdef KERNEL
u_int32_t astpending; /* need to trap before returning to user mode */
+u_int32_t intr_nesting_level; /* bookeeping only; counts software intr */
u_int32_t want_resched; /* resched() was called */
#endif
OpenPOWER on IntegriCloud