RTEMS CPU Kit with SuperCore
4.11.2
|
This handler encapsulates functionality which provides the foundation ISR services used in all of the APIs supported by RTEMS. More...
![]() |
Modules | |
ISR Locks | |
Low-level lock to protect critical sections accessed by threads and interrupt service routines. | |
Files | |
file | isr.c |
Initialize the ISR handler. | |
file | isrisinprogress.c |
ISR Is In Progress Default Implementation. | |
Macros | |
#define | _ISR_Install_vector(_vector, _new_handler, _old_handler) _CPU_ISR_install_vector( _vector, _new_handler, _old_handler ) |
Install interrupt handler vector. More... | |
#define | _ISR_Disable(_level) |
Disables interrupts on this processor. More... | |
#define | _ISR_Enable(_level) |
Enables interrupts on this processor. More... | |
#define | _ISR_Flash(_level) |
Temporarily enables interrupts on this processor. More... | |
#define | _ISR_Get_level() _CPU_ISR_Get_level() |
Return current interrupt level. More... | |
#define | _ISR_Set_level(_new_level) |
Set current interrupt level. More... | |
#define | _ISR_Disable_without_giant(_level) |
#define | _ISR_Enable_without_giant(_level) |
Typedefs | |
typedef uint32_t | ISR_Vector_number |
The following type defines the type used to manage the vectors. | |
typedef void | ISR_Handler |
Return type for ISR Handler. | |
typedef void * | ISR_Handler_entry |
typedef uint32_t | ISR_Level |
The following type defines the control block used to manage the interrupt level portion of the status register. | |
Functions | |
void | _ISR_Handler_initialization (void) |
Initialize the ISR handler. More... | |
void | _ISR_Handler (void) |
ISR interrupt dispatcher. More... | |
void | _ISR_Dispatch (void) |
ISR wrapper for thread dispatcher. More... | |
bool | _ISR_Is_in_progress (void) |
Checks if an ISR in progress. More... | |
This handler encapsulates functionality which provides the foundation ISR services used in all of the APIs supported by RTEMS.
The ISR Nest level counter variable is maintained as part of the per cpu data structure.
#define _ISR_Disable | ( | _level | ) |
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.
[out] | _level | The argument _level will contain the previous interrupt mask level. |
Referenced by _Chain_Append(), _Chain_Append_with_empty_check(), _Chain_Extract(), _Chain_Get(), _Chain_Get_with_empty_check(), _Chain_Insert(), _Chain_Prepend_with_empty_check(), _CORE_spinlock_Release(), _POSIX_Threads_cancel_run(), and _Thread_MP_Find_proxy().
#define _ISR_Disable_without_giant | ( | _level | ) |
#define _ISR_Enable | ( | _level | ) |
Enables interrupts on this processor.
This macro restores the interrupt status on the processor with the interrupt level value obtained by _ISR_Disable(). It is used at the end of a critical section of code to enable interrupts so they can be processed again.
[in] | _level | The interrupt level previously obtained by _ISR_Disable(). |
Referenced by _Chain_Append(), _Chain_Append_with_empty_check(), _Chain_Extract(), _Chain_Get(), _Chain_Get_with_empty_check(), _Chain_Insert(), _Chain_Prepend_with_empty_check(), and _POSIX_Threads_cancel_run().
#define _ISR_Enable_without_giant | ( | _level | ) |
#define _ISR_Flash | ( | _level | ) |
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.
[in] | _level | The interrupt level previously obtained by _ISR_Disable(). |
#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
This | method returns the current level. |
Referenced by _Thread_Lock_acquire_default_critical().
#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
[in] | _vector | is the vector number |
[in] | _new_handler | is ISR handler to install |
[in] | _old_handler | is a pointer to a variable which will be set to the old handler |
*_old_handler | will be set to the old ISR handler |
#define _ISR_Set_level | ( | _new_level | ) |
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.
[in] | _new_level | contains the desired interrupt level. |
Referenced by _Modes_Set_interrupt_level().
void _ISR_Dispatch | ( | void | ) |
ISR wrapper for thread dispatcher.
This routine provides a wrapper so that the routine _Thread_Dispatch can be invoked when a reschedule is necessary at the end of the outermost interrupt service routine. This wrapper is necessary to establish the processor context needed by _Thread_Dispatch and to save the processor context which is corrupted by _Thread_Dispatch. This context typically consists of registers which are not preserved across routine invocations.
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.
void _ISR_Handler_initialization | ( | void | ) |
Initialize the ISR handler.
This routine performs the initialization necessary for the ISR handler.
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.
This | methods returns true when called from an ISR. |