irq.h 826 B

123456789101112131415161718192021222324252627282930
  1. #ifndef _irq_h
  2. #define _irq_h
  3. #include "cpumask.h"
  4. struct irq_s {
  5. unsigned int irq;
  6. char *type; /* IRQ type from /proc/interrupts like PCI-MSI-edge */
  7. char *desc; /* IRQ text description - device list */
  8. int refresh; /* Refresh flag. It !=0 if irq was found while populate */
  9. cpumask_t local_cpus;
  10. unsigned long long intr;
  11. unsigned long long old_intr;
  12. };
  13. typedef struct irq_s irq_t;
  14. #define SYSFS_PCI_PATH "/sys/bus/pci/devices"
  15. #define PROC_INTERRUPTS "/proc/interrupts"
  16. #define PROC_IRQ "/proc/irq"
  17. /* Compare function for global IRQ list */
  18. int irq_list_compare(const void *first, const void *second);
  19. /* IRQ list functions */
  20. int irq_list_populate(lub_list_t *irqs);
  21. int irq_list_free(lub_list_t *irqs);
  22. int irq_list_show(lub_list_t *irqs);
  23. irq_t * irq_list_search(lub_list_t *irqs, unsigned int num);
  24. #endif