ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
Go to the documentation of this file.
53 size_t arg_nbytes = nbytes;
60 p_eventual->nbytes = arg_nbytes;
61 if (arg_nbytes == 0) {
62 p_eventual->value = NULL;
64 abt_errno =
ABTU_malloc(arg_nbytes, &p_eventual->value);
116 if (p_eventual->
value)
181 #ifndef ABT_CONFIG_ENABLE_VER_20_API
204 *value = p_eventual->
value;
260 *value = p_eventual->
value;
324 size_t arg_nbytes = nbytes;
325 #ifndef ABT_CONFIG_ENABLE_VER_20_API
337 if (p_eventual->
value)
338 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
A struct that can be converted to ABT_eventual.
#define ABTI_IS_ERROR_CHECK_ENABLED
static ABTI_eventual * ABTI_eventual_get_ptr(ABT_eventual eventual)
static ABT_bool ABTI_waitlist_is_empty(ABTI_waitlist *p_waitlist)
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)
ABT_bool ABTI_initialized(void)
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 ABTI_STATIC_ASSERT(cond)
#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 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)
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