This handler encapsulates functionality which provides the foundation RWLock services used in all of the APIs supported by RTEMS.
More...
|
void | _CORE_RWLock_Initialize (CORE_RWLock_Control *the_rwlock, CORE_RWLock_Attributes *the_rwlock_attributes) |
| Initialize a RWlock. More...
|
|
RTEMS_INLINE_ROUTINE void | _CORE_RWLock_Destroy (CORE_RWLock_Control *the_rwlock) |
|
void | _CORE_RWLock_Obtain_for_reading (CORE_RWLock_Control *the_rwlock, Thread_Control *executing, Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support) |
| Obtain RWLock for reading. More...
|
|
void | _CORE_RWLock_Obtain_for_writing (CORE_RWLock_Control *the_rwlock, Thread_Control *executing, Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support) |
| Obtain RWLock for writing. More...
|
|
CORE_RWLock_Status | _CORE_RWLock_Release (CORE_RWLock_Control *the_rwlock, Thread_Control *executing) |
| Release the RWLock. More...
|
|
RTEMS_INLINE_ROUTINE void | _CORE_RWLock_Initialize_attributes (CORE_RWLock_Attributes *the_attributes) |
| This method is used to initialize core rwlock attributes. More...
|
|
This handler encapsulates functionality which provides the foundation RWLock services used in all of the APIs supported by RTEMS.
◆ _CORE_RWLock_Flush
#define _CORE_RWLock_Flush |
( |
|
_the_rwlock, |
|
|
|
_remote_extract_callout, |
|
|
|
_status |
|
) |
| |
Value: &((_the_rwlock)->Wait_queue), \
(_remote_extract_callout), \
(_status) \
)
void _Thread_queue_Flush(Thread_queue_Control *the_thread_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status)
Unblocks all threads blocked on the_thread_queue.
Definition: threadqflush.c:24
This routine assists in the deletion of a RWLock by flushing the associated wait queue.
- Parameters
-
[in] | _the_rwlock | is the RWLock to flush |
[in] | _remote_extract_callout | is the routine to invoke if the thread unblocked is remote |
[in] | _status | is the status to be returned to the unblocked thread |
◆ CORE_RWLock_States
RWLock State.
Enumerator |
---|
CORE_RWLOCK_UNLOCKED | This indicates the the RWLock is not currently locked.
|
CORE_RWLOCK_LOCKED_FOR_READING | This indicates the the RWLock is currently locked for reading.
|
CORE_RWLOCK_LOCKED_FOR_WRITING | This indicates the the RWLock is currently locked for reading.
|
◆ CORE_RWLock_Status
Core RWLock handler return statuses.
Enumerator |
---|
CORE_RWLOCK_SUCCESSFUL | This status indicates that the operation completed successfully.
|
CORE_RWLOCK_WAS_DELETED | This status indicates that the thread was blocked waiting for an.
|
CORE_RWLOCK_UNAVAILABLE | This status indicates that the rwlock was not immediately available.
|
CORE_RWLOCK_TIMEOUT | This status indicates that the calling task was willing to block but the operation was unable to complete within the time allotted because the resource never became available.
|
◆ _CORE_RWLock_Initialize()
◆ _CORE_RWLock_Initialize_attributes()
This method is used to initialize core rwlock attributes.
- Parameters
-
[in] | the_attributes | pointer to the attributes to initialize. |
References CORE_RWLock_Attributes::XXX.
◆ _CORE_RWLock_Obtain_for_reading()
Obtain RWLock for reading.
This routine attempts to obtain the RWLock for read access.
- Parameters
-
[in] | the_rwlock | is the RWLock to wait for |
[in] | id | is the id of the object being waited upon |
[in] | wait | is true if the calling thread is willing to wait |
[in] | timeout | is the number of ticks the calling thread is willing to wait if wait is true. |
[in] | api_rwlock_mp_support | is the routine to invoke if the thread unblocked is remote |
- Note
- Status is returned via the thread control block.
◆ _CORE_RWLock_Obtain_for_writing()
Obtain RWLock for writing.
This routine attempts to obtain the RWLock for write exclusive access.
- Parameters
-
[in] | the_rwlock | is the RWLock to wait for |
[in] | id | is the id of the object being waited upon |
[in] | wait | is true if the calling thread is willing to wait |
[in] | timeout | is the number of ticks the calling thread is willing to wait if wait is true. |
[in] | api_rwlock_mp_support | is the routine to invoke if the thread unblocked is remote |
- Note
- Status is returned via the thread control block.
◆ _CORE_RWLock_Release()
Release the RWLock.
This routine manually releases the_rwlock. All of the threads waiting for the RWLock will be readied.
- Parameters
-
[in] | the_rwlock | is the RWLock to surrender |
- Return values
-
Status | is returned to indicate successful or failure. |