
From: Mikael Pettersson <mikpe@csd.uu.se>

- Provide API function for checking for pending interrupts.  Avoids
  direct structure access in higher levels, which is required for ppc32.

Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/include/asm-i386/perfctr.h |    8 ++++++++
 1 files changed, 8 insertions(+)

diff -puN include/asm-i386/perfctr.h~perfctr-x86-driver-cleanup include/asm-i386/perfctr.h
--- 25/include/asm-i386/perfctr.h~perfctr-x86-driver-cleanup	Fri Nov 12 16:17:20 2004
+++ 25-akpm/include/asm-i386/perfctr.h	Fri Nov 12 16:17:20 2004
@@ -182,8 +182,16 @@ typedef void (*perfctr_ihandler_t)(unsig
 extern void perfctr_cpu_set_ihandler(perfctr_ihandler_t);
 extern void perfctr_cpu_ireload(struct perfctr_cpu_state*);
 extern unsigned int perfctr_cpu_identify_overflow(struct perfctr_cpu_state*);
+static inline int perfctr_cpu_has_pending_interrupt(const struct perfctr_cpu_state *state)
+{
+	return state->pending_interrupt;
+}
 #else
 static inline void perfctr_cpu_set_ihandler(perfctr_ihandler_t x) { }
+static inline int perfctr_cpu_has_pending_interrupt(const struct perfctr_cpu_state *state)
+{
+	return 0;
+}
 #endif
 
 #if defined(CONFIG_SMP)
_
