ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
This group is for Execution-Stream Barrier. More...
Typedefs | |
typedef struct ABT_xstream_barrier_opaque * | ABT_xstream_barrier |
Execution-stream barrier handle type. More... | |
Functions | |
int | ABT_xstream_barrier_create (uint32_t num_waiters, ABT_xstream_barrier *newbarrier) |
Create a new execution-stream barrier. More... | |
int | ABT_xstream_barrier_free (ABT_xstream_barrier *barrier) |
Free an execution-stream barrier. More... | |
int | ABT_xstream_barrier_wait (ABT_xstream_barrier barrier) |
Wait on an execution-stream barrier. More... | |
This group is for Execution-Stream Barrier.
typedef struct ABT_xstream_barrier_opaque* ABT_xstream_barrier |
int ABT_xstream_barrier_create | ( | uint32_t | num_waiters, |
ABT_xstream_barrier * | newbarrier | ||
) |
Create a new execution-stream barrier.
ABT_xstream_barrier_create()
creates a new execution-stream barrier and returns its handle through newbarrier
. num_waiters
specifies the number of waiters that must call ABT_xstream_barrier_wait()
before any of the waiters successfully return from the call. num_waiters
must be greater than zero.
newbarrier
must be freed by ABT_xstream_barrier_free()
after its use.
newbarrier
is set to ABT_XSTREAM_BARRIER_NULL
if an error occurs.newbarrier
is not updated if an error occurs. newbarrier
when an error occurs. ABT_SUCCESS
is returned if this routine succeeds.ABT_ERR_INV_ARG
is returned if num_waiters
is zero.ABT_ERR_MEM
is returned if memory allocation fails.ABT_ERR_SYS
is returned if an error related to system calls and standard libraries occurs.newbarrier
is NULL
, the results are undefined.[in] | num_waiters | number of waiters |
[out] | newbarrier | execution-stream barrier handle |
Definition at line 44 of file stream_barrier.c.
int ABT_xstream_barrier_free | ( | ABT_xstream_barrier * | barrier | ) |
Free an execution-stream barrier.
ABT_xstream_barrier_free()
deallocates the resource used for the execution-stream barrier barrier
and sets barrier
to ABT_XSTREAM_BARRIER_NULL
.
ABT_SUCCESS
is returned if this routine succeeds.ABT_ERR_INV_XSTREAM_BARRIER
is returned if barrier
points to ABT_XSTREAM_BARRIER_NULL
.barrier
is NULL
, the results are undefined.barrier
, the results are undefined.barrier
is accessed after calling this routine, the results are undefined.[in,out] | barrier | execution-stream barrier handle |
Definition at line 104 of file stream_barrier.c.
int ABT_xstream_barrier_wait | ( | ABT_xstream_barrier | barrier | ) |
Wait on an execution-stream barrier.
The caller of ABT_xstream_barrier_wait()
waits on the execution-stream barrier barrier
. The caller is blocked until as many waiters as the number of waiters specified by ABT_xstream_barrier_create()
reach barrier
. If the caller is either a ULT or a tasklet, the underlying execution stream is blocked on barrier
.
ABT_SUCCESS
is returned if this routine succeeds.ABT_ERR_INV_XSTREAM_BARRIER
is returned if barrier
is ABT_XSTREAM_BARRIER_NULL
.[in] | barrier | execution-stream barrier handle |
Definition at line 146 of file stream_barrier.c.