Go to the documentation of this file.
185 int abt_errno, init_stage = 0;
208 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
211 p_global->tool_thread_cb_f = NULL;
212 p_global->tool_thread_user_arg = NULL;
220 p_global->p_xstream_head = NULL;
221 p_global->num_xstreams = 0;
240 p_local_xstream, &p_primary_ythread);
249 p_global->p_primary_ythread = p_primary_ythread;
250 p_local_xstream->p_thread = &p_primary_ythread->
thread;
256 if (p_global->print_config ==
ABT_TRUE) {
262 if (init_stage >= 2) {
267 if (init_stage >= 1) {
295 "ABT_finalize must be called by the primary ES.");
300 "ABT_finalize must be called by the primary ULT.");
304 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
323 p_local_xstream->p_thread = NULL;
#define ABT_ERR_INV_THREAD
Error code: invalid work unit.
#define ABTD_SPINLOCK_STATIC_INITIALIZER()
static void ABTD_atomic_relaxed_store_uint64(ABTD_atomic_uint64 *ptr, uint64_t val)
#define ABT_ERR_UNINITIALIZED
Error code: Argobots it not initialized.
@ ABTI_XSTREAM_TYPE_PRIMARY
static uint32_t ABTD_atomic_acquire_load_uint32(const ABTD_atomic_uint32 *ptr)
#define ABT_ERR_INV_XSTREAM
Error code: invalid execution stream.
static ABTU_ret_err int init_library(void)
static ABTI_global * ABTI_global_get_global(void)
ABTI_global * gp_ABTI_global
void ABTI_pool_reset_id(void)
#define ABTI_CHECK_ERROR(abt_errno)
#define ABTI_THREAD_REQ_ORPHAN
#define ABTI_CHECK_TRUE_MSG(cond, abt_errno, msg)
ABTU_ret_err int ABTI_ythread_create_primary(ABTI_global *p_global, ABTI_local *p_local, ABTI_xstream *p_xstream, ABTI_ythread **p_ythread)
#define ABTI_CHECK_YIELDABLE(p_thread, pp_ythread, abt_errno)
int ABT_finalize(void)
Finalize the Argobots execution environment.
#define ABTD_ATOMIC_UINT32_STATIC_INITIALIZER(val)
ABTU_ret_err int ABTI_mem_init(ABTI_global *p_global)
int ABT_init(int argc, char **argv)
Initialize the Argobots execution environment.
#define ABTI_THREAD_TYPE_PRIMARY
static void ABTD_spinlock_acquire(ABTD_spinlock *p_lock)
#define ABTI_HANDLE_ERROR(n)
void ABTI_xstream_free(ABTI_global *p_global, ABTI_local *p_local, ABTI_xstream *p_xstream, ABT_bool force_free)
static ABTU_ret_err int ABTU_malloc(size_t size, void **p_ptr)
void ABTI_sched_finish(ABTI_sched *p_sched)
static void ABTD_atomic_relaxed_store_int(ABTD_atomic_int *ptr, int val)
void ABTI_mem_finalize(ABTI_global *p_global)
void ABTI_unit_finalize_hash_table(ABTI_global *p_global)
ABTI_sched * p_main_sched
void ABTI_sched_reset_id(void)
#define ABTI_ASSERT(cond)
static ABTI_local * ABTI_local_get_local(void)
void ABTI_unit_init_hash_table(ABTI_global *p_global)
static void ABTI_local_set_xstream(ABTI_xstream *p_local_xstream)
#define ABT_SUCCESS
Error code: the routine returns successfully.
void ABTD_env_init(ABTI_global *p_global)
void ABTD_affinity_finalize(ABTI_global *p_global)
ABTI_xstream * p_xstream_head
static ABTI_xstream * ABTI_local_get_xstream_or_null(ABTI_local *p_local)
#define ABTI_IS_EXT_THREAD_ENABLED
static uint32_t g_ABTI_num_inits
static ABTI_local * ABTI_xstream_get_local(ABTI_xstream *p_xstream)
#define ABT_TRUE
True constant for ABT_bool.
static void ABTD_spinlock_clear(ABTD_spinlock *p_lock)
void ABTI_xstream_start_primary(ABTI_global *p_global, ABTI_xstream **pp_local_xstream, ABTI_xstream *p_xstream, ABTI_ythread *p_ythread)
int ABT_initialized(void)
Check if the Argobots execution environment has been initialized.
void ABTI_ythread_free_primary(ABTI_global *p_global, ABTI_local *p_local, ABTI_ythread *p_ythread)
static void ABTU_free(void *ptr)
static void ABTD_spinlock_release(ABTD_spinlock *p_lock)
static void ABTI_global_set_global(ABTI_global *p_global)
ABTI_xstream * p_last_xstream
static ABTU_ret_err int finailze_library(void)
struct ABTI_local ABTI_local
static void ABTI_ythread_yield(ABTI_xstream **pp_local_xstream, ABTI_ythread *p_ythread, ABT_sync_event_type sync_event_type, void *p_sync)
static ABTD_atomic_uint32 g_ABTI_initialized
#define ABTI_CHECK_TRUE(cond, abt_errno)
@ ABT_THREAD_STATE_RUNNING
void ABTI_thread_reset_id(void)
static void ABTD_atomic_release_store_uint32(ABTD_atomic_uint32 *ptr, uint32_t val)
static ABTI_xstream * ABTI_local_get_xstream(ABTI_local *p_local)
ABTU_ret_err int ABTI_xstream_create_primary(ABTI_global *p_global, ABTI_xstream **pp_xstream)
static ABTD_spinlock g_ABTI_init_lock
void ABTI_info_print_config(ABTI_global *p_global, FILE *fp)
static void ABTI_thread_set_request(ABTI_thread *p_thread, uint32_t req)