libmetal
|
Linux libmetal irq operations. More...
#include <pthread.h>
#include <sched.h>
#include <metal/device.h>
#include <metal/irq.h>
#include <metal/irq_controller.h>
#include <metal/sys.h>
#include <metal/mutex.h>
#include <metal/list.h>
#include <metal/utilities.h>
#include <metal/alloc.h>
#include <sys/time.h>
#include <sys/eventfd.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <poll.h>
#include <unistd.h>
Macros | |
#define | MAX_IRQS (FD_SETSIZE - 1) |
Functions | |
static void | metal_linux_irq_set_enable (struct metal_irq_controller *irq_cntr, int irq, unsigned int state) |
static | METAL_IRQ_CONTROLLER_DECLARE (linux_irq_cntr, 0, MAX_IRQS, NULL, metal_linux_irq_set_enable, NULL, irqs) |
unsigned int | metal_irq_save_disable (void) |
disable interrupts | |
void | metal_irq_restore_enable (unsigned int flags) |
restore interrupts to their previous state | |
static int | metal_linux_irq_notify (void) |
static void * | metal_linux_irq_handling (void *args) |
IRQ handler. | |
int | metal_linux_irq_init (void) |
irq handling initialization | |
void | metal_linux_irq_shutdown (void) |
irq handling shutdown | |
void | metal_linux_irq_register_dev (struct metal_device *dev, int irq) |
Variables | |
static struct metal_device * | irqs_devs [MAX_IRQS] |
static int | irq_notify_fd |
static metal_mutex_t | irq_lock |
static bool | irq_handling_stop |
static pthread_t | irq_pthread |
static unsigned long | irqs_enabled [metal_div_round_up(MAX_IRQS, METAL_BITS_PER_ULONG)] |
static struct metal_irq | irqs [MAX_IRQS] |
Linux libmetal irq operations.
#define MAX_IRQS (FD_SETSIZE - 1) |
maximum number of irqs
|
static |
|
static |
IRQ handler.
[in] | args | not used. required for pthread. |
int metal_linux_irq_init | ( | void | ) |
irq handling initialization
|
static |
void metal_linux_irq_register_dev | ( | struct metal_device * | dev, |
int | irq ) |
|
static |
Linux IRQ controller
void metal_linux_irq_shutdown | ( | void | ) |
irq handling shutdown
|
static |
stop interrupts handling
|
static |
irq handling lock
|
static |
irq handling state change notification file descriptor
|
static |
irq handling thread id Indicate which IRQ is enabled
|
static |
Linux devices for IRQs
|
static |