RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Modules | Files | Macros | Typedefs | Functions | Variables

This group contains the ISR Handler implementation. More...

Modules

 ISR Locks
 This group contains the ISR locks implementation.
 

Files

file  isr.h
 This header file provides the main interfaces of the ISR Handler.
 
file  isrlevel.h
 This header file provides the ISR_Level related interfaces of the ISR Handler.
 
file  isr.c
 This source file contains the definition of _ISR_Vector_table and the implementation of _ISR_Handler_initialization().
 
file  isrisinprogress.c
 This source file contains the default implementation of _ISR_Is_in_progress().
 
file  isrvectortable.c
 This source file contains the definition of _ISR_Vector_table.
 

Macros

#define _ISR_Install_vector(_vector, _new_handler, _old_handler)    _CPU_ISR_install_vector( _vector, _new_handler, _old_handler )
 Install interrupt handler vector.
 
#define _ISR_Local_disable(_level)
 Disables interrupts on this processor.
 
#define _ISR_Local_enable(_level)
 Enables interrupts on this processor.
 
#define _ISR_Local_flash(_level)
 Temporarily enables interrupts on this processor.
 
#define _ISR_Is_enabled(_level)    _CPU_ISR_Is_enabled( _level )
 Returns true if interrupts are enabled in the specified interrupt level, otherwise returns false.
 
#define _ISR_Get_level()    _CPU_ISR_Get_level()
 Return current interrupt level.
 
#define _ISR_Set_level(_new_level)
 Set current interrupt level.
 

Typedefs

typedef uint32_t ISR_Vector_number
 
typedef void ISR_Handler
 
typedef void * ISR_Handler_entry
 
typedef uint32_t ISR_Level
 

Functions

 RTEMS_DECLARE_GLOBAL_SYMBOL (_ISR_Stack_size)
 Provides the configured interrupt stack size through an address.
 
void _ISR_Handler_initialization (void)
 Initializes the ISR handler.
 
void _ISR_Handler (void)
 ISR interrupt dispatcher.
 
bool _ISR_Is_in_progress (void)
 Checks if an ISR in progress.
 

Variables

const char *const volatile _ISR_Stack_size_object
 Provides the configured interrupt stack size through an object.
 
char _ISR_Stack_area_begin []
 The interrupt stack area begin.
 
const char _ISR_Stack_area_end []
 The interrupt stack area end.
 

Detailed Description

This group contains the ISR Handler implementation.

This handler encapsulates functionality which provides the foundation ISR services used in all of the APIs supported by RTEMS. This handler supports interrupt critical sections, vectoring of user interrupt handlers, nesting of interrupts, and manipulating interrupt levels.

The _ISR_Nest_level variable is maintained by Per-CPU Information.

Macro Definition Documentation

◆ _ISR_Get_level

#define _ISR_Get_level ( )     _CPU_ISR_Get_level()

Return current interrupt level.

This routine returns the current interrupt level.

LM32 Specific Information: XXX document implementation including references if appropriate

Return values
Thismethod returns the current level.

◆ _ISR_Install_vector

#define _ISR_Install_vector (   _vector,
  _new_handler,
  _old_handler 
)     _CPU_ISR_install_vector( _vector, _new_handler, _old_handler )

Install interrupt handler vector.

This routine installs new_handler as the interrupt service routine for the specified vector. The previous interrupt service routine is returned as old_handler.

LM32 Specific Information: XXX document implementation including references if appropriate

Parameters
[in]_vectoris the vector number
[in]_new_handleris ISR handler to install
[in]_old_handleris a pointer to a variable which will be set to the old handler
Return values
*_old_handlerwill be set to the old ISR handler

◆ _ISR_Is_enabled

#define _ISR_Is_enabled (   _level)     _CPU_ISR_Is_enabled( _level )

Returns true if interrupts are enabled in the specified interrupt level, otherwise returns false.

Parameters
[in]_levelThe ISR level.
Return values
trueInterrupts are enabled in the interrupt level.
falseOtherwise.

◆ _ISR_Local_disable

#define _ISR_Local_disable (   _level)
Value:
do { \
_CPU_ISR_Disable( _level ); \
RTEMS_COMPILER_MEMORY_BARRIER(); \
} while (0)

Disables interrupts on this processor.

This macro disables all interrupts on this processor so that a critical section of code is protected from concurrent access by interrupts of this processor. Disabling of interrupts disables thread dispatching on the processor as well.

On SMP configurations other processors can enter such sections if not protected by other means.

Parameters
[out]_levelThe argument _level will contain the previous interrupt mask level.

◆ _ISR_Local_enable

#define _ISR_Local_enable (   _level)
Value:
do { \
RTEMS_COMPILER_MEMORY_BARRIER(); \
_CPU_ISR_Enable( _level ); \
} while (0)

Enables interrupts on this processor.

This macro restores the interrupt status on the processor with the interrupt level value obtained by _ISR_Local_disable(). It is used at the end of a critical section of code to enable interrupts so they can be processed again.

Parameters
[in]_levelThe interrupt level previously obtained by _ISR_Local_disable().

◆ _ISR_Local_flash

#define _ISR_Local_flash (   _level)
Value:
do { \
RTEMS_COMPILER_MEMORY_BARRIER(); \
_CPU_ISR_Flash( _level ); \
RTEMS_COMPILER_MEMORY_BARRIER(); \
} while (0)

Temporarily enables interrupts on this processor.

This macro temporarily enables interrupts to the previous interrupt mask level and then disables all interrupts so that the caller can continue into the second part of a critical section.

This routine is used to temporarily enable interrupts during a long critical section. It is used in long sections of critical code when a point is reached at which interrupts can be temporarily enabled. Deciding where to flash interrupts in a long critical section is often difficult and the point must be selected with care to ensure that the critical section properly protects itself.

Parameters
[in]_levelThe interrupt level previously obtained by _ISR_Local_disable().

◆ _ISR_Set_level

#define _ISR_Set_level (   _new_level)
Value:
do { \
RTEMS_COMPILER_MEMORY_BARRIER(); \
_CPU_ISR_Set_level( _new_level ); \
RTEMS_COMPILER_MEMORY_BARRIER(); \
} while (0)

Set current interrupt level.

This routine sets the current interrupt level to that specified by _new_level. The new interrupt level is effective when the routine exits.

Parameters
[in]_new_levelcontains the desired interrupt level.

Typedef Documentation

◆ ISR_Handler

typedef void ISR_Handler

Return type for ISR Handler

◆ ISR_Level

typedef uint32_t ISR_Level

The following type defines the control block used to manage the interrupt level portion of the status register.

◆ ISR_Vector_number

typedef uint32_t ISR_Vector_number

The following type defines the type used to manage the vectors.

Function Documentation

◆ _ISR_Handler()

void _ISR_Handler ( void  )

ISR interrupt dispatcher.

This routine is the interrupt dispatcher. ALL interrupts are vectored to this routine so that minimal context can be saved and setup performed before the application's high-level language interrupt service routine is invoked. After the application's interrupt service routine returns control to this routine, it will determine if a thread dispatch is necessary. If so, it will ensure that the necessary thread scheduling operations are performed when the outermost interrupt service routine exits.

Note
Typically implemented in assembly language.

◆ _ISR_Handler_initialization()

void _ISR_Handler_initialization ( void  )

Initializes the ISR handler.

This routine performs the initialization necessary for the ISR handler.

◆ _ISR_Is_in_progress()

bool _ISR_Is_in_progress ( void  )

Checks if an ISR in progress.

This function returns true, if the processor is currently servicing and interrupt, and false otherwise. A return value of true indicates that the caller is an interrupt service routine, not a thread.

Returns
true Returns true, if called from within an ISR, otherwise false.

◆ RTEMS_DECLARE_GLOBAL_SYMBOL()

RTEMS_DECLARE_GLOBAL_SYMBOL ( _ISR_Stack_size  )

Provides the configured interrupt stack size through an address.

The address of this global symbol is equal to the configured interrupt stack size. The address of this symbol has an arbitrary value an may not be representable in the code model used by the compiler.

This global symbol is defined by the application configuration option CONFIGURE_INIT_TASK_STACK_SIZE via <rtems/confdefs.h>.

Variable Documentation

◆ _ISR_Stack_area_begin

char _ISR_Stack_area_begin[]
extern

The interrupt stack area begin.

The interrupt stack area is defined by the application configuration via <rtems/confdefs.h>. The size of the area depends on CONFIGURE_INIT_TASK_STACK_SIZE and CONFIGURE_MAXIMUM_PROCESSORS.

◆ _ISR_Stack_area_end

const char _ISR_Stack_area_end[]
extern

The interrupt stack area end.

The interrupt stack area is defined by the application configuration via <rtems/confdefs.h>. The size of the area depends on CONFIGURE_INIT_TASK_STACK_SIZE and CONFIGURE_MAXIMUM_PROCESSORS.

◆ _ISR_Stack_size_object

const char* const volatile _ISR_Stack_size_object
extern

Provides the configured interrupt stack size through an object.

This object is provided to avoid issues with the _ISR_Stack_size symbol address and the code model used by the compiler.