RTEMS CPU Kit with SuperCore  4.11.3
Modules | Files | Data Structures | Functions

Classic API Barrier Manager. More...

Collaboration diagram for Barriers:

Modules

 Classic Barrier Implementation
 

Files

file  barrier.c
 RTEMS Barrier Manager Initialization.
 
file  barriercreate.c
 RTEMS Create Barrier.
 
file  barrierdata.c
 Instantiate Barrier Data.
 
file  barrierdelete.c
 RTEMS Delete Barrier.
 
file  barrierident.c
 RTEMS Barrier name to Id.
 
file  barrierrelease.c
 RTEMS Barrier Release.
 
file  barriertranslatereturncode.c
 Translate SuperCore Barrier Status Code to RTEMS Status Code.
 
file  barrierwait.c
 RTEMS Barrier Wait.
 

Data Structures

struct  Barrier_Control
 This type defines the control block used to manage each barrier. More...
 

Functions

rtems_status_code rtems_barrier_create (rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id)
 RTEMS Create Barrier. More...
 
rtems_status_code rtems_barrier_ident (rtems_name name, rtems_id *id)
 RTEMS Barrier name to Id. More...
 
rtems_status_code rtems_barrier_delete (rtems_id id)
 RTEMS Delete Barrier. More...
 
rtems_status_code rtems_barrier_wait (rtems_id id, rtems_interval timeout)
 RTEMS Barrier Wait. More...
 
rtems_status_code rtems_barrier_release (rtems_id id, uint32_t *released)
 RTEMS Barrier Release. More...
 

Detailed Description

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.

Function Documentation

◆ rtems_barrier_create()

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.

Parameters
[in]nameis the name of this barrier instance.
[in]attribute_setspecifies the attributes of this barrier instance.
[in]maximum_waitersis the maximum number of threads which will be allowed to concurrently wait at the barrier.
[out]idwill contain the id of this barrier.
Return values
astatus code indicating success or the reason for failure.

References _Attributes_Is_barrier_automatic(), _Barrier_Allocate(), _Barrier_Information, _CORE_barrier_Initialize(), _Objects_Allocator_unlock(), _Objects_Open(), Barrier_Control::attribute_set, Barrier_Control::Barrier, CORE_BARRIER_AUTOMATIC_RELEASE, CORE_BARRIER_MANUAL_RELEASE, CORE_barrier_Attributes::discipline, Objects_Control::id, CORE_barrier_Attributes::maximum_count, Barrier_Control::Object, RTEMS_INVALID_ADDRESS, RTEMS_INVALID_NAME, RTEMS_INVALID_NUMBER, rtems_is_name_valid(), RTEMS_SUCCESSFUL, and RTEMS_TOO_MANY.

◆ rtems_barrier_delete()

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.

Parameters
[in]idindicates the barrier to delete
Return values
astatus code indicating success or the reason for failure.

References _Barrier_Get(), and _Objects_Allocator_lock().

◆ rtems_barrier_ident()

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.

Parameters
[in]nameis the name of this barrier instance.
[out]idwill contain the id of this barrier.
Return values
astatus code indicating success or the reason for failure.

◆ rtems_barrier_release()

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.

Parameters
[in]idindicates the barrier to wait at.
[out]releasedwill contain the number of threads unblocked.
Return values
astatus code indicating success or the reason for failure.

References _Barrier_Get(), and RTEMS_INVALID_ADDRESS.

◆ rtems_barrier_wait()

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.

Parameters
[in]idindicates the barrier to wait at.
[in]timeoutis the maximum length of time in ticks the calling thread is willing to block.
Return values
astatus code indicating success or the reason for failure.