This encapsulates functionality which implements the Classic API Barrier Manager.
◆ rtems_barrier_create()
RTEMS Create Barrier.
Barrier Manager – Create a Barrier Instance
This routine implements the rtems_barrier_create directive. The barrier will have the name name. The starting count for the barrier is count. The attribute_set determines if the barrier is global or local and the thread queue discipline. It returns the id of the created barrier in ID.
- Parameters
-
[in] | name | is the name of this barrier instance. |
[in] | attribute_set | specifies the attributes of this barrier instance. |
[in] | maximum_waiters | is the maximum number of threads which will be allowed to concurrently wait at the barrier. |
[out] | id | will contain the id of this barrier. |
- Return values
-
a | status code indicating success or the reason for failure. |
◆ rtems_barrier_delete()
RTEMS Delete Barrier.
This routine implements the rtems_barrier_delete directive. The barrier indicated by id is deleted. The barrier is freed back to the inactive barrier chain.
- Parameters
-
[in] | id | indicates the barrier to delete |
- Return values
-
a | status code indicating success or the reason for failure. |
◆ rtems_barrier_ident()
RTEMS Barrier name to Id.
This routine implements the rtems_barrier_ident directive. This directive returns the barrier ID associated with name. If more than one barrier is named name, then the barrier to which the ID belongs is arbitrary. node indicates the extent of the search for the ID of the barrier named name. The search can be limited to a particular node or allowed to encompass all nodes.
- Parameters
-
[in] | name | is the name of this barrier instance. |
[out] | id | will contain the id of this barrier. |
- Return values
-
a | status code indicating success or the reason for failure. |
◆ rtems_barrier_release()
RTEMS Barrier Release.
Barrier Manager – Release Tasks Waitng at a Barrier
This routine implements the rtems_barrier_release directive. It unblocks all of the threads waiting on the barrier associated with id. The number of threads unblocked is returned in released.
- Parameters
-
[in] | id | indicates the barrier to wait at. |
[out] | released | will contain the number of threads unblocked. |
- Return values
-
a | status code indicating success or the reason for failure. |
◆ rtems_barrier_wait()
RTEMS Barrier Wait.
This routine implements the rtems_barrier_wait directive. It attempts to wait at the barrier associated with id. The calling task may block waiting for the barrier with an optional timeout of timeout clock ticks.
- Parameters
-
[in] | id | indicates the barrier to wait at. |
[in] | timeout | is the maximum length of time in ticks the calling thread is willing to block. |
- Return values
-
a | status code indicating success or the reason for failure. |