mirror of
https://git.rtems.org/rtems-docs/
synced 2025-07-27 12:47:12 +08:00
parent
a31dbcba2a
commit
f776fe6591
@ -494,14 +494,16 @@ CALLING SEQUENCE:
|
|||||||
.. code-block:: c
|
.. code-block:: c
|
||||||
|
|
||||||
void rtems_interrupt_lock_initialize(
|
void rtems_interrupt_lock_initialize(
|
||||||
rtems_interrupt_lock *lock
|
rtems_interrupt_lock *lock,
|
||||||
|
const char *name
|
||||||
);
|
);
|
||||||
|
|
||||||
DIRECTIVE STATUS CODES:
|
DIRECTIVE STATUS CODES:
|
||||||
NONE
|
NONE
|
||||||
|
|
||||||
DESCRIPTION:
|
DESCRIPTION:
|
||||||
Initializes an interrupt lock.
|
Initializes an interrupt lock. The name must be persistent throughout the
|
||||||
|
lifetime of the lock.
|
||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
Concurrent initialization leads to unpredictable results.
|
Concurrent initialization leads to unpredictable results.
|
||||||
@ -521,7 +523,7 @@ CALLING SEQUENCE:
|
|||||||
|
|
||||||
void rtems_interrupt_lock_acquire(
|
void rtems_interrupt_lock_acquire(
|
||||||
rtems_interrupt_lock *lock,
|
rtems_interrupt_lock *lock,
|
||||||
rtems_interrupt_level level
|
rtems_interrupt_lock_context *lock_context
|
||||||
);
|
);
|
||||||
|
|
||||||
DIRECTIVE STATUS CODES:
|
DIRECTIVE STATUS CODES:
|
||||||
@ -532,6 +534,12 @@ DESCRIPTION:
|
|||||||
acquires an SMP lock.
|
acquires an SMP lock.
|
||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
|
A separate lock context must be provided for each acquire/release pair, for
|
||||||
|
example an automatic variable.
|
||||||
|
|
||||||
|
An attempt to recursively acquire the lock may result in an infinite loop
|
||||||
|
with interrupts disabled.
|
||||||
|
|
||||||
This directive will not cause the calling thread to be preempted. This
|
This directive will not cause the calling thread to be preempted. This
|
||||||
directive can be used in thread and interrupt context.
|
directive can be used in thread and interrupt context.
|
||||||
|
|
||||||
@ -550,7 +558,7 @@ CALLING SEQUENCE:
|
|||||||
|
|
||||||
void rtems_interrupt_lock_release(
|
void rtems_interrupt_lock_release(
|
||||||
rtems_interrupt_lock *lock,
|
rtems_interrupt_lock *lock,
|
||||||
rtems_interrupt_level level
|
rtems_interrupt_lock_context *lock_context
|
||||||
);
|
);
|
||||||
|
|
||||||
DIRECTIVE STATUS CODES:
|
DIRECTIVE STATUS CODES:
|
||||||
@ -561,6 +569,9 @@ DESCRIPTION:
|
|||||||
directive releases an SMP lock.
|
directive releases an SMP lock.
|
||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
|
The lock context must be the one used to acquire the lock, otherwise the
|
||||||
|
result is unpredictable.
|
||||||
|
|
||||||
This directive will not cause the calling thread to be preempted. This
|
This directive will not cause the calling thread to be preempted. This
|
||||||
directive can be used in thread and interrupt context.
|
directive can be used in thread and interrupt context.
|
||||||
|
|
||||||
@ -579,7 +590,7 @@ CALLING SEQUENCE:
|
|||||||
|
|
||||||
void rtems_interrupt_lock_acquire_isr(
|
void rtems_interrupt_lock_acquire_isr(
|
||||||
rtems_interrupt_lock *lock,
|
rtems_interrupt_lock *lock,
|
||||||
rtems_interrupt_level level
|
rtems_interrupt_lock_context *lock_context
|
||||||
);
|
);
|
||||||
|
|
||||||
DIRECTIVE STATUS CODES:
|
DIRECTIVE STATUS CODES:
|
||||||
@ -589,14 +600,19 @@ DESCRIPTION:
|
|||||||
The interrupt status will remain unchanged. In SMP configurations, this
|
The interrupt status will remain unchanged. In SMP configurations, this
|
||||||
directive acquires an SMP lock.
|
directive acquires an SMP lock.
|
||||||
|
|
||||||
|
NOTES:
|
||||||
|
A separate lock context must be provided for each acquire/release pair, for
|
||||||
|
example an automatic variable.
|
||||||
|
|
||||||
|
An attempt to recursively acquire the lock may result in an infinite loop.
|
||||||
|
|
||||||
|
This directive is intended for device drivers and should be called from the
|
||||||
|
corresponding interrupt service routine.
|
||||||
|
|
||||||
In case the corresponding interrupt service routine can be interrupted by
|
In case the corresponding interrupt service routine can be interrupted by
|
||||||
higher priority interrupts and these interrupts enter the critical section
|
higher priority interrupts and these interrupts enter the critical section
|
||||||
protected by this lock, then the result is unpredictable.
|
protected by this lock, then the result is unpredictable.
|
||||||
|
|
||||||
NOTES:
|
|
||||||
This directive should be called from the corresponding interrupt service
|
|
||||||
routine.
|
|
||||||
|
|
||||||
.. raw:: latex
|
.. raw:: latex
|
||||||
|
|
||||||
\clearpage
|
\clearpage
|
||||||
@ -612,20 +628,22 @@ CALLING SEQUENCE:
|
|||||||
|
|
||||||
void rtems_interrupt_lock_release_isr(
|
void rtems_interrupt_lock_release_isr(
|
||||||
rtems_interrupt_lock *lock,
|
rtems_interrupt_lock *lock,
|
||||||
rtems_interrupt_level level
|
rtems_interrupt_lock_context *lock_context
|
||||||
);
|
);
|
||||||
|
|
||||||
DIRECTIVE STATUS CODES:
|
DIRECTIVE STATUS CODES:
|
||||||
NONE
|
NONE
|
||||||
|
|
||||||
DESCRIPTION:
|
DESCRIPTION:
|
||||||
|
|
||||||
The interrupt status will remain unchanged. In SMP configurations, this
|
The interrupt status will remain unchanged. In SMP configurations, this
|
||||||
directive releases an SMP lock.
|
directive releases an SMP lock.
|
||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
This directive should be called from the corresponding interrupt service
|
The lock context must be the one used to acquire the lock, otherwise the
|
||||||
routine.
|
result is unpredictable.
|
||||||
|
|
||||||
|
This directive is intended for device drivers and should be called from the
|
||||||
|
corresponding interrupt service routine.
|
||||||
|
|
||||||
.. raw:: latex
|
.. raw:: latex
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user