4 #include "qom/object.h"
6 #define TYPE_INTERRUPT_STATS_PROVIDER "intctrl"
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)
18 typedef struct InterruptStatsProvider
{
20 } InterruptStatsProvider
;
22 typedef struct InterruptStatsProviderClass
{
23 InterfaceClass parent
;
25 /* The returned pointer and statistics must remain valid until
26 * the BQL is next dropped.
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
;