ARGOBOTS
be805649b56a69fc4df1b6bc4efbc8911b854459
|
Go to the documentation of this file.
19 .get_migr_pool = NULL,
26 #ifdef ABT_CONFIG_USE_SCHED_SLEEP
27 struct timespec sleep_time;
50 #ifdef ABT_CONFIG_USE_SCHED_SLEEP
51 p_data->sleep_time.tv_sec = 0;
63 p_data->event_freq = event_freq;
69 p_data->num_pools = num_pools;
76 memcpy(p_data->pools, p_sched->
pools,
sizeof(
ABT_pool) * num_pools);
78 p_sched->
data = p_data;
87 uint32_t work_count = 0;
92 unsigned seed = time(NULL);
100 pools = p_data->
pools;
114 }
else if (num_pools > 1) {
117 (num_pools == 2) ? 1 : (rand_r(&seed) % (num_pools - 1) + 1);
118 pool = pools[target];
#define ABTI_CHECK_NULL_SCHED_PTR(p)
static ABTI_sched * ABTI_sched_get_ptr(ABT_sched sched)
uint64_t sched_sleep_nsec
ABT_bool ABTI_sched_has_to_stop(ABTI_sched *p_sched)
ABT_sched_type type
Unused value.
struct ABT_thread_opaque * ABT_thread
Work unit handle type.
static ABTI_global * ABTI_global_get_global(void)
static int sched_init(ABT_sched sched, ABT_sched_config config)
#define ABT_POOL_CONTEXT_OWNER_SECONDARY
A flag that hints a secondary ownership of a pool.
#define ABTI_CHECK_ERROR(abt_errno)
struct ABT_sched_config_opaque * ABT_sched_config
Scheduler configuration handle type.
#define ABTI_IS_ERROR_CHECK_ENABLED
struct ABT_pool_opaque * ABT_pool
Pool handle type.
static ABT_thread ABTI_pool_pop(ABTI_pool *p_pool, ABT_pool_context context)
struct ABT_sched_opaque * ABT_sched
Scheduler handle type.
#define ABTI_HANDLE_ERROR(n)
static ABT_sched_def sched_randws_def
static ABTU_ret_err int ABTU_malloc(size_t size, void **p_ptr)
uint32_t sched_event_freq
ABTU_ret_err int ABTI_sched_config_read(const ABTI_sched_config *p_config, int idx, void *p_val)
#define ABTI_ASSERT(cond)
static ABTI_local * ABTI_local_get_local(void)
#define ABT_SUCCESS
Error code: the routine returns successfully.
void ABTI_xstream_check_events(ABTI_xstream *p_xstream, ABTI_sched *p_sched)
static void ABTI_ythread_schedule(ABTI_global *p_global, ABTI_xstream **pp_local_xstream, ABTI_thread *p_thread)
#define ABT_TRUE
True constant for ABT_bool.
static ABTI_pool * ABTI_pool_get_ptr(ABT_pool pool)
static void sched_run(ABT_sched sched)
static void ABTU_free(void *ptr)
A struct that defines a scheduler.
#define ABT_POOL_CONTEXT_OWNER_PRIMARY
A flag that hints a primary ownership of a pool.
#define SCHED_SLEEP(c, t)
ABT_sched_config_var ABT_sched_basic_freq
Predefined ABT_sched_config_var to configure the frequency for checking events of the basic scheduler...
static ABTI_xstream * ABTI_local_get_xstream(ABTI_local *p_local)
ABT_sched_def * ABTI_sched_get_randws_def(void)
static int sched_free(ABT_sched)
static ABTI_thread * ABTI_thread_get_ptr(ABT_thread thread)
static ABTI_sched_config * ABTI_sched_config_get_ptr(ABT_sched_config config)