RTEMS CPU Kit with SuperCore  4.10.99.0
Data Structures | Modules | Functions
Barriers
RTEMS Classic API

Classic API Barrier Manager. More...

Collaboration diagram for Barriers:

Data Structures

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

Modules

 Classic Barrier Implementation

Functions

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.

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_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.
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.
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_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.
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.