RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Macros | Functions | Variables
irq-generic.h File Reference

This header file provides interfaces of the Interrupt Manager implementation. More...

#include <stdbool.h>
#include <rtems/irq-extension.h>
#include <rtems/score/assert.h>
#include <rtems/score/processormask.h>
#include <bsp/irq.h>

Go to the source code of this file.

Macros

#define BSP_INTERRUPT_DISPATCH_TABLE_SIZE   BSP_INTERRUPT_VECTOR_COUNT
 
#define bsp_interrupt_assert(e)   _Assert(e)
 

Functions

void bsp_interrupt_handler_default (rtems_vector_number vector)
 Default interrupt handler.
 
void bsp_interrupt_initialize (void)
 Initialize Interrupt Manager implementation.
 
void bsp_interrupt_facility_initialize (void)
 BSP specific initialization.
 
rtems_status_code bsp_interrupt_get_attributes (rtems_vector_number vector, rtems_interrupt_attributes *attributes)
 Gets the attributes of the interrupt vector.
 
rtems_status_code bsp_interrupt_vector_is_enabled (rtems_vector_number vector, bool *enabled)
 Checks if the interrupt is enabled.
 
rtems_status_code bsp_interrupt_vector_enable (rtems_vector_number vector)
 Enables the interrupt vector.
 
rtems_status_code bsp_interrupt_vector_disable (rtems_vector_number vector)
 Disables the interrupt vector.
 
rtems_status_code bsp_interrupt_is_pending (rtems_vector_number vector, bool *pending)
 Checks if the interrupt is pending.
 
rtems_status_code bsp_interrupt_raise (rtems_vector_number vector)
 Causes the interrupt vector.
 
rtems_status_code bsp_interrupt_clear (rtems_vector_number vector)
 Clears the interrupt vector.
 
rtems_status_code bsp_interrupt_get_priority (rtems_vector_number vector, uint32_t *priority)
 Gets the priority of the interrupt vector.
 
rtems_status_code bsp_interrupt_set_priority (rtems_vector_number vector, uint32_t priority)
 Sets the priority of the interrupt vector.
 
rtems_status_code bsp_interrupt_get_affinity (rtems_vector_number vector, Processor_mask *affinity)
 Gets the processor affinity set of the interrupt vector.
 
rtems_status_code bsp_interrupt_set_affinity (rtems_vector_number vector, const Processor_mask *affinity)
 Sets the processor affinity set of the interrupt vector.
 
void bsp_interrupt_lock (void)
 Acquires the interrupt support lock.
 
void bsp_interrupt_unlock (void)
 Releases the interrupt support lock.
 
rtems_status_code bsp_interrupt_check_and_lock (rtems_vector_number vector, rtems_interrupt_handler handler)
 Checks the vector and routine. When the checks were successful, the interrupt support lock will be obtained.
 
rtems_interrupt_entrybsp_interrupt_entry_find (rtems_vector_number vector, rtems_interrupt_handler routine, void *arg, rtems_interrupt_entry ***previous_next)
 
void bsp_interrupt_entry_remove (rtems_vector_number vector, rtems_interrupt_entry *entry, rtems_interrupt_entry **previous_next)
 
rtems_interrupt_entry ** bsp_interrupt_get_dispatch_table_slot (rtems_vector_number index)
 Gets a reference to the interrupt handler table slot associated with the index.
 

Variables

rtems_interrupt_entrybsp_interrupt_dispatch_table []
 Each member of this table references the first installed entry at the corresponding interrupt vector or is NULL.
 
uint8_t bsp_interrupt_handler_unique_table []
 This table contains a bit map which indicates if an entry is unique or shared.
 

Detailed Description

This header file provides interfaces of the Interrupt Manager implementation.

Function Documentation

◆ bsp_interrupt_check_and_lock()

rtems_status_code bsp_interrupt_check_and_lock ( rtems_vector_number  vector,
rtems_interrupt_handler  handler 
)

Checks the vector and routine. When the checks were successful, the interrupt support lock will be obtained.

Parameters
vectoris the interrupt vector number to check.
routineis the routine to check.
Return values
RTEMS_SUCCESSFULThe requested operation was successful.
RTEMS_INCORRECT_STATEThe interrupt support was not initialized.
RTEMS_CALLED_FROM_ISRThe function was called from within interrupt context.
RTEMS_INVALID_ADDRESSThe routine parameter was NULL.
RTEMS_INVALID_IDThere was no interrupt vector associated with the number specified by vector.

◆ bsp_interrupt_get_dispatch_table_slot()

rtems_interrupt_entry ** bsp_interrupt_get_dispatch_table_slot ( rtems_vector_number  index)

Gets a reference to the interrupt handler table slot associated with the index.

Returns
Returns a reference to the interrupt handler table slot associated with the index.

◆ bsp_interrupt_lock()

void bsp_interrupt_lock ( void  )

Acquires the interrupt support lock.

The interrupt support lock is a mutex. The mutex is only acquired if the system is the SYSTEM_STATE_UP state.

◆ bsp_interrupt_unlock()

void bsp_interrupt_unlock ( void  )

Releases the interrupt support lock.

The mutex is only released if the system is the SYSTEM_STATE_UP state.

Variable Documentation

◆ bsp_interrupt_handler_unique_table

uint8_t bsp_interrupt_handler_unique_table[]
extern

This table contains a bit map which indicates if an entry is unique or shared.

If the bit associated with a vector is set, then the entry is unique, otherwise it may be shared. If the bit with index BSP_INTERRUPT_DISPATCH_TABLE_SIZE is set, then the interrupt support is initialized, otherwise it is not initialized.