ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
Go to the documentation of this file.
50 #ifndef ABT_CONFIG_ENABLE_VER_20_API
62 p_newbarrier->num_waiters = num_waiters;
63 #ifdef HAVE_PTHREAD_BARRIER_INIT
64 abt_errno = ABTD_xstream_barrier_init(num_waiters, &p_newbarrier->bar);
71 p_newbarrier->counter = 0;
113 #ifdef HAVE_PTHREAD_BARRIER_INIT
114 ABTD_xstream_barrier_destroy(&p_barrier->
bar);
154 #ifdef HAVE_PTHREAD_BARRIER_INIT
155 ABTD_xstream_barrier_wait(&p_barrier->
bar);
161 p_barrier->counter++;
162 if (p_barrier->counter == p_barrier->
num_waiters) {
164 p_barrier->counter = 0;
168 uint64_t new_tag = (cur_tag + 1) & (UINT64_MAX >> 1);
static uint64_t ABTD_atomic_relaxed_load_uint64(const ABTD_atomic_uint64 *ptr)
int ABT_xstream_barrier_free(ABT_xstream_barrier *barrier)
Free an execution-stream barrier.
static void ABTD_atomic_relaxed_store_uint64(ABTD_atomic_uint64 *ptr, uint64_t val)
static ABTI_xstream_barrier * ABTI_xstream_barrier_get_ptr(ABT_xstream_barrier barrier)
#define ABTI_CHECK_ERROR(abt_errno)
int ABT_xstream_barrier_wait(ABT_xstream_barrier barrier)
Wait on an execution-stream barrier.
#define ABTI_IS_ERROR_CHECK_ENABLED
static uint64_t ABTD_atomic_acquire_load_uint64(const ABTD_atomic_uint64 *ptr)
static ABT_xstream_barrier ABTI_xstream_barrier_get_handle(ABTI_xstream_barrier *p_barrier)
static void ABTD_atomic_release_store_uint64(ABTD_atomic_uint64 *ptr, uint64_t val)
static void ABTD_spinlock_acquire(ABTD_spinlock *p_lock)
#define ABTI_CHECK_NULL_XSTREAM_BARRIER_PTR(p)
#define ABTI_HANDLE_ERROR(n)
static void ABTD_atomic_pause(void)
static ABTU_ret_err int ABTU_malloc(size_t size, void **p_ptr)
ABT_bool ABTI_initialized(void)
#define ABT_SUCCESS
Error code: the routine returns successfully.
#define ABT_XSTREAM_BARRIER_NULL
struct ABT_xstream_barrier_opaque * ABT_xstream_barrier
Execution-stream barrier handle type.
static void ABTD_spinlock_clear(ABTD_spinlock *p_lock)
#define ABTI_UB_ASSERT(cond)
#define ABT_ERR_INV_ARG
Error code: invalid user argument.
static void ABTU_free(void *ptr)
static void ABTD_spinlock_release(ABTD_spinlock *p_lock)
#define ABTI_CHECK_TRUE(cond, abt_errno)
int ABT_xstream_barrier_create(uint32_t num_waiters, ABT_xstream_barrier *newbarrier)
Create a new execution-stream barrier.