ARGOBOTS  c6511494322293e01714f56f341b8d2b22c1e3c1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions
Barrier

Functions

int ABT_barrier_create (uint32_t num_waiters, ABT_barrier *newbarrier)
 Create a new barrier. More...
 
int ABT_barrier_reinit (ABT_barrier barrier, uint32_t num_waiters)
 Reinitialize the barrier. More...
 
int ABT_barrier_free (ABT_barrier *barrier)
 Free the barrier. More...
 
int ABT_barrier_wait (ABT_barrier barrier)
 Wait on the barrier. More...
 
int ABT_barrier_get_num_waiters (ABT_barrier barrier, uint32_t *num_waiters)
 Get the number of waiters for the barrier. More...
 

Detailed Description

This group is for Barrier.

Function Documentation

int ABT_barrier_create ( uint32_t  num_waiters,
ABT_barrier newbarrier 
)

Create a new barrier.

ABT_barrier_create() creates a new barrier and returns its handle through newbarrier. If an error occurs in this routine, a non-zero error code will be returned and newbarrier will be set to ABT_BARRIER_NULL.

Parameters
[in]num_waitersnumber of waiters
[out]newbarrierhandle to a new barrier
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 26 of file barrier.c.

int ABT_barrier_free ( ABT_barrier barrier)

Free the barrier.

ABT_barrier_free() deallocates the memory used for the barrier object associated with the handle barrier. If it is successfully processed, barrier is set to ABT_BARRIER_NULL.

Parameters
[in,out]barrierhandle to the barrier
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 115 of file barrier.c.

int ABT_barrier_get_num_waiters ( ABT_barrier  barrier,
uint32_t *  num_waiters 
)

Get the number of waiters for the barrier.

ABT_barrier_get_num_waiters() returns the number of waiters, which was passed to ABT_barrier_create() or ABT_barrier_reinit(), for the given barrier barrier.

Parameters
[in]barrierhandle to the barrier
[out]num_waitersnumber of waiters
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 242 of file barrier.c.

int ABT_barrier_reinit ( ABT_barrier  barrier,
uint32_t  num_waiters 
)

Reinitialize the barrier.

ABT_barrier_reinit() reinitializes the barrier barrier with a new number of waiters num_waiters. num_waiters can be the same as or different from the one passed to ABT_barrier_create().

Parameters
[in]barrierhandle to the barrier
[in]num_waitersnumber of waiters
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 69 of file barrier.c.

int ABT_barrier_wait ( ABT_barrier  barrier)

Wait on the barrier.

The ULT calling ABT_barrier_wait() waits on the barrier until all the ULTs reach the barrier.

Parameters
[in]barrierhandle to the barrier
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 148 of file barrier.c.