RTEMS
5.0.0
|
Low-level lock to protect critical sections accessed by threads and interrupt service routines. More...
Macros | |
#define | RTEMS_INTERRUPT_LOCK_MEMBER(_designator) ISR_LOCK_MEMBER( _designator ) |
Defines an interrupt lock member. More... | |
#define | RTEMS_INTERRUPT_LOCK_DECLARE(_qualifier, _designator) ISR_LOCK_DECLARE( _qualifier, _designator ) |
Declares an interrupt lock variable. More... | |
#define | RTEMS_INTERRUPT_LOCK_DEFINE(_qualifier, _designator, _name) ISR_LOCK_DEFINE( _qualifier, _designator, _name ) |
Defines an interrupt lock variable. More... | |
#define | RTEMS_INTERRUPT_LOCK_REFERENCE(_designator, _target) ISR_LOCK_REFERENCE( _designator, _target ) |
Defines an interrupt lock variable reference. More... | |
#define | RTEMS_INTERRUPT_LOCK_INITIALIZER(_name) ISR_LOCK_INITIALIZER( _name ) |
Initializer for static initialization of interrupt locks. More... | |
#define | rtems_interrupt_lock_initialize(_lock, _name) _ISR_lock_Initialize( _lock, _name ) |
Initializes an interrupt lock. More... | |
#define | rtems_interrupt_lock_destroy(_lock) _ISR_lock_Destroy( _lock ) |
Destroys an interrupt lock. More... | |
#define | rtems_interrupt_lock_interrupt_disable(_lock_context) _ISR_lock_ISR_disable( _lock_context ) |
Disables interrupts on the current processor. More... | |
#define | rtems_interrupt_lock_acquire(_lock, _lock_context) _ISR_lock_ISR_disable_and_acquire( _lock, _lock_context ) |
Acquires an interrupt lock. More... | |
#define | rtems_interrupt_lock_release(_lock, _lock_context) _ISR_lock_Release_and_ISR_enable( _lock, _lock_context ) |
Releases an interrupt lock. More... | |
#define | rtems_interrupt_lock_acquire_isr(_lock, _lock_context) do { (void) _lock_context; } while ( 0 ) |
Acquires an interrupt lock in the corresponding interrupt service routine. More... | |
#define | rtems_interrupt_lock_release_isr(_lock, _lock_context) do { (void) _lock_context; } while ( 0 ) |
Releases an interrupt lock in the corresponding interrupt service routine. More... | |
Typedefs | |
typedef ISR_lock_Control | rtems_interrupt_lock |
Interrupt lock control. | |
typedef ISR_lock_Context | rtems_interrupt_lock_context |
Local interrupt lock context for acquire and release pairs. | |
Low-level lock to protect critical sections accessed by threads and interrupt service routines.
On single processor configurations the interrupt locks degrade to simple interrupt disable/enable sequences. No additional storage or objects are required.
This synchronization primitive is supported on SMP configurations. Here SMP locks are used.
#define rtems_interrupt_lock_acquire | ( | _lock, | |
_lock_context | |||
) | _ISR_lock_ISR_disable_and_acquire( _lock, _lock_context ) |
Acquires an interrupt lock.
Interrupts will be disabled. On SMP configurations this function acquires an SMP lock.
This function can be used in thread and interrupt context.
[in,out] | _lock | The interrupt lock. |
[in,out] | _lock_context | The local interrupt lock context for an acquire and release pair. |
#define rtems_interrupt_lock_acquire_isr | ( | _lock, | |
_lock_context | |||
) | do { (void) _lock_context; } while ( 0 ) |
Acquires an interrupt lock in the corresponding interrupt service routine.
The interrupt status will remain unchanged. On SMP configurations this function acquires an SMP lock.
In case the corresponding interrupt service routine can be interrupted by higher priority interrupts and these interrupts enter the critical section protected by this lock, then the result is unpredictable.
[in,out] | _lock | The interrupt lock. |
[in,out] | _lock_context | The local interrupt lock context for an acquire and release pair. |
#define RTEMS_INTERRUPT_LOCK_DECLARE | ( | _qualifier, | |
_designator | |||
) | ISR_LOCK_DECLARE( _qualifier, _designator ) |
Declares an interrupt lock variable.
Do not add a ';' after this macro.
_qualifier | The qualifier for the interrupt lock, e.g. extern. |
_designator | The designator for the interrupt lock. |
#define RTEMS_INTERRUPT_LOCK_DEFINE | ( | _qualifier, | |
_designator, | |||
_name | |||
) | ISR_LOCK_DEFINE( _qualifier, _designator, _name ) |
Defines an interrupt lock variable.
Do not add a ';' after this macro.
_qualifier | The qualifier for the interrupt lock, e.g. static. |
_designator | The designator for the interrupt lock. |
_name | The name for the interrupt lock. It must be a string. The name is only used if profiling is enabled. |
#define rtems_interrupt_lock_destroy | ( | _lock | ) | _ISR_lock_Destroy( _lock ) |
Destroys an interrupt lock.
Concurrent destruction leads to unpredictable results.
[in,out] | _lock | The interrupt lock control. |
#define rtems_interrupt_lock_initialize | ( | _lock, | |
_name | |||
) | _ISR_lock_Initialize( _lock, _name ) |
Initializes an interrupt lock.
Concurrent initialization leads to unpredictable results.
[in,out] | _lock | The interrupt lock. |
[in] | _name | The name for the interrupt lock. This name must be a string persistent throughout the life time of this lock. The name is only used if profiling is enabled. |
#define RTEMS_INTERRUPT_LOCK_INITIALIZER | ( | _name | ) | ISR_LOCK_INITIALIZER( _name ) |
Initializer for static initialization of interrupt locks.
_name | The name for the interrupt lock. It must be a string. The name is only used if profiling is enabled. |
#define rtems_interrupt_lock_interrupt_disable | ( | _lock_context | ) | _ISR_lock_ISR_disable( _lock_context ) |
Disables interrupts on the current processor.
This function can be used in thread and interrupt context.
[in,out] | _lock_context | The local interrupt lock context for an acquire and release pair. |
#define RTEMS_INTERRUPT_LOCK_MEMBER | ( | _designator | ) | ISR_LOCK_MEMBER( _designator ) |
Defines an interrupt lock member.
Do not add a ';' after this macro.
_designator | The designator for the interrupt lock. |
#define RTEMS_INTERRUPT_LOCK_REFERENCE | ( | _designator, | |
_target | |||
) | ISR_LOCK_REFERENCE( _designator, _target ) |
Defines an interrupt lock variable reference.
Do not add a ';' after this macro.
_designator | The designator for the interrupt lock reference. |
_target | The target for the interrupt lock reference. |
#define rtems_interrupt_lock_release | ( | _lock, | |
_lock_context | |||
) | _ISR_lock_Release_and_ISR_enable( _lock, _lock_context ) |
Releases an interrupt lock.
The interrupt status will be restored. On SMP configurations this function releases an SMP lock.
This function can be used in thread and interrupt context.
[in,out] | _lock | The interrupt lock. |
[in,out] | _lock_context | The local interrupt lock context for an acquire and release pair. |
#define rtems_interrupt_lock_release_isr | ( | _lock, | |
_lock_context | |||
) | do { (void) _lock_context; } while ( 0 ) |
Releases an interrupt lock in the corresponding interrupt service routine.
The interrupt status will remain unchanged. On SMP configurations this function releases an SMP lock.
[in,out] | _lock | The interrupt lock. |
[in,out] | _lock_context | The local interrupt lock context for an acquire and release pair. |