2016-09-26 23:23:23 +03:00
|
|
|
#ifndef INTC_H
|
|
|
|
#define INTC_H
|
|
|
|
|
|
|
|
#include "qom/object.h"
|
|
|
|
|
|
|
|
#define TYPE_INTERRUPT_STATS_PROVIDER "intctrl"
|
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
typedef struct InterruptStatsProviderClass InterruptStatsProviderClass;
|
2020-09-01 00:07:33 +03:00
|
|
|
DECLARE_CLASS_CHECKERS(InterruptStatsProviderClass, INTERRUPT_STATS_PROVIDER,
|
2016-09-26 23:23:23 +03:00
|
|
|
TYPE_INTERRUPT_STATS_PROVIDER)
|
|
|
|
#define INTERRUPT_STATS_PROVIDER(obj) \
|
|
|
|
INTERFACE_CHECK(InterruptStatsProvider, (obj), \
|
|
|
|
TYPE_INTERRUPT_STATS_PROVIDER)
|
|
|
|
|
2018-12-04 17:20:06 +03:00
|
|
|
typedef struct InterruptStatsProvider InterruptStatsProvider;
|
2016-09-26 23:23:23 +03:00
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
struct InterruptStatsProviderClass {
|
2016-09-26 23:23:23 +03:00
|
|
|
InterfaceClass parent;
|
|
|
|
|
|
|
|
/* The returned pointer and statistics must remain valid until
|
|
|
|
* the BQL is next dropped.
|
|
|
|
*/
|
|
|
|
bool (*get_statistics)(InterruptStatsProvider *obj, uint64_t **irq_counts,
|
|
|
|
unsigned int *nb_irqs);
|
|
|
|
void (*print_info)(InterruptStatsProvider *obj, Monitor *mon);
|
2020-09-03 23:43:22 +03:00
|
|
|
};
|
2016-09-26 23:23:23 +03:00
|
|
|
|
|
|
|
#endif
|