|
RTEMS CPU Kit with SuperCore
4.10.99.0
|
Classic API Barrier Manager. More...
|
Data Structures | |
| struct | Barrier_Control |
| This type defines the control block used to manage each barrier. More... | |
Defines | |
| #define | RTEMS_BARRIER_EXTERN extern |
| Instantiate Barrier Data. | |
Functions | |
| void | _Barrier_Manager_initialization (void) |
| _Barrier_Manager_initialization | |
| rtems_status_code | rtems_barrier_create (rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id) |
| RTEMS Create Barrier. | |
| rtems_status_code | rtems_barrier_ident (rtems_name name, rtems_id *id) |
| RTEMS Barrier name to Id. | |
| rtems_status_code | rtems_barrier_delete (rtems_id id) |
| RTEMS Delete Barrier. | |
| rtems_status_code | rtems_barrier_wait (rtems_id id, rtems_interval timeout) |
| RTEMS Barrier Wait. | |
| rtems_status_code | rtems_barrier_release (rtems_id id, uint32_t *released) |
| RTEMS Barrier Release. | |
| rtems_status_code | _Barrier_Translate_core_barrier_return_code (CORE_barrier_Status the_status) |
| Translate SuperCore Barrier Status Code to RTEMS Status Code. | |
| RTEMS_INLINE_ROUTINE Barrier_Control * | _Barrier_Allocate (void) |
| _Barrier_Allocate | |
| RTEMS_INLINE_ROUTINE void | _Barrier_Free (Barrier_Control *the_barrier) |
| _Barrier_Free | |
| RTEMS_INLINE_ROUTINE Barrier_Control * | _Barrier_Get (Objects_Id id, Objects_Locations *location) |
| _Barrier_Get | |
| RTEMS_INLINE_ROUTINE bool | _Barrier_Is_null (Barrier_Control *the_barrier) |
| _Barrier_Is_null | |
Variables | |
|
RTEMS_BARRIER_EXTERN Objects_Information | _Barrier_Information |
| The following defines the information control block used to manage this class of objects. | |
Classic API Barrier Manager.
Inline Implementation from Barrier Manager.
This encapsulates functionality which implements the Classic API Barrier Manager.
This include file contains all the constants and structures associated with the Barrier Manager.
Directives provided are:
This file contains the static inlin implementation of the inlined routines from the Barrier Manager.
| #define RTEMS_BARRIER_EXTERN extern |
Instantiate Barrier Data.
Barrier Manager -- Instantiate Data
This constant is defined to extern most of the time when using this header file. However by defining it to nothing, the data declared in this header file can be instantiated. This is done in a single per manager file.
| RTEMS_INLINE_ROUTINE Barrier_Control* _Barrier_Allocate | ( | void | ) |
_Barrier_Allocate
This function allocates a barrier control block from the inactive chain of free barrier control blocks.
References _Objects_Allocate(), and _Barrier_Information.
| RTEMS_INLINE_ROUTINE void _Barrier_Free | ( | Barrier_Control * | the_barrier | ) |
_Barrier_Free
This routine frees a barrier control block to the inactive chain of free barrier control blocks.
References _Objects_Free(), _Barrier_Information, and Barrier_Control::Object.
| RTEMS_INLINE_ROUTINE Barrier_Control* _Barrier_Get | ( | Objects_Id | id, |
| Objects_Locations * | location | ||
| ) |
_Barrier_Get
This function maps barrier IDs to barrier control blocks. If ID corresponds to a local barrier, then it returns the_barrier control pointer which maps to ID and location is set to OBJECTS_LOCAL. if the barrier ID is global and resides on a remote node, then location is set to OBJECTS_REMOTE, and the_barrier is undefined. Otherwise, location is set to OBJECTS_ERROR and the_barrier is undefined.
References _Objects_Get(), and _Barrier_Information.
| RTEMS_INLINE_ROUTINE bool _Barrier_Is_null | ( | Barrier_Control * | the_barrier | ) |
_Barrier_Is_null
This function returns TRUE if the_barrier is NULL and FALSE otherwise.
| void _Barrier_Manager_initialization | ( | void | ) |
_Barrier_Manager_initialization
This routine performs the initialization necessary for this manager.
| rtems_status_code _Barrier_Translate_core_barrier_return_code | ( | CORE_barrier_Status | the_status | ) |
Translate SuperCore Barrier Status Code to RTEMS Status Code.
This function returns a RTEMS status code based on the barrier status code specified.
| [in] | the_status | is the SuperCore Barrier status to translate. |
| a | status code indicating success or the reason for failure. |
| rtems_status_code rtems_barrier_create | ( | rtems_name | name, |
| rtems_attribute | attribute_set, | ||
| uint32_t | maximum_waiters, | ||
| rtems_id * | id | ||
| ) |
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.
| [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. |
| a | status code indicating success or the reason for failure. |
| rtems_status_code rtems_barrier_delete | ( | rtems_id | id | ) |
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.
| [in] | id | indicates the barrier to delete |
| a | status code indicating success or the reason for failure. |
| rtems_status_code rtems_barrier_ident | ( | rtems_name | name, |
| rtems_id * | id | ||
| ) |
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.
| [in] | name | is the name of this barrier instance. |
| [out] | id | will contain the id of this barrier. |
| a | status code indicating success or the reason for failure. |
| rtems_status_code rtems_barrier_release | ( | rtems_id | id, |
| uint32_t * | released | ||
| ) |
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.
| [in] | id | indicates the barrier to wait at. |
| [out] | released | will contain the number of threads unblocked. |
| a | status code indicating success or the reason for failure. |
| rtems_status_code rtems_barrier_wait | ( | rtems_id | id, |
| rtems_interval | timeout | ||
| ) |
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.
| [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. |
| a | status code indicating success or the reason for failure. |
1.7.5