1 #ifndef INTC_H 2 #define INTC_H 3 4 #include "qom/object.h" 5 6 #define TYPE_INTERRUPT_STATS_PROVIDER "intctrl" 7 8 #define INTERRUPT_STATS_PROVIDER_CLASS(klass) \ 9 OBJECT_CLASS_CHECK(InterruptStatsProviderClass, (klass), \ 10 TYPE_INTERRUPT_STATS_PROVIDER) 11 #define INTERRUPT_STATS_PROVIDER_GET_CLASS(obj) \ 12 OBJECT_GET_CLASS(InterruptStatsProviderClass, (obj), \ 13 TYPE_INTERRUPT_STATS_PROVIDER) 14 #define INTERRUPT_STATS_PROVIDER(obj) \ 15 INTERFACE_CHECK(InterruptStatsProvider, (obj), \ 16 TYPE_INTERRUPT_STATS_PROVIDER) 17 18 typedef struct InterruptStatsProvider { 19 Object parent; 20 } InterruptStatsProvider; 21 22 typedef struct InterruptStatsProviderClass { 23 InterfaceClass parent; 24 25 /* The returned pointer and statistics must remain valid until 26 * the BQL is next dropped. 27 */ 28 bool (*get_statistics)(InterruptStatsProvider *obj, uint64_t **irq_counts, 29 unsigned int *nb_irqs); 30 void (*print_info)(InterruptStatsProvider *obj, Monitor *mon); 31 } InterruptStatsProviderClass; 32 33 #endif 34