Merge remote-tracking branch 'remotes/bsdimp/tags/pull-bsd-user-20211018-pull-request...
[qemu.git] / include / hw / intc / intc.h
1 #ifndef INTC_H
2 #define INTC_H
3
4 #include "qom/object.h"
5
6 #define TYPE_INTERRUPT_STATS_PROVIDER "intctrl"
7
8 typedef struct InterruptStatsProviderClass InterruptStatsProviderClass;
9 DECLARE_CLASS_CHECKERS(InterruptStatsProviderClass, INTERRUPT_STATS_PROVIDER,
10 TYPE_INTERRUPT_STATS_PROVIDER)
11 #define INTERRUPT_STATS_PROVIDER(obj) \
12 INTERFACE_CHECK(InterruptStatsProvider, (obj), \
13 TYPE_INTERRUPT_STATS_PROVIDER)
14
15 typedef struct InterruptStatsProvider InterruptStatsProvider;
16
17 struct InterruptStatsProviderClass {
18 InterfaceClass parent;
19
20 /* The returned pointer and statistics must remain valid until
21 * the BQL is next dropped.
22 */
23 bool (*get_statistics)(InterruptStatsProvider *obj, uint64_t **irq_counts,
24 unsigned int *nb_irqs);
25 void (*print_info)(InterruptStatsProvider *obj, Monitor *mon);
26 };
27
28 #endif