This handler encapsulates functionality which provides the foundation Barrier services used in all of the APIs supported by RTEMS.
More...
This handler encapsulates functionality which provides the foundation Barrier services used in all of the APIs supported by RTEMS.
◆ _CORE_barrier_Flush
#define _CORE_barrier_Flush |
( |
|
_the_barrier, |
|
|
|
_remote_extract_callout, |
|
|
|
_status |
|
) |
| |
Value: &((_the_barrier)->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 barrier by flushing the associated wait queue.
- Parameters
-
[in] | _the_barrier | is the barrier 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_BARRIER_STATUS_LAST
◆ CORE_barrier_Disciplines
Flavors of barriers.
Enumerator |
---|
CORE_BARRIER_AUTOMATIC_RELEASE | This specifies that the barrier will automatically release when the user specified number of threads have arrived at the barrier.
|
CORE_BARRIER_MANUAL_RELEASE | This specifies that the user will have to manually release the barrier in order to release the waiting threads.
|
◆ CORE_barrier_Status
Core Barrier handler return statuses.
Enumerator |
---|
CORE_BARRIER_STATUS_SUCCESSFUL | This status indicates that the operation completed successfully.
|
CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED | This status indicates that the barrier is configured for automatic release and the caller tripped the automatic release.
The caller thus did not block.
|
CORE_BARRIER_WAS_DELETED | This status indicates that the thread was blocked waiting for an operation to complete and the barrier was deleted.
|
CORE_BARRIER_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_barrier_Get_number_of_waiting_threads()
This routine returns the number of threads currently waiting at the barrier.
- Parameters
-
[in] | the_barrier | is the barrier to obtain the number of blocked threads for |
- Returns
- the current count of this barrier
References CORE_barrier_Control::number_of_waiting_threads.
◆ _CORE_barrier_Initialize()
◆ _CORE_barrier_Is_automatic()
◆ _CORE_barrier_Release()
◆ _CORE_barrier_Wait()
Wait for the barrier.
This routine wait for the barrier to be released. If the barrier is set to automatic and this is the appropriate thread, then it returns immediately. Otherwise, the calling thread is blocked until the barrier is released.
- Parameters
-
[in] | the_barrier | is the barrier to wait for |
[in,out] | executing | The currently executing thread. |
[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_barrier_mp_support | is the routine to invoke if the thread unblocked is remote |
- Note
- Status is returned via the thread control block.