56#ifndef _RTEMS_RTEMS_INTR_H
57#define _RTEMS_RTEMS_INTR_H
61#include <sys/cpuset.h>
69#include <rtems/score/cpu.h>
70#include <rtems/score/cpuopts.h>
133#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
194#if !defined(RTEMS_SMP)
264 #define rtems_interrupt_disable( _isr_cookie ) _ISR_Local_disable( _isr_cookie )
267#if !defined(RTEMS_SMP)
311 #define rtems_interrupt_enable( _isr_cookie ) _ISR_Local_enable( _isr_cookie )
314#if !defined(RTEMS_SMP)
354 #define rtems_interrupt_flash( _isr_cookie ) _ISR_Local_flash( _isr_cookie )
427#define rtems_interrupt_local_disable( _isr_cookie ) \
428 _ISR_Local_disable( _isr_cookie )
468#define rtems_interrupt_local_enable( _isr_cookie ) \
469 _ISR_Local_enable( _isr_cookie )
495#define rtems_interrupt_is_in_progress() _ISR_Is_in_progress()
532#define rtems_interrupt_lock_initialize( _lock, _name ) \
533 _ISR_lock_Initialize( _lock, _name )
564#define rtems_interrupt_lock_destroy( _lock ) _ISR_lock_Destroy( _lock )
621#define rtems_interrupt_lock_acquire( _lock, _lock_context ) \
622 _ISR_lock_ISR_disable_and_acquire( _lock, _lock_context )
664#define rtems_interrupt_lock_release( _lock, _lock_context ) \
665 _ISR_lock_Release_and_ISR_enable( _lock, _lock_context )
711#if defined(RTEMS_SMP)
712 #define rtems_interrupt_lock_acquire_isr( _lock, _lock_context ) \
715 &( _lock_context )->Lock_context \
718 #define rtems_interrupt_lock_acquire_isr( _lock, _lock_context ) \
719 do { (void) _lock_context; } while ( 0 )
757#if defined(RTEMS_SMP)
758 #define rtems_interrupt_lock_release_isr( _lock, _lock_context ) \
761 &( _lock_context )->Lock_context \
764 #define rtems_interrupt_lock_release_isr( _lock, _lock_context ) \
765 do { (void) _lock_context; } while ( 0 )
790#define rtems_interrupt_lock_interrupt_disable( _lock_context ) \
791 _ISR_lock_ISR_disable( _lock_context )
808#define RTEMS_INTERRUPT_LOCK_DECLARE( _specifier, _designator ) \
809 ISR_LOCK_DECLARE( _specifier, _designator )
835#define RTEMS_INTERRUPT_LOCK_DEFINE( _specifier, _designator, _name ) \
836 ISR_LOCK_DEFINE( _specifier, _designator, _name )
853#define RTEMS_INTERRUPT_LOCK_INITIALIZER( _name ) ISR_LOCK_INITIALIZER( _name )
867#define RTEMS_INTERRUPT_LOCK_MEMBER( _designator ) \
868 ISR_LOCK_MEMBER( _designator )
884#define RTEMS_INTERRUPT_LOCK_REFERENCE( _designator, _target ) \
885 ISR_LOCK_REFERENCE( _designator, _target )
895#define RTEMS_INTERRUPT_SHARED ( (rtems_option) 0x00000000 )
907#define RTEMS_INTERRUPT_UNIQUE ( (rtems_option) 0x00000001 )
917#define RTEMS_INTERRUPT_REPLACE ( (rtems_option) 0x00000002 )
929#define RTEMS_INTERRUPT_IS_SHARED( _options ) \
930 ( ( _options ) & RTEMS_INTERRUPT_SHARED )
942#define RTEMS_INTERRUPT_IS_UNIQUE( _options ) \
943 ( ( _options ) & RTEMS_INTERRUPT_UNIQUE )
955#define RTEMS_INTERRUPT_IS_REPLACE( _options ) \
956 ( ( _options ) & RTEMS_INTERRUPT_REPLACE )
1044#define RTEMS_INTERRUPT_ENTRY_INITIALIZER( _routine, _arg, _info ) \
1045 { _routine, _arg, NULL, _info }
1075static inline void rtems_interrupt_entry_initialize(
1082 entry->handler = routine;
1736 size_t affinity_size,
1798 size_t affinity_size,
1799 const cpu_set_t *affinity
2073#define RTEMS_INTERRUPT_SERVER_DEFAULT 0
2096 #if defined(RTEMS_SMP)
2266 uint32_t *server_count
2312 uint32_t *server_index
2388 uint32_t server_index,
2443 uint32_t server_index,
2508 uint32_t server_index,
2509 size_t affinity_size,
2510 const cpu_set_t *affinity,
2667 uint32_t source_server_index,
2669 uint32_t destination_server_index
2723 uint32_t server_index,
2849 uint32_t server_index,
3061 uint32_t server_index
3143 uint32_t server_index,
3202static inline void rtems_interrupt_server_request_set_vector(
3239static inline void rtems_interrupt_server_request_destroy(
3296static inline void rtems_interrupt_server_request_submit(
This header file provides Classic API directive attributes.
This header file provides basic definitions used by the API and the implementation.
This header file provides types used by the Classic API.
uint32_t rtems_attribute
This type represents Classic API attributes.
Definition: attr.h:96
ISR_Handler_entry rtems_isr_entry
Interrupt service routines installed by rtems_interrupt_catch() shall have this type.
Definition: intr.h:134
rtems_status_code rtems_interrupt_server_handler_install(uint32_t server_index, rtems_vector_number vector, const char *info, rtems_option options, rtems_interrupt_handler routine, void *arg)
Installs the interrupt handler routine and argument at the interrupt vector on the interrupt server.
Definition: irq-server.c:373
rtems_status_code rtems_interrupt_server_handler_iterate(uint32_t server_index, rtems_vector_number vector, rtems_interrupt_per_handler_routine routine, void *arg)
Iterates over all interrupt handler installed at the interrupt vector and interrupt server.
Definition: irq-server.c:461
rtems_status_code rtems_interrupt_vector_disable(rtems_vector_number vector)
Disables the interrupt vector.
Definition: irq-enable-disable.c:94
ISR_Handler rtems_isr
This type defines the return type of interrupt service routines.
Definition: intr.h:123
rtems_status_code rtems_interrupt_server_handler_remove(uint32_t server_index, rtems_vector_number vector, rtems_interrupt_handler routine, void *arg)
Removes the interrupt handler routine and argument from the interrupt vector and the interrupt server...
Definition: irq-server.c:400
rtems_status_code rtems_interrupt_set_affinity(rtems_vector_number vector, size_t affinity_size, const cpu_set_t *affinity)
Sets the processor affinity set of the interrupt vector.
Definition: irq-affinity.c:42
rtems_status_code rtems_interrupt_entry_install(rtems_vector_number vector, rtems_option options, rtems_interrupt_entry *entry)
Installs the interrupt entry at the interrupt vector.
Definition: irq-generic.c:264
rtems_status_code rtems_interrupt_handler_iterate(rtems_vector_number vector, rtems_interrupt_per_handler_routine routine, void *arg)
Iterates over all interrupt handler installed at the interrupt vector.
Definition: irq-handler-iterate.c:39
rtems_status_code rtems_interrupt_is_pending(rtems_vector_number vector, bool *pending)
Checks if the interrupt is pending.
Definition: irq-raise-clear.c:43
rtems_status_code rtems_interrupt_handler_install(rtems_vector_number vector, const char *info, rtems_option options, rtems_interrupt_handler routine, void *arg)
Installs the interrupt handler routine and argument at the interrupt vector.
Definition: irq-handler-install.c:85
ISR_Vector_number rtems_vector_number
This integer type represents interrupt vector numbers.
Definition: intr.h:102
rtems_status_code rtems_interrupt_vector_is_enabled(rtems_vector_number vector, bool *enabled)
Checks if the interrupt vector is enabled.
Definition: irq-enable-disable.c:69
rtems_status_code rtems_interrupt_server_resume(uint32_t server_index)
Resumes the interrupt server.
Definition: irq-server.c:989
rtems_status_code rtems_interrupt_server_entry_move(rtems_interrupt_server_entry *entry, uint32_t server_index)
Moves the interrupt server entry to the interrupt server.
Definition: irq-server.c:800
rtems_status_code rtems_interrupt_entry_remove(rtems_vector_number vector, rtems_interrupt_entry *entry)
Removes the interrupt entry from the interrupt vector.
Definition: irq-entry-remove.c:94
rtems_status_code rtems_interrupt_server_set_affinity(uint32_t server_index, size_t affinity_size, const cpu_set_t *affinity, rtems_task_priority priority)
Sets the processor affinity of the interrupt server.
Definition: irq-server.c:1011
rtems_status_code rtems_interrupt_get_attributes(rtems_vector_number vector, rtems_interrupt_attributes *attributes)
Gets the attributes of the interrupt vector.
Definition: irq-enable-disable.c:42
ISR_lock_Control rtems_interrupt_lock
This structure represents an ISR lock.
Definition: intr.h:504
rtems_status_code rtems_interrupt_server_initialize(rtems_task_priority priority, size_t stack_size, rtems_mode modes, rtems_attribute attributes, uint32_t *server_count)
Initializes the interrupt server tasks.
Definition: irq-server.c:577
rtems_status_code rtems_interrupt_server_entry_initialize(uint32_t server_index, rtems_interrupt_server_entry *entry)
Initializes the interrupt server entry.
Definition: irq-server.c:766
rtems_status_code rtems_interrupt_raise_on(rtems_vector_number vector, uint32_t cpu_index)
Raises the interrupt vector on the processor.
Definition: irq-raise-clear.c:68
void rtems_interrupt_server_entry_destroy(rtems_interrupt_server_entry *entry)
Destroys the interrupt server entry.
Definition: irq-server.c:824
ISR_Level rtems_interrupt_level
This integer type represents interrupt levels.
Definition: intr.h:111
void rtems_interrupt_server_entry_submit(rtems_interrupt_server_entry *entry)
Submits the interrupt server entry to be serviced by the interrupt server.
Definition: irq-server.c:793
rtems_status_code rtems_interrupt_server_delete(uint32_t server_index)
Deletes the interrupt server.
Definition: irq-server.c:721
rtems_status_code rtems_interrupt_server_request_initialize(uint32_t server_index, rtems_interrupt_server_request *request, rtems_interrupt_handler routine, void *arg)
Initializes the interrupt server request.
Definition: irq-server.c:851
rtems_status_code rtems_interrupt_raise(rtems_vector_number vector)
Raises the interrupt vector.
Definition: irq-raise-clear.c:59
rtems_status_code rtems_interrupt_handler_remove(rtems_vector_number vector, rtems_interrupt_handler routine, void *arg)
Removes the interrupt handler routine and argument from the interrupt vector.
Definition: irq-handler-remove.c:62
void rtems_interrupt_server_action_prepend(rtems_interrupt_server_entry *entry, rtems_interrupt_server_action *action, rtems_interrupt_handler routine, void *arg)
Prepends the interrupt server action to the list of actions of the interrupt server entry.
Definition: irq-server.c:783
rtems_status_code rtems_interrupt_catch(rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler)
Establishes an interrupt service routine.
Definition: intrcatch.c:46
rtems_status_code rtems_interrupt_server_suspend(uint32_t server_index)
Suspends the interrupt server.
Definition: irq-server.c:968
void(* rtems_interrupt_handler)(void *)
Interrupt handler routines shall have this type.
Definition: intr.h:965
rtems_status_code rtems_interrupt_vector_enable(rtems_vector_number vector)
Enables the interrupt vector.
Definition: irq-enable-disable.c:85
ISR_lock_Context rtems_interrupt_lock_context
This structure provides an ISR lock context for acquire and release pairs.
Definition: intr.h:514
rtems_interrupt_signal_variant
This enumeration provides interrupt trigger signal variants.
Definition: intr.h:1809
void(* rtems_interrupt_per_handler_routine)(void *, const char *, rtems_option, rtems_interrupt_handler, void *)
Visitor routines invoked by rtems_interrupt_handler_iterate() shall have this type.
Definition: intr.h:975
rtems_status_code rtems_interrupt_server_create(rtems_interrupt_server_control *control, const rtems_interrupt_server_config *config, uint32_t *server_index)
Creates an interrupt server.
Definition: irq-server.c:656
rtems_status_code rtems_interrupt_server_move(uint32_t source_server_index, rtems_vector_number vector, uint32_t destination_server_index)
Moves the interrupt handlers installed at the interrupt vector and the source interrupt server to the...
Definition: irq-server.c:917
rtems_status_code rtems_interrupt_clear(rtems_vector_number vector)
Clears the interrupt vector.
Definition: irq-raise-clear.c:92
rtems_status_code rtems_interrupt_get_affinity(rtems_vector_number vector, size_t affinity_size, cpu_set_t *affinity)
Gets the processor affinity set of the interrupt vector.
Definition: irq-affinity.c:76
@ RTEMS_INTERRUPT_SIGNAL_LEVEL_LOW
This interrupt signal variant indicates that the interrupt is triggered by a low level signal.
Definition: intr.h:1826
@ RTEMS_INTERRUPT_SIGNAL_EDGE_FALLING
This interrupt signal variant indicates that the interrupt is triggered by a falling edge signal.
Definition: intr.h:1838
@ RTEMS_INTERRUPT_NO_SIGNAL
This interrupt signal variant indicates that the interrupt cannot be triggered by a signal.
Definition: intr.h:1820
@ RTEMS_INTERRUPT_SIGNAL_LEVEL_HIGH
This interrupt signal variant indicates that the interrupt is triggered by a high level signal.
Definition: intr.h:1832
@ RTEMS_INTERRUPT_UNSPECIFIED_SIGNAL
This interrupt signal variant indicates that the interrupt trigger signal is unspecified.
Definition: intr.h:1814
@ RTEMS_INTERRUPT_SIGNAL_EDGE_RAISING
This interrupt signal variant indicates that the interrupt is triggered by a raising edge signal.
Definition: intr.h:1844
uint32_t rtems_mode
This type represents a Classic API task mode set.
Definition: modes.h:174
uint32_t rtems_option
This type represents a Classic API directive option set.
Definition: options.h:126
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
uint32_t rtems_name
This type represents Classic API object names.
Definition: types.h:226
uint32_t rtems_task_priority
This integer type represents task priorities of the Classic API.
Definition: types.h:257
Objects_Id rtems_id
This type represents RTEMS object identifiers.
Definition: types.h:94
void ISR_Handler
Definition: isr.h:72
uint32_t ISR_Level
Definition: isrlevel.h:60
uint32_t ISR_Vector_number
Definition: isr.h:67
#define NULL
Requests a GPIO pin group configuration.
Definition: xil_types.h:54
This header file provides the main interfaces of the ISR Handler.
This header file provides the ISR_Level related interfaces of the ISR Handler.
This header file provides the interfaces of the ISR Locks.
This header file provides the task modes API of the Task Manager.
This header file provides the Classic API directive options.
This header file provides the status codes of Classic API directives and support functions.
This header file provides interfaces of the Chain Handler which are used by the implementation and th...
This header file provides the main interfaces of the SMP Locks.
This structure represents a chain node.
Definition: chain.h:78
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:81
ISR lock control.
Definition: isrlock.h:72
Definition: deflate.c:114
Definition: intercom.c:87
Definition: mmu-config.c:53
This structure provides the attributes of an interrupt vector.
Definition: intr.h:1857
bool can_raise_on
This member is true, if the interrupt vector can be raised on a processor by rtems_interrupt_raise_on...
Definition: intr.h:1921
bool can_disable
This member is true, if the interrupt vector can be disabled by rtems_interrupt_vector_disable(),...
Definition: intr.h:1898
bool maybe_enable
This member is true, if the interrupt vector may be enabled by rtems_interrupt_vector_enable(),...
Definition: intr.h:1888
rtems_interrupt_signal_variant trigger_signal
This member describes the trigger signal of the interrupt associated with the interrupt vector.
Definition: intr.h:1967
bool can_raise
This member is true, if the interrupt vector can be raised by rtems_interrupt_raise(),...
Definition: intr.h:1915
bool can_clear
This member is true, if the interrupt vector can be cleared by rtems_interrupt_clear(),...
Definition: intr.h:1927
bool can_set_affinity
This member is true, if the affinity set of the interrupt vector can be set by rtems_interrupt_set_af...
Definition: intr.h:1946
bool cleared_by_acknowledge
This member is true, if the pending status of the interrupt associated with the interrupt vector is c...
Definition: intr.h:1934
bool maybe_disable
This member is true, if the interrupt vector may be disabled by rtems_interrupt_vector_disable(),...
Definition: intr.h:1909
bool is_maskable
This member is true, if the interrupt vector is maskable by rtems_interrupt_local_disable(),...
Definition: intr.h:1866
bool can_enable
This member is true, if the interrupt vector can be enabled by rtems_interrupt_vector_enable(),...
Definition: intr.h:1876
bool can_get_affinity
This member is true, if the affinity set of the interrupt vector can be obtained by rtems_interrupt_g...
Definition: intr.h:1940
bool can_be_triggered_by_message
This member is true, if the interrupt associated with the interrupt vector can be triggered by a mess...
Definition: intr.h:1957
This structure represents an interrupt entry.
Definition: intr.h:1005
rtems_interrupt_handler handler
This member is the interrupt handler routine.
Definition: intr.h:1009
void * arg
This member is the interrupt handler argument.
Definition: intr.h:1014
struct rtems_interrupt_entry * next
This member is the reference to the next entry or NULL.
Definition: intr.h:1019
const char * info
This member is the descriptive information of the entry.
Definition: intr.h:1024
This structure represents an interrupt server action.
Definition: intr.h:2747
void * arg
This member is the interrupt handler argument.
Definition: intr.h:2761
struct rtems_interrupt_server_action * next
This member is the reference to the next action or NULL.
Definition: intr.h:2751
rtems_interrupt_handler handler
This member is the interrupt handler.
Definition: intr.h:2756
This structure defines an interrupt server configuration.
Definition: intr.h:2152
size_t storage_size
This member is the task storage size of the interrupt server.
Definition: intr.h:2177
rtems_mode modes
This member is the initial mode set of the interrupt server.
Definition: intr.h:2182
rtems_attribute attributes
This member is the attribute set of the interrupt server.
Definition: intr.h:2187
rtems_name name
This member is the task name of the interrupt server.
Definition: intr.h:2156
rtems_task_priority priority
This member is the initial task priority of the interrupt server.
Definition: intr.h:2161
void * storage_area
This member is the task storage area of the interrupt server.
Definition: intr.h:2169
This structure represents an interrupt server.
Definition: intr.h:2095
Chain_Node node
This member is the node for the interrupt server registry.
Definition: intr.h:2126
Chain_Control entries
This member is the chain of pending interrupt entries.
Definition: intr.h:2106
uint32_t index
This member is the server index.
Definition: intr.h:2121
void(* destroy)(struct rtems_interrupt_server_control *)
This member is the optional handler to destroy the interrupt server control.
Definition: intr.h:2132
rtems_id server
This member is the identifier of the server task.
Definition: intr.h:2111
unsigned long errors
This member is the error count.
Definition: intr.h:2116
This structure represents an interrupt server entry.
Definition: intr.h:2786
Chain_Node node
This member is the node for the interrupt entry processing.
Definition: intr.h:2790
rtems_interrupt_server_action * actions
This member is the interrupt server actions list head.
Definition: intr.h:2806
rtems_vector_number vector
This member is the interrupt vector number.
Definition: intr.h:2801
rtems_interrupt_server_control * server
This member references the interrupt server used to process the entry.
Definition: intr.h:2796
This structure represents an interrupt server request.
Definition: intr.h:3087
rtems_interrupt_server_action action
This member is the interrupt server action.
Definition: intr.h:3096
rtems_interrupt_server_entry entry
This member is the interrupt server entry.
Definition: intr.h:3091
This union represents a chain control block.
Definition: chain.h:96