Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/interrupt.c

    r646b996 r0e796cc  
    3636#include <arch/asm.h>
    3737#include <arch/regutils.h>
     38#include <arch/machine_func.h>
    3839#include <ddi/irq.h>
    3940#include <ddi/device.h>
    4041#include <interrupt.h>
    41 
    42 #ifdef MACHINE_testarm
    43         #include <arch/mach/testarm/testarm.h>
    44 #endif
    45 
    46 #ifdef MACHINE_integratorcp
    47         #include <arch/mach/integratorcp/integratorcp.h>
    48 #endif
    49 
    50 /** Initial size of a table holding interrupt handlers. */
    51 #define IRQ_COUNT 8
    5242
    5343/** Disable interrupts.
     
    9787}
    9888
     89/** Check interrupts state.
     90 *
     91 * @return True if interrupts are disabled.
     92 *
     93 */
     94bool interrupts_disabled(void)
     95{
     96        return current_status_reg_read() & STATUS_REG_IRQ_DISABLED_BIT;
     97}
     98
    9999/** Initialize basic tables for exception dispatching
    100100 * and starts the timer.
     
    102102void interrupt_init(void)
    103103{
    104         irq_init(IRQ_COUNT, IRQ_COUNT);
     104        size_t irq_count;
     105
     106        irq_count = machine_get_irq_count();
     107        irq_init(irq_count, irq_count);
     108
    105109        machine_timer_irq_start();
    106110}
Note: See TracChangeset for help on using the changeset viewer.