Go to the documentation of this file.
47 size_t arg_nbytes = nbytes;
54 p_eventual->nbytes = arg_nbytes;
55 if (arg_nbytes == 0) {
56 p_eventual->value = NULL;
58 abt_errno =
ABTU_malloc(arg_nbytes, &p_eventual->value);
106 if (p_eventual->
value)
169 #ifndef ABT_CONFIG_ENABLE_VER_20_API
192 *value = p_eventual->
value;
245 *value = p_eventual->
value;
306 size_t arg_nbytes = nbytes;
307 #ifndef ABT_CONFIG_ENABLE_VER_20_API
319 if (p_eventual->
value)
320 memcpy(p_eventual->
value, value, arg_nbytes);
int ABT_eventual_reset(ABT_eventual eventual)
Reset a readiness of an eventual.
int ABT_bool
Boolean type.
static void ABTI_waitlist_broadcast(ABTI_local *p_local, ABTI_waitlist *p_waitlist)
static ABT_eventual ABTI_eventual_get_handle(ABTI_eventual *p_eventual)
#define ABTI_CHECK_ERROR(abt_errno)
#define ABTI_THREAD_TYPE_YIELDABLE
#define ABTI_IS_ERROR_CHECK_ENABLED
static ABTI_eventual * ABTI_eventual_get_ptr(ABT_eventual eventual)
static void ABTD_spinlock_acquire(ABTD_spinlock *p_lock)
#define ABTI_HANDLE_ERROR(n)
static ABTU_ret_err int ABTU_malloc(size_t size, void **p_ptr)
int ABT_eventual_free(ABT_eventual *eventual)
Free an eventual.
struct ABT_eventual_opaque * ABT_eventual
Eventual handle type.
static ABTI_local * ABTI_local_get_local(void)
#define ABT_SUCCESS
Error code: the routine returns successfully.
#define ABTI_CHECK_NULL_EVENTUAL_PTR(p)
#define ABT_TRUE
True constant for ABT_bool.
int ABT_eventual_wait(ABT_eventual eventual, void **value)
Wait on an eventual.
static void ABTD_spinlock_clear(ABTD_spinlock *p_lock)
#define ABT_FALSE
False constant for ABT_bool.
#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)
struct ABTI_local ABTI_local
int ABT_eventual_test(ABT_eventual eventual, void **value, ABT_bool *is_ready)
Check if an eventual is ready.
#define ABTI_CHECK_TRUE(cond, abt_errno)
static void ABTI_waitlist_init(ABTI_waitlist *p_waitlist)
static ABTI_xstream * ABTI_local_get_xstream(ABTI_local *p_local)
static void ABTI_waitlist_wait_and_unlock(ABTI_local **pp_local, ABTI_waitlist *p_waitlist, ABTD_spinlock *p_lock, ABT_sync_event_type sync_event_type, void *p_sync)
#define ABT_ERR_EVENTUAL
Error code: error related to an eventual.
int ABT_eventual_set(ABT_eventual eventual, void *value, int nbytes)
Signal an eventual.
#define ABT_ERR_INV_EVENTUAL
Error code: invalid eventual.
int ABT_eventual_create(int nbytes, ABT_eventual *neweventual)
Create a new eventual.
#define ABT_EVENTUAL_NULL