ARGOBOTS
c6511494322293e01714f56f341b8d2b22c1e3c1
|
#include <stdio.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/time.h>
Go to the source code of this file.
Data Structures | |
struct | ABT_sched_config_var |
struct | ABT_sched_def |
struct | ABT_pool_def |
Macros | |
#define | ABT_API_PUBLIC |
#define | ABT_VERSION "1.1a1" |
#define | ABT_NUMVERSION 10100001 |
#define | ABT_RELEASE_TYPE_ALPHA 0 |
#define | ABT_RELEASE_TYPE_BETA 1 |
#define | ABT_RELEASE_TYPE_RC 2 |
#define | ABT_RELEASE_TYPE_PATCH 3 |
#define | ABT_CALC_VERSION(MAJOR, MINOR, REVISION, TYPE, PATCH) (((MAJOR) * 10000000) + ((MINOR) * 100000) + ((REVISION) * 1000) + ((TYPE) * 100) + (PATCH)) |
#define | ABT_DEPRECATED __attribute__((deprecated)) |
#define | ABT_SUCCESS 0 /* Successful return code */ |
#define | ABT_ERR_UNINITIALIZED 1 /* Uninitialized */ |
#define | ABT_ERR_MEM 2 /* Memory allocation failure */ |
#define | ABT_ERR_OTHER 3 /* Other error */ |
#define | ABT_ERR_INV_XSTREAM 4 /* Invalid ES */ |
#define | ABT_ERR_INV_XSTREAM_RANK 5 /* Invalid ES rank */ |
#define | ABT_ERR_INV_XSTREAM_BARRIER 6 /* Invalid ES barrier */ |
#define | ABT_ERR_INV_SCHED 7 /* Invalid scheduler */ |
#define | ABT_ERR_INV_SCHED_KIND 8 /* Invalid scheduler kind */ |
#define | ABT_ERR_INV_SCHED_PREDEF 9 /* Invalid predefined scheduler */ |
#define | ABT_ERR_INV_SCHED_TYPE 10 /* Invalid scheduler type */ |
#define | ABT_ERR_INV_SCHED_CONFIG 11 /* Invalid scheduler config */ |
#define | ABT_ERR_INV_POOL 12 /* Invalid pool */ |
#define | ABT_ERR_INV_POOL_KIND 13 /* Invalid pool kind */ |
#define | ABT_ERR_INV_POOL_ACCESS 14 /* Invalid pool access mode */ |
#define | ABT_ERR_INV_UNIT 15 /* Invalid scheduling unit */ |
#define | ABT_ERR_INV_THREAD 16 /* Invalid ULT */ |
#define | ABT_ERR_INV_THREAD_ATTR 17 /* Invalid ULT attribute */ |
#define | ABT_ERR_INV_TASK ABT_ERR_INV_THREAD |
#define | ABT_ERR_INV_KEY 19 /* Invalid key */ |
#define | ABT_ERR_INV_MUTEX 20 /* Invalid mutex */ |
#define | ABT_ERR_INV_MUTEX_ATTR 21 /* Invalid mutex attribute */ |
#define | ABT_ERR_INV_COND 22 /* Invalid condition variable */ |
#define | ABT_ERR_INV_RWLOCK 23 /* Invalid rw lock */ |
#define | ABT_ERR_INV_EVENTUAL 24 /* Invalid eventual */ |
#define | ABT_ERR_INV_FUTURE 25 /* Invalid future */ |
#define | ABT_ERR_INV_BARRIER 26 /* Invalid barrier */ |
#define | ABT_ERR_INV_TIMER 27 /* Invalid timer */ |
#define | ABT_ERR_INV_QUERY_KIND 28 /* Invalid query kind */ |
#define | ABT_ERR_INV_TOOL_CONTEXT 52 /* Invalid tool context */ |
#define | ABT_ERR_XSTREAM 29 /* ES-related error */ |
#define | ABT_ERR_XSTREAM_STATE 30 /* ES state error */ |
#define | ABT_ERR_XSTREAM_BARRIER 31 /* ES barrier-related error */ |
#define | ABT_ERR_SCHED 32 /* Scheduler-related error */ |
#define | ABT_ERR_SCHED_CONFIG 33 /* Scheduler config error */ |
#define | ABT_ERR_POOL 34 /* Pool-related error */ |
#define | ABT_ERR_UNIT 35 /* Scheduling unit-related error */ |
#define | ABT_ERR_THREAD 36 /* ULT-related error */ |
#define | ABT_ERR_TASK ABT_ERR_THREAD |
#define | ABT_ERR_KEY 38 /* Key-related error */ |
#define | ABT_ERR_MUTEX 39 /* Mutex-related error */ |
#define | ABT_ERR_MUTEX_LOCKED 40 /* Return value when mutex is locked */ |
#define | ABT_ERR_COND 41 /* Condition-related error */ |
#define | ABT_ERR_COND_TIMEDOUT 42 /* Return value when cond is timed out */ |
#define | ABT_ERR_RWLOCK 43 /* rwlock-related error */ |
#define | ABT_ERR_EVENTUAL 44 /* Eventual-related error */ |
#define | ABT_ERR_FUTURE 45 /* Future-related error */ |
#define | ABT_ERR_BARRIER 46 /* Barrier-related error */ |
#define | ABT_ERR_TIMER 47 /* Timer-related error */ |
#define | ABT_ERR_MIGRATION_TARGET 48 /* Migration target error */ |
#define | ABT_ERR_MIGRATION_NA 49 /* Migration not available */ |
#define | ABT_ERR_MISSING_JOIN 50 /* An ES or more did not join */ |
#define | ABT_ERR_FEATURE_NA 51 /* Feature not available */ |
#define | ABT_TASK_STATE_READY ABT_THREAD_STATE_READY |
#define | ABT_TASK_STATE_RUNNING ABT_THREAD_STATE_RUNNING |
#define | ABT_TASK_STATE_TERMINATED ABT_THREAD_STATE_TERMINATED |
#define | ABT_TOOL_EVENT_THREAD_NONE (0) |
#define | ABT_TOOL_EVENT_THREAD_CREATE (1 << 0) |
#define | ABT_TOOL_EVENT_THREAD_JOIN (1 << 1) |
#define | ABT_TOOL_EVENT_THREAD_FREE (1 << 2) |
#define | ABT_TOOL_EVENT_THREAD_REVIVE (1 << 3) |
#define | ABT_TOOL_EVENT_THREAD_RUN (1 << 4) |
#define | ABT_TOOL_EVENT_THREAD_FINISH (1 << 5) |
#define | ABT_TOOL_EVENT_THREAD_CANCEL (1 << 6) |
#define | ABT_TOOL_EVENT_THREAD_YIELD (1 << 7) |
#define | ABT_TOOL_EVENT_THREAD_SUSPEND (1 << 8) |
#define | ABT_TOOL_EVENT_THREAD_RESUME (1 << 9) |
#define | ABT_TOOL_EVENT_THREAD_ALL ((uint64_t)((1 << 12) - 1)) |
#define | ABT_TOOL_EVENT_TASK_NONE (0) |
#define | ABT_TOOL_EVENT_TASK_CREATE (ABT_TOOL_EVENT_THREAD_CREATE << 12) |
#define | ABT_TOOL_EVENT_TASK_JOIN (ABT_TOOL_EVENT_THREAD_JOIN << 12) |
#define | ABT_TOOL_EVENT_TASK_FREE (ABT_TOOL_EVENT_THREAD_FREE << 12) |
#define | ABT_TOOL_EVENT_TASK_REVIVE (ABT_TOOL_EVENT_THREAD_REVIVE << 12) |
#define | ABT_TOOL_EVENT_TASK_RUN (ABT_TOOL_EVENT_THREAD_RUN << 12) |
#define | ABT_TOOL_EVENT_TASK_FINISH (ABT_TOOL_EVENT_THREAD_FINISH << 12) |
#define | ABT_TOOL_EVENT_TASK_CANCEL (ABT_TOOL_EVENT_THREAD_CANCEL << 12) |
#define | ABT_TOOL_EVENT_TASK_ALL ((uint64_t)(((1 << 12) - 1) << 12)) |
#define | ABT_TRUE 1 |
#define | ABT_FALSE 0 |
#define | ABT_XSTREAM_ANY_RANK -1 |
#define | ABT_NULL 0 |
#define | ABT_XSTREAM_NULL ((ABT_xstream) (0x01)) |
#define | ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)(0x02)) |
#define | ABT_SCHED_NULL ((ABT_sched) (0x03)) |
#define | ABT_SCHED_CONFIG_NULL ((ABT_sched_config) (0x04)) |
#define | ABT_POOL_NULL ((ABT_pool) (0x05)) |
#define | ABT_POOL_CONFIG_NULL ((ABT_pool_config) (0x06)) |
#define | ABT_UNIT_NULL ((ABT_unit) (0x07)) |
#define | ABT_THREAD_NULL ((ABT_thread) (0x08)) |
#define | ABT_THREAD_ATTR_NULL ((ABT_thread_attr) (0x09)) |
#define | ABT_KEY_NULL ((ABT_key) (0x0b)) |
#define | ABT_MUTEX_NULL ((ABT_mutex) (0x0c)) |
#define | ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) (0x0d)) |
#define | ABT_COND_NULL ((ABT_cond) (0x0e)) |
#define | ABT_RWLOCK_NULL ((ABT_rwlock) (0x0f)) |
#define | ABT_EVENTUAL_NULL ((ABT_eventual) (0x10)) |
#define | ABT_FUTURE_NULL ((ABT_future) (0x11)) |
#define | ABT_BARRIER_NULL ((ABT_barrier) (0x12)) |
#define | ABT_TIMER_NULL ((ABT_timer) (0x13)) |
#define | ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) (0x14)) |
#define | ABT_TASK_NULL ABT_THREAD_NULL |
#define | ABT_task_revive ABT_thread_revive |
#define | ABT_task_free ABT_thread_free |
#define | ABT_task_join ABT_thread_join |
#define | ABT_task_cancel ABT_thread_cancel |
#define | ABT_task_get_xstream ABT_thread_get_last_xstream |
#define | ABT_task_get_state ABT_thread_get_state |
#define | ABT_task_get_last_pool ABT_thread_get_last_pool |
#define | ABT_task_get_last_pool_id ABT_thread_get_last_pool_id |
#define | ABT_task_set_migratable ABT_thread_set_migratable |
#define | ABT_task_is_migratable ABT_thread_is_migratable |
#define | ABT_task_is_unnamed ABT_thread_is_unnamed |
#define | ABT_task_equal ABT_thread_equal |
#define | ABT_task_get_id ABT_thread_get_id |
#define | ABT_task_get_arg ABT_thread_get_arg |
#define | ABT_task_set_specific ABT_thread_set_specific |
#define | ABT_task_get_specific ABT_thread_get_specific |
#define | ABT_info_print_task ABT_info_print_thread |
Functions | |
int | ABT_init (int argc, char **argv) ABT_API_PUBLIC |
Initialize the Argobots execution environment. More... | |
int | ABT_finalize (void) ABT_API_PUBLIC |
Terminate the Argobots execution environment. More... | |
int | ABT_initialized (void) ABT_API_PUBLIC |
Check whether ABT_init() has been called. More... | |
int | ABT_xstream_create (ABT_sched sched, ABT_xstream *newxstream) ABT_API_PUBLIC |
Create a new ES and return its handle through newxstream. More... | |
int | ABT_xstream_create_basic (ABT_sched_predef predef, int num_pools, ABT_pool *pools, ABT_sched_config config, ABT_xstream *newxstream) ABT_API_PUBLIC |
Create a new ES with a predefined scheduler and return its handle through newxstream . More... | |
int | ABT_xstream_create_with_rank (ABT_sched sched, int rank, ABT_xstream *newxstream) ABT_API_PUBLIC |
Create a new ES with a specific rank. More... | |
int | ABT_xstream_free (ABT_xstream *xstream) ABT_API_PUBLIC |
Release the ES object associated with ES handle. More... | |
int | ABT_xstream_join (ABT_xstream xstream) ABT_API_PUBLIC |
Wait for xstream to terminate. More... | |
int | ABT_xstream_revive (ABT_xstream xstream) ABT_API_PUBLIC |
Restart an ES that has been joined by ABT_xstream_join() . More... | |
int | ABT_xstream_exit (void) ABT_API_PUBLIC |
Terminate the ES associated with the calling ULT. More... | |
int | ABT_xstream_cancel (ABT_xstream xstream) ABT_API_PUBLIC |
Request the cancellation of the target ES. More... | |
int | ABT_xstream_self (ABT_xstream *xstream) ABT_API_PUBLIC |
Return the ES handle associated with the caller work unit. More... | |
int | ABT_xstream_self_rank (int *rank) ABT_API_PUBLIC |
Return the rank of ES associated with the caller work unit. More... | |
int | ABT_xstream_set_rank (ABT_xstream xstream, int rank) ABT_API_PUBLIC |
Set the rank for target ES. More... | |
int | ABT_xstream_get_rank (ABT_xstream xstream, int *rank) ABT_API_PUBLIC |
Return the rank of ES. More... | |
int | ABT_xstream_set_main_sched (ABT_xstream xstream, ABT_sched sched) ABT_API_PUBLIC |
Set the main scheduler of the target ES. More... | |
int | ABT_xstream_set_main_sched_basic (ABT_xstream xstream, ABT_sched_predef predef, int num_pools, ABT_pool *pools) ABT_API_PUBLIC |
Set the main scheduler for xstream with a predefined scheduler. More... | |
int | ABT_xstream_get_main_sched (ABT_xstream xstream, ABT_sched *sched) ABT_API_PUBLIC |
Get the main scheduler of the target ES. More... | |
int | ABT_xstream_get_main_pools (ABT_xstream xstream, int max_pools, ABT_pool *pools) ABT_API_PUBLIC |
Get the pools of the main scheduler of the target ES. More... | |
int | ABT_xstream_get_state (ABT_xstream xstream, ABT_xstream_state *state) ABT_API_PUBLIC |
Return the state of xstream. More... | |
int | ABT_xstream_equal (ABT_xstream xstream1, ABT_xstream xstream2, ABT_bool *result) ABT_API_PUBLIC |
Compare two ES handles for equality. More... | |
int | ABT_xstream_get_num (int *num_xstreams) ABT_API_PUBLIC |
Return the number of current existing ESs. More... | |
int | ABT_xstream_is_primary (ABT_xstream xstream, ABT_bool *flag) ABT_API_PUBLIC |
Check if the target ES is the primary ES. More... | |
int | ABT_xstream_run_unit (ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC |
Execute a unit on the local ES. More... | |
int | ABT_xstream_check_events (ABT_sched sched) ABT_API_PUBLIC |
Check the events and process them. More... | |
int | ABT_xstream_set_cpubind (ABT_xstream xstream, int cpuid) ABT_API_PUBLIC |
Bind the target ES to a target CPU. More... | |
int | ABT_xstream_get_cpubind (ABT_xstream xstream, int *cpuid) ABT_API_PUBLIC |
Get the CPU binding for the target ES. More... | |
int | ABT_xstream_set_affinity (ABT_xstream xstream, int cpuset_size, int *cpuset) ABT_API_PUBLIC |
Set the CPU affinity of the target ES. More... | |
int | ABT_xstream_get_affinity (ABT_xstream xstream, int cpuset_size, int *cpuset, int *num_cpus) ABT_API_PUBLIC |
Get the CPU affinity for the target ES. More... | |
int | ABT_xstream_barrier_create (uint32_t num_waiters, ABT_xstream_barrier *newbarrier) ABT_API_PUBLIC |
Create a new ES barrier. More... | |
int | ABT_xstream_barrier_free (ABT_xstream_barrier *barrier) ABT_API_PUBLIC |
Free the ES barrier. More... | |
int | ABT_xstream_barrier_wait (ABT_xstream_barrier barrier) ABT_API_PUBLIC |
Wait on the barrier. More... | |
int | ABT_sched_create (ABT_sched_def *def, int num_pools, ABT_pool *pools, ABT_sched_config config, ABT_sched *newsched) ABT_API_PUBLIC |
Create a new user-defined scheduler and return its handle through newsched. More... | |
int | ABT_sched_create_basic (ABT_sched_predef predef, int num_pools, ABT_pool *pools, ABT_sched_config config, ABT_sched *newsched) ABT_API_PUBLIC |
Create a predefined scheduler. More... | |
int | ABT_sched_free (ABT_sched *sched) ABT_API_PUBLIC |
Release the scheduler object associated with sched handle. More... | |
int | ABT_sched_set_data (ABT_sched sched, void *data) ABT_API_PUBLIC |
Set the specific data of the target user-defined scheduler. More... | |
int | ABT_sched_get_data (ABT_sched sched, void **data) ABT_API_PUBLIC |
Retrieve the specific data of the target user-defined scheduler. More... | |
int | ABT_sched_get_num_pools (ABT_sched sched, int *num_pools) ABT_API_PUBLIC |
Get the number of pools associated with scheduler. More... | |
int | ABT_sched_get_pools (ABT_sched sched, int max_pools, int idx, ABT_pool *pools) ABT_API_PUBLIC |
Get the pools of the scheduler sched . More... | |
int | ABT_sched_get_size (ABT_sched sched, size_t *size) ABT_API_PUBLIC |
Get the sum of the sizes of the pool of sched . More... | |
int | ABT_sched_get_total_size (ABT_sched sched, size_t *size) ABT_API_PUBLIC |
Get the sum of the sizes of the pool of sched . More... | |
int | ABT_sched_finish (ABT_sched sched) ABT_API_PUBLIC |
Ask a scheduler to finish. More... | |
int | ABT_sched_exit (ABT_sched sched) ABT_API_PUBLIC |
Ask a scheduler to stop as soon as possible. More... | |
int | ABT_sched_has_to_stop (ABT_sched sched, ABT_bool *stop) ABT_API_PUBLIC |
Check if the scheduler needs to stop. More... | |
int | ABT_sched_config_create (ABT_sched_config *config,...) ABT_API_PUBLIC |
Create a scheduler configuration. More... | |
int | ABT_sched_config_read (ABT_sched_config config, int num_vars,...) ABT_API_PUBLIC |
Copy the set values from config into the variables passed in the dynamic list of arguments. More... | |
int | ABT_sched_config_free (ABT_sched_config *config) ABT_API_PUBLIC |
Free the configuration. More... | |
int | ABT_pool_create (ABT_pool_def *def, ABT_pool_config config, ABT_pool *newpool) ABT_API_PUBLIC |
Create a new pool and return its handle through newpool . More... | |
int | ABT_pool_create_basic (ABT_pool_kind kind, ABT_pool_access access, ABT_bool automatic, ABT_pool *newpool) ABT_API_PUBLIC |
Create a new pool from a predefined type and return its handle through newpool . More... | |
int | ABT_pool_free (ABT_pool *pool) ABT_API_PUBLIC |
Free the given pool, and modify its value to ABT_POOL_NULL. More... | |
int | ABT_pool_get_access (ABT_pool pool, ABT_pool_access *access) ABT_API_PUBLIC |
Get the access type of target pool. More... | |
int | ABT_pool_get_size (ABT_pool pool, size_t *size) ABT_API_PUBLIC |
Return the size of a pool. More... | |
int | ABT_pool_get_total_size (ABT_pool pool, size_t *size) ABT_API_PUBLIC |
Return the total size of a pool. More... | |
int | ABT_pool_pop (ABT_pool pool, ABT_unit *unit) ABT_API_PUBLIC |
Pop a unit from the target pool. More... | |
int | ABT_pool_pop_wait (ABT_pool pool, ABT_unit *unit, double time_secs) ABT_API_PUBLIC |
Pop a unit from the target pool with wait. More... | |
int | ABT_pool_pop_timedwait (ABT_pool pool, ABT_unit *unit, double abstime_secs) ABT_DEPRECATED ABT_API_PUBLIC |
int | ABT_pool_remove (ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC |
Remove a specified unit from the target pool. More... | |
int | ABT_pool_push (ABT_pool pool, ABT_unit unit) ABT_API_PUBLIC |
Push a unit to the target pool. More... | |
int | ABT_pool_print_all (ABT_pool pool, void *arg, void(*print_fn)(void *arg, ABT_unit)) ABT_API_PUBLIC |
int | ABT_pool_set_data (ABT_pool pool, void *data) ABT_API_PUBLIC |
Set the specific data of the target user-defined pool. More... | |
int | ABT_pool_get_data (ABT_pool pool, void **data) ABT_API_PUBLIC |
Retrieve the specific data of the target user-defined pool. More... | |
int | ABT_pool_add_sched (ABT_pool pool, ABT_sched sched) ABT_API_PUBLIC |
Push a scheduler to a pool. More... | |
int | ABT_pool_get_id (ABT_pool pool, int *id) ABT_API_PUBLIC |
Get the ID of the target pool. More... | |
int | ABT_unit_set_associated_pool (ABT_unit unit, ABT_pool pool) ABT_API_PUBLIC |
Set the associated pool for the target work unit. More... | |
int | ABT_thread_create (ABT_pool pool, void(*thread_func)(void *), void *arg, ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC |
Create a new thread and return its handle through newthread. More... | |
int | ABT_thread_create_on_xstream (ABT_xstream xstream, void(*thread_func)(void *), void *arg, ABT_thread_attr attr, ABT_thread *newthread) ABT_API_PUBLIC |
Create a new ULT associated with the target ES (xstream ). More... | |
int | ABT_thread_create_many (int num, ABT_pool *pool_list, void(**thread_func_list)(void *), void **arg_list, ABT_thread_attr attr, ABT_thread *newthread_list) ABT_API_PUBLIC |
Create a set of ULTs. More... | |
int | ABT_thread_revive (ABT_pool pool, void(*thread_func)(void *), void *arg, ABT_thread *thread) ABT_API_PUBLIC |
Revive the ULT. More... | |
int | ABT_thread_free (ABT_thread *thread) ABT_API_PUBLIC |
Release the thread object associated with thread handle. More... | |
int | ABT_thread_free_many (int num, ABT_thread *thread_list) ABT_API_PUBLIC |
Release a set of ULT objects. More... | |
int | ABT_thread_join (ABT_thread thread) ABT_API_PUBLIC |
Wait for thread to terminate. More... | |
int | ABT_thread_join_many (int num_threads, ABT_thread *thread_list) ABT_API_PUBLIC |
Wait for a number of ULTs to terminate. More... | |
int | ABT_thread_exit (void) ABT_API_PUBLIC |
The calling ULT terminates its execution. More... | |
int | ABT_thread_cancel (ABT_thread thread) ABT_API_PUBLIC |
Request the cancellation of the target thread. More... | |
int | ABT_thread_self (ABT_thread *thread) ABT_API_PUBLIC |
Return the handle of the calling ULT. More... | |
int | ABT_thread_self_id (ABT_unit_id *id) ABT_API_PUBLIC |
Return the calling ULT's ID. More... | |
int | ABT_thread_get_last_xstream (ABT_thread thread, ABT_xstream *xstream) ABT_API_PUBLIC |
Get the ES associated with the target thread. More... | |
int | ABT_thread_get_state (ABT_thread thread, ABT_thread_state *state) ABT_API_PUBLIC |
Return the state of thread. More... | |
int | ABT_thread_get_last_pool (ABT_thread thread, ABT_pool *pool) ABT_API_PUBLIC |
Return the last pool of ULT. More... | |
int | ABT_thread_get_last_pool_id (ABT_thread thread, int *id) ABT_API_PUBLIC |
Get the last pool's ID of the ULT. More... | |
int | ABT_thread_set_associated_pool (ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC |
Set the associated pool for the target ULT. More... | |
int | ABT_thread_yield_to (ABT_thread thread) ABT_API_PUBLIC |
Yield the processor from the current running thread to the specific thread. More... | |
int | ABT_thread_yield (void) ABT_API_PUBLIC |
Yield the processor from the current running ULT back to the scheduler. More... | |
int | ABT_thread_resume (ABT_thread thread) ABT_API_PUBLIC |
Resume the target ULT. More... | |
int | ABT_thread_migrate_to_xstream (ABT_thread thread, ABT_xstream xstream) ABT_API_PUBLIC |
Migrate a thread to a specific ES. More... | |
int | ABT_thread_migrate_to_sched (ABT_thread thread, ABT_sched sched) ABT_API_PUBLIC |
Migrate a thread to a specific scheduler. More... | |
int | ABT_thread_migrate_to_pool (ABT_thread thread, ABT_pool pool) ABT_API_PUBLIC |
Migrate a thread to a specific pool. More... | |
int | ABT_thread_migrate (ABT_thread thread) ABT_API_PUBLIC |
Request migration of the thread to an any available ES. More... | |
int | ABT_thread_set_callback (ABT_thread thread, void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC |
Set the callback function. More... | |
int | ABT_thread_set_migratable (ABT_thread thread, ABT_bool flag) ABT_API_PUBLIC |
Set the ULT's migratability. More... | |
int | ABT_thread_is_migratable (ABT_thread thread, ABT_bool *flag) ABT_API_PUBLIC |
Get the ULT's migratability. More... | |
int | ABT_thread_is_primary (ABT_thread thread, ABT_bool *flag) ABT_API_PUBLIC |
Check if the target ULT is the primary ULT. More... | |
int | ABT_thread_is_unnamed (ABT_thread thread, ABT_bool *flag) ABT_API_PUBLIC |
Check if the target ULT is unnamed. More... | |
int | ABT_thread_equal (ABT_thread thread1, ABT_thread thread2, ABT_bool *result) ABT_API_PUBLIC |
Compare two ULT handles for equality. More... | |
int | ABT_thread_get_stacksize (ABT_thread thread, size_t *stacksize) ABT_API_PUBLIC |
Get the ULT's stack size. More... | |
int | ABT_thread_get_id (ABT_thread thread, ABT_unit_id *thread_id) ABT_API_PUBLIC |
Get the ULT's id. More... | |
int | ABT_thread_set_arg (ABT_thread thread, void *arg) ABT_API_PUBLIC |
Set the argument for the ULT function. More... | |
int | ABT_thread_get_arg (ABT_thread thread, void **arg) ABT_API_PUBLIC |
Retrieve the argument for the ULT function. More... | |
int | ABT_thread_set_specific (ABT_thread thread, ABT_key key, void *value) ABT_API_PUBLIC |
Set the ULT-specific value associated with the key. More... | |
int | ABT_thread_get_specific (ABT_thread thread, ABT_key key, void **value) ABT_API_PUBLIC |
Get the ULT-specific value associated with the key. More... | |
int | ABT_thread_get_attr (ABT_thread thread, ABT_thread_attr *attr) ABT_API_PUBLIC |
Get attributes of the target ULT. More... | |
int | ABT_thread_attr_create (ABT_thread_attr *newattr) ABT_API_PUBLIC |
Create a new ULT attribute object. More... | |
int | ABT_thread_attr_free (ABT_thread_attr *attr) ABT_API_PUBLIC |
Free the ULT attribute object. More... | |
int | ABT_thread_attr_set_stack (ABT_thread_attr attr, void *stackaddr, size_t stacksize) ABT_API_PUBLIC |
Set stack attributes. More... | |
int | ABT_thread_attr_get_stack (ABT_thread_attr attr, void **stackaddr, size_t *stacksize) ABT_API_PUBLIC |
Get stack attributes. More... | |
int | ABT_thread_attr_set_stacksize (ABT_thread_attr attr, size_t stacksize) ABT_API_PUBLIC |
Set the stack size in the attribute object. More... | |
int | ABT_thread_attr_get_stacksize (ABT_thread_attr attr, size_t *stacksize) ABT_API_PUBLIC |
Get the stack size from the attribute object. More... | |
int | ABT_thread_attr_set_callback (ABT_thread_attr attr, void(*cb_func)(ABT_thread thread, void *cb_arg), void *cb_arg) ABT_API_PUBLIC |
Set callback function and its argument in the attribute object. More... | |
int | ABT_thread_attr_set_migratable (ABT_thread_attr attr, ABT_bool flag) ABT_API_PUBLIC |
Set the ULT's migratability in the attribute object. More... | |
int | ABT_task_create (ABT_pool pool, void(*task_func)(void *), void *arg, ABT_task *newtask) ABT_API_PUBLIC |
Create a new task and return its handle through newtask. More... | |
int | ABT_task_create_on_xstream (ABT_xstream xstream, void(*task_func)(void *), void *arg, ABT_task *newtask) ABT_API_PUBLIC |
Create a new tasklet associated with the target ES (xstream ). More... | |
int | ABT_task_self (ABT_task *task) ABT_API_PUBLIC |
Return the handle of the calling tasklet. More... | |
int | ABT_task_self_id (ABT_unit_id *id) ABT_API_PUBLIC |
Return the ID of the calling tasklet. More... | |
int | ABT_self_get_type (ABT_unit_type *type) ABT_API_PUBLIC |
Return the type of calling work unit. More... | |
int | ABT_self_is_primary (ABT_bool *flag) ABT_API_PUBLIC |
Check if the caller is the primary ULT. More... | |
int | ABT_self_on_primary_xstream (ABT_bool *flag) ABT_API_PUBLIC |
Check if the caller's ES is the primary ES. More... | |
int | ABT_self_is_unnamed (ABT_bool *flag) ABT_API_PUBLIC |
Check if the running work unit is unnamed. More... | |
int | ABT_self_get_last_pool_id (int *pool_id) ABT_API_PUBLIC |
Get the last pool's ID of calling work unit. More... | |
int | ABT_self_suspend (void) ABT_API_PUBLIC |
Suspend the current ULT. More... | |
int | ABT_self_set_arg (void *arg) ABT_API_PUBLIC |
Set the argument for the work unit function. More... | |
int | ABT_self_get_arg (void **arg) ABT_API_PUBLIC |
Retrieve the argument for the work unit function. More... | |
int | ABT_key_create (void(*destructor)(void *value), ABT_key *newkey) ABT_API_PUBLIC |
Create an WU-specific data key. More... | |
int | ABT_key_free (ABT_key *key) ABT_API_PUBLIC |
Free an WU-specific data key. More... | |
int | ABT_key_set (ABT_key key, void *value) ABT_API_PUBLIC |
Associate a value with the key. More... | |
int | ABT_key_get (ABT_key key, void **value) ABT_API_PUBLIC |
Get the value associated with the key. More... | |
int | ABT_mutex_create (ABT_mutex *newmutex) ABT_API_PUBLIC |
Create a new mutex. More... | |
int | ABT_mutex_create_with_attr (ABT_mutex_attr attr, ABT_mutex *newmutex) ABT_API_PUBLIC |
Create a new mutex with attributes. More... | |
int | ABT_mutex_free (ABT_mutex *mutex) ABT_API_PUBLIC |
Free the mutex object. More... | |
int | ABT_mutex_lock (ABT_mutex mutex) ABT_API_PUBLIC |
Lock the mutex. More... | |
int | ABT_mutex_lock_high (ABT_mutex mutex) ABT_API_PUBLIC |
int | ABT_mutex_lock_low (ABT_mutex mutex) ABT_API_PUBLIC |
Lock the mutex with low priority. More... | |
int | ABT_mutex_trylock (ABT_mutex mutex) ABT_API_PUBLIC |
Attempt to lock a mutex without blocking. More... | |
int | ABT_mutex_spinlock (ABT_mutex mutex) ABT_API_PUBLIC |
Lock the mutex without context switch. More... | |
int | ABT_mutex_unlock (ABT_mutex mutex) ABT_API_PUBLIC |
Unlock the mutex. More... | |
int | ABT_mutex_unlock_se (ABT_mutex mutex) ABT_API_PUBLIC |
Hand over the mutex within the ES. More... | |
int | ABT_mutex_unlock_de (ABT_mutex mutex) ABT_API_PUBLIC |
int | ABT_mutex_equal (ABT_mutex mutex1, ABT_mutex mutex2, ABT_bool *result) ABT_API_PUBLIC |
Compare two mutex handles for equality. More... | |
int | ABT_mutex_attr_create (ABT_mutex_attr *newattr) ABT_API_PUBLIC |
Create a new mutex attribute object. More... | |
int | ABT_mutex_attr_free (ABT_mutex_attr *attr) ABT_API_PUBLIC |
Free the mutex attribute object. More... | |
int | ABT_mutex_attr_set_recursive (ABT_mutex_attr attr, ABT_bool recursive) ABT_API_PUBLIC |
Set the recursive property in the attribute object. More... | |
int | ABT_cond_create (ABT_cond *newcond) ABT_API_PUBLIC |
Create a new condition variable. More... | |
int | ABT_cond_free (ABT_cond *cond) ABT_API_PUBLIC |
Free the condition variable. More... | |
int | ABT_cond_wait (ABT_cond cond, ABT_mutex mutex) ABT_API_PUBLIC |
Wait on the condition. More... | |
int | ABT_cond_timedwait (ABT_cond cond, ABT_mutex mutex, const struct timespec *abstime) ABT_API_PUBLIC |
Wait on the condition. More... | |
int | ABT_cond_signal (ABT_cond cond) ABT_API_PUBLIC |
Signal a condition. More... | |
int | ABT_cond_broadcast (ABT_cond cond) ABT_API_PUBLIC |
Broadcast a condition. More... | |
int | ABT_rwlock_create (ABT_rwlock *newrwlock) ABT_API_PUBLIC |
Create a new rwlock ABT_rwlock_create creates a new rwlock object and returns its handle through newrwlock . If an error occurs in this routine, a non-zero error code will be returned and newrwlock will be set to ABT_RWLOCK_NULL . More... | |
int | ABT_rwlock_free (ABT_rwlock *rwlock) ABT_API_PUBLIC |
Free the rwlock object. More... | |
int | ABT_rwlock_rdlock (ABT_rwlock rwlock) ABT_API_PUBLIC |
Lock the rwlock as a reader. More... | |
int | ABT_rwlock_wrlock (ABT_rwlock rwlock) ABT_API_PUBLIC |
Lock the rwlock as a writer. More... | |
int | ABT_rwlock_unlock (ABT_rwlock rwlock) ABT_API_PUBLIC |
Unlock the rwlock. More... | |
int | ABT_eventual_create (int nbytes, ABT_eventual *neweventual) ABT_API_PUBLIC |
Create an eventual. More... | |
int | ABT_eventual_free (ABT_eventual *eventual) ABT_API_PUBLIC |
Free the eventual object. More... | |
int | ABT_eventual_wait (ABT_eventual eventual, void **value) ABT_API_PUBLIC |
Wait on the eventual. More... | |
int | ABT_eventual_test (ABT_eventual eventual, void **value, int *is_ready) ABT_API_PUBLIC |
Test the readiness of an eventual. More... | |
int | ABT_eventual_set (ABT_eventual eventual, void *value, int nbytes) ABT_API_PUBLIC |
Signal the eventual. More... | |
int | ABT_eventual_reset (ABT_eventual eventual) ABT_API_PUBLIC |
Reset the readiness of the target eventual. More... | |
int | ABT_future_create (uint32_t compartments, void(*cb_func)(void **arg), ABT_future *newfuture) ABT_API_PUBLIC |
Create a future. More... | |
int | ABT_future_free (ABT_future *future) ABT_API_PUBLIC |
Free the future object. More... | |
int | ABT_future_wait (ABT_future future) ABT_API_PUBLIC |
Wait on the future. More... | |
int | ABT_future_test (ABT_future future, ABT_bool *flag) ABT_API_PUBLIC |
Test whether the future is ready. More... | |
int | ABT_future_set (ABT_future future, void *value) ABT_API_PUBLIC |
Signal the future. More... | |
int | ABT_future_reset (ABT_future future) ABT_API_PUBLIC |
Reset the readiness of the target future. More... | |
int | ABT_barrier_create (uint32_t num_waiters, ABT_barrier *newbarrier) ABT_API_PUBLIC |
Create a new barrier. More... | |
int | ABT_barrier_reinit (ABT_barrier barrier, uint32_t num_waiters) ABT_API_PUBLIC |
Reinitialize the barrier. More... | |
int | ABT_barrier_free (ABT_barrier *barrier) ABT_API_PUBLIC |
Free the barrier. More... | |
int | ABT_barrier_wait (ABT_barrier barrier) ABT_API_PUBLIC |
Wait on the barrier. More... | |
int | ABT_barrier_get_num_waiters (ABT_barrier barrier, uint32_t *num_waiters) ABT_API_PUBLIC |
Get the number of waiters for the barrier. More... | |
int | ABT_error_get_str (int err, char *str, size_t *len) ABT_API_PUBLIC |
Get the string of error code and its length. More... | |
double | ABT_get_wtime (void) ABT_API_PUBLIC |
Get elapsed wall clock time. More... | |
int | ABT_timer_create (ABT_timer *newtimer) ABT_API_PUBLIC |
Create a new timer. More... | |
int | ABT_timer_dup (ABT_timer timer, ABT_timer *newtimer) ABT_API_PUBLIC |
Duplicate the timer. More... | |
int | ABT_timer_free (ABT_timer *timer) ABT_API_PUBLIC |
Free the timer object. More... | |
int | ABT_timer_start (ABT_timer timer) ABT_API_PUBLIC |
Start the timer. More... | |
int | ABT_timer_stop (ABT_timer timer) ABT_API_PUBLIC |
Stop the timer. More... | |
int | ABT_timer_read (ABT_timer timer, double *secs) ABT_API_PUBLIC |
Read the elapsed time of the timer. More... | |
int | ABT_timer_stop_and_read (ABT_timer timer, double *secs) ABT_API_PUBLIC |
Stop the timer and read the elapsed time of the timer. More... | |
int | ABT_timer_stop_and_add (ABT_timer timer, double *secs) ABT_API_PUBLIC |
Stop the timer and add the elapsed time of the timer. More... | |
int | ABT_timer_get_overhead (double *overhead) ABT_API_PUBLIC |
Obtain the overhead time of using ABT_timer. More... | |
int | ABT_info_query_config (ABT_info_query_kind query_kind, void *val) ABT_API_PUBLIC |
Get the configuration information associated with query_kind . More... | |
int | ABT_info_print_config (FILE *fp) ABT_API_PUBLIC |
Write the configuration information to the output stream. More... | |
int | ABT_info_print_all_xstreams (FILE *fp) ABT_API_PUBLIC |
Write the information of all created ESs to the output stream. More... | |
int | ABT_info_print_xstream (FILE *fp, ABT_xstream xstream) ABT_API_PUBLIC |
Write the information of the target ES to the output stream. More... | |
int | ABT_info_print_sched (FILE *fp, ABT_sched sched) ABT_API_PUBLIC |
Write the information of the target scheduler to the output stream. More... | |
int | ABT_info_print_pool (FILE *fp, ABT_pool pool) ABT_API_PUBLIC |
Write the information of the target pool to the output stream. More... | |
int | ABT_info_print_thread (FILE *fp, ABT_thread thread) ABT_API_PUBLIC |
Write the information of the target ULT to the output stream. More... | |
int | ABT_info_print_thread_attr (FILE *fp, ABT_thread_attr attr) ABT_API_PUBLIC |
Write the information of the target ULT attribute to the output stream. More... | |
int | ABT_info_print_thread_stack (FILE *fp, ABT_thread thread) ABT_API_PUBLIC |
Dump the stack of the target thread to the output stream. More... | |
int | ABT_info_print_thread_stacks_in_pool (FILE *fp, ABT_pool pool) ABT_API_PUBLIC |
Dump stack information of all the threads in the target pool. More... | |
int | ABT_info_trigger_print_all_thread_stacks (FILE *fp, double timeout, void(*cb_func)(ABT_bool, void *), void *arg) ABT_API_PUBLIC |
Dump stacks of threads in pools existing in Argobots. More... | |
int | ABT_tool_register_thread_callback (ABT_tool_thread_callback_fn cb_func, uint64_t event_mask_thread, void *user_arg) ABT_API_PUBLIC |
Register a callback function for ULT events. More... | |
int | ABT_tool_register_task_callback (ABT_tool_task_callback_fn cb_func, uint64_t event_mask_task, void *user_arg) ABT_API_PUBLIC |
Register a callback function for tasklet events. More... | |
int | ABT_tool_query_thread (ABT_tool_context context, uint64_t event_thread, ABT_tool_query_kind query_kind, void *val) ABT_API_PUBLIC |
Query information associated with a ULT event. More... | |
int | ABT_tool_query_task (ABT_tool_context context, uint64_t event_task, ABT_tool_query_kind query_kind, void *val) ABT_API_PUBLIC |
Query information associated with a tasklet event. More... | |
Variables | |
ABT_sched_config_var ABT_sched_config_var_end | ABT_API_PUBLIC |
ABT_sched_config_var ABT_sched_config_automatic ABT_API_PUBLIC |
#define ABT_BARRIER_NULL ((ABT_barrier) (0x12)) |
Definition at line 425 of file abt.h.
Referenced by ABT_barrier_free().
#define ABT_CALC_VERSION | ( | MAJOR, | |
MINOR, | |||
REVISION, | |||
TYPE, | |||
PATCH | |||
) | (((MAJOR) * 10000000) + ((MINOR) * 100000) + ((REVISION) * 1000) + ((TYPE) * 100) + (PATCH)) |
#define ABT_COND_NULL ((ABT_cond) (0x0e)) |
Definition at line 421 of file abt.h.
Referenced by ABT_cond_free().
#define ABT_DEPRECATED __attribute__((deprecated)) |
#define ABT_ERR_COND 41 /* Condition-related error */ |
Definition at line 106 of file abt.h.
Referenced by ABT_cond_free().
#define ABT_ERR_COND_TIMEDOUT 42 /* Return value when cond is timed out */ |
Definition at line 107 of file abt.h.
Referenced by ABT_cond_timedwait().
#define ABT_ERR_FEATURE_NA 51 /* Feature not available */ |
Definition at line 116 of file abt.h.
Referenced by ABT_error_get_str(), ABT_thread_attr_set_callback(), ABT_thread_attr_set_migratable(), ABT_thread_cancel(), ABT_thread_is_migratable(), ABT_thread_set_callback(), ABT_thread_set_migratable(), ABT_tool_query_task(), ABT_tool_query_thread(), ABT_tool_register_task_callback(), ABT_tool_register_thread_callback(), ABT_xstream_barrier_create(), ABT_xstream_barrier_free(), ABT_xstream_barrier_wait(), ABT_xstream_get_cpubind(), apply_cpuset(), get_num_cores(), and read_cpuset().
#define ABT_ERR_FUTURE 45 /* Future-related error */ |
Definition at line 110 of file abt.h.
Referenced by ABT_future_set().
#define ABT_ERR_INV_EVENTUAL 24 /* Invalid eventual */ |
Definition at line 88 of file abt.h.
Referenced by ABT_eventual_set().
#define ABT_ERR_INV_MUTEX 20 /* Invalid mutex */ |
Definition at line 84 of file abt.h.
Referenced by ABT_cond_timedwait().
#define ABT_ERR_INV_MUTEX_ATTR 21 /* Invalid mutex attribute */ |
#define ABT_ERR_INV_POOL 12 /* Invalid pool */ |
Definition at line 76 of file abt.h.
Referenced by ABT_pool_free().
#define ABT_ERR_INV_POOL_ACCESS 14 /* Invalid pool access mode */ |
#define ABT_ERR_INV_QUERY_KIND 28 /* Invalid query kind */ |
Definition at line 92 of file abt.h.
Referenced by ABT_info_query_config().
#define ABT_ERR_INV_SCHED 7 /* Invalid scheduler */ |
Definition at line 71 of file abt.h.
Referenced by ABT_pool_add_sched(), ABT_xstream_create(), ABT_xstream_create_with_rank(), and ABT_xstream_set_main_sched().
#define ABT_ERR_INV_SCHED_CONFIG 11 /* Invalid scheduler config */ |
#define ABT_ERR_INV_SCHED_PREDEF 9 /* Invalid predefined scheduler */ |
#define ABT_ERR_INV_TASK ABT_ERR_INV_THREAD |
#define ABT_ERR_INV_THREAD 16 /* Invalid ULT */ |
Definition at line 80 of file abt.h.
Referenced by ABT_info_print_thread_stack(), ABT_mutex_unlock(), ABT_mutex_unlock_se(), ABT_task_self(), ABT_task_self_id(), ABT_thread_cancel(), ABT_thread_free(), ABT_thread_get_stacksize(), ABT_thread_join(), ABT_thread_migrate_to_sched(), ABT_thread_resume(), ABT_thread_revive(), ABT_thread_self(), ABT_thread_yield_to(), ABT_xstream_revive(), finailze_library(), thread_migrate_to_pool(), thread_migrate_to_xstream(), xstream_join(), and xstream_update_main_sched().
#define ABT_ERR_INV_THREAD_ATTR 17 /* Invalid ULT attribute */ |
Definition at line 81 of file abt.h.
Referenced by ABT_thread_create_many().
#define ABT_ERR_INV_XSTREAM 4 /* Invalid ES */ |
Definition at line 68 of file abt.h.
Referenced by ABT_thread_migrate(), ABT_xstream_cancel(), ABT_xstream_free(), finailze_library(), thread_migrate_to_xstream(), and xstream_join().
#define ABT_ERR_INV_XSTREAM_RANK 5 /* Invalid ES rank */ |
Definition at line 69 of file abt.h.
Referenced by ABT_xstream_create_with_rank(), and xstream_create().
#define ABT_ERR_MEM 2 /* Memory allocation failure */ |
Definition at line 66 of file abt.h.
Referenced by ABT_rwlock_create(), ABTU_alloc_largepage(), ABTU_calloc(), ABTU_memalign(), ABTU_realloc(), and timer_alloc().
#define ABT_ERR_MIGRATION_NA 49 /* Migration not available */ |
Definition at line 114 of file abt.h.
Referenced by ABT_thread_migrate(), ABT_thread_migrate_to_pool(), ABT_thread_migrate_to_sched(), and ABT_thread_migrate_to_xstream().
#define ABT_ERR_MIGRATION_TARGET 48 /* Migration target error */ |
Definition at line 113 of file abt.h.
Referenced by ABT_thread_migrate(), and thread_migrate_to_pool().
#define ABT_ERR_MISSING_JOIN 50 /* An ES or more did not join */ |
#define ABT_ERR_MUTEX_LOCKED 40 /* Return value when mutex is locked */ |
#define ABT_ERR_OTHER 3 /* Other error */ |
Definition at line 67 of file abt.h.
Referenced by ABT_error_get_str(), ABT_thread_attr_set_stack(), apply_cpuset(), get_num_cores(), read_cpuset(), and tool_query().
#define ABT_ERR_POOL 34 /* Pool-related error */ |
Definition at line 99 of file abt.h.
Referenced by ABT_pool_print_all(), info_print_thread_stacks_in_pool(), pool_remove(), pool_remove_private(), and pool_remove_shared().
#define ABT_ERR_SCHED 32 /* Scheduler-related error */ |
Definition at line 97 of file abt.h.
Referenced by ABT_sched_create(), ABT_sched_free(), and ABT_sched_get_pools().
#define ABT_ERR_SCHED_CONFIG 33 /* Scheduler config error */ |
Definition at line 98 of file abt.h.
Referenced by ABT_sched_config_create().
#define ABT_ERR_TASK ABT_ERR_THREAD |
#define ABT_ERR_THREAD 36 /* ULT-related error */ |
Definition at line 101 of file abt.h.
Referenced by ABT_thread_resume(), and xstream_update_main_sched().
#define ABT_ERR_UNINITIALIZED 1 /* Uninitialized */ |
Definition at line 65 of file abt.h.
Referenced by ABT_initialized(), and finailze_library().
#define ABT_ERR_UNIT 35 /* Scheduling unit-related error */ |
Definition at line 100 of file abt.h.
Referenced by ABT_pool_push().
#define ABT_ERR_XSTREAM 29 /* ES-related error */ |
Definition at line 94 of file abt.h.
Referenced by ABT_xstream_set_main_sched().
#define ABT_ERR_XSTREAM_BARRIER 31 /* ES barrier-related error */ |
#define ABT_ERR_XSTREAM_STATE 30 /* ES state error */ |
Definition at line 95 of file abt.h.
Referenced by ABT_xstream_set_main_sched().
#define ABT_EVENTUAL_NULL ((ABT_eventual) (0x10)) |
Definition at line 423 of file abt.h.
Referenced by ABT_eventual_free().
#define ABT_FALSE 0 |
Definition at line 285 of file abt.h.
Referenced by ABT_eventual_create(), ABT_eventual_reset(), ABT_eventual_test(), ABT_eventual_wait(), ABT_future_test(), ABT_info_print_all_xstreams(), ABT_info_print_xstream(), ABT_info_query_config(), ABT_mutex_equal(), ABT_pool_create(), ABT_sched_create(), ABT_sched_free(), ABT_self_is_primary(), ABT_self_is_unnamed(), ABT_self_on_primary_xstream(), ABT_thread_equal(), ABT_thread_get_attr(), ABT_thread_is_migratable(), ABT_thread_is_primary(), ABT_thread_is_unnamed(), ABT_xstream_create_with_rank(), ABT_xstream_equal(), ABT_xstream_free(), ABT_xstream_is_primary(), thread_key_destructor_stackable_sched(), unit_is_in_pool(), xstream_context_thread_func(), xstream_create(), xstream_set_new_rank(), and xstream_update_main_sched().
#define ABT_FUTURE_NULL ((ABT_future) (0x11)) |
Definition at line 424 of file abt.h.
Referenced by ABT_future_free().
#define ABT_info_print_task ABT_info_print_thread |
#define ABT_KEY_NULL ((ABT_key) (0x0b)) |
Definition at line 418 of file abt.h.
Referenced by ABT_key_free().
#define ABT_MUTEX_ATTR_NULL ((ABT_mutex_attr) (0x0d)) |
Definition at line 420 of file abt.h.
Referenced by ABT_mutex_attr_free().
#define ABT_MUTEX_NULL ((ABT_mutex) (0x0c)) |
Definition at line 419 of file abt.h.
Referenced by ABT_mutex_free().
#define ABT_POOL_CONFIG_NULL ((ABT_pool_config) (0x06)) |
#define ABT_POOL_NULL ((ABT_pool) (0x05)) |
Definition at line 413 of file abt.h.
Referenced by ABT_pool_free(), print_all_thread_stacks(), and sched_create().
#define ABT_RWLOCK_NULL ((ABT_rwlock) (0x0f)) |
Definition at line 422 of file abt.h.
Referenced by ABT_rwlock_free().
#define ABT_SCHED_CONFIG_NULL ((ABT_sched_config) (0x04)) |
Definition at line 412 of file abt.h.
Referenced by ABT_sched_config_free(), ABT_xstream_create(), ABT_xstream_create_with_rank(), ABT_xstream_set_main_sched(), and ABT_xstream_set_main_sched_basic().
#define ABT_SCHED_NULL ((ABT_sched) (0x03)) |
Definition at line 411 of file abt.h.
Referenced by ABT_sched_free(), ABT_xstream_create(), ABT_xstream_create_with_rank(), and ABT_xstream_set_main_sched().
#define ABT_SUCCESS 0 /* Successful return code */ |
Definition at line 64 of file abt.h.
Referenced by ABT_barrier_create(), ABT_barrier_free(), ABT_barrier_get_num_waiters(), ABT_barrier_reinit(), ABT_barrier_wait(), ABT_cond_broadcast(), ABT_cond_create(), ABT_cond_free(), ABT_cond_signal(), ABT_cond_timedwait(), ABT_cond_wait(), ABT_error_get_str(), ABT_eventual_create(), ABT_eventual_free(), ABT_eventual_reset(), ABT_eventual_set(), ABT_eventual_test(), ABT_eventual_wait(), ABT_finalize(), ABT_future_create(), ABT_future_free(), ABT_future_reset(), ABT_future_set(), ABT_future_test(), ABT_future_wait(), ABT_info_print_all_xstreams(), ABT_info_print_config(), ABT_info_print_pool(), ABT_info_print_sched(), ABT_info_print_thread(), ABT_info_print_thread_attr(), ABT_info_print_thread_stack(), ABT_info_print_thread_stacks_in_pool(), ABT_info_print_xstream(), ABT_info_query_config(), ABT_info_trigger_print_all_thread_stacks(), ABT_init(), ABT_initialized(), ABT_key_create(), ABT_key_free(), ABT_key_get(), ABT_key_set(), ABT_mutex_attr_create(), ABT_mutex_attr_free(), ABT_mutex_attr_set_recursive(), ABT_mutex_create(), ABT_mutex_create_with_attr(), ABT_mutex_equal(), ABT_mutex_free(), ABT_mutex_lock(), ABT_mutex_lock_low(), ABT_mutex_spinlock(), ABT_mutex_trylock(), ABT_mutex_unlock(), ABT_mutex_unlock_de(), ABT_mutex_unlock_se(), ABT_pool_add_sched(), ABT_pool_create(), ABT_pool_create_basic(), ABT_pool_free(), ABT_pool_get_access(), ABT_pool_get_data(), ABT_pool_get_id(), ABT_pool_get_size(), ABT_pool_get_total_size(), ABT_pool_pop(), ABT_pool_pop_timedwait(), ABT_pool_pop_wait(), ABT_pool_print_all(), ABT_pool_push(), ABT_pool_remove(), ABT_pool_set_data(), ABT_rwlock_create(), ABT_rwlock_free(), ABT_rwlock_rdlock(), ABT_rwlock_unlock(), ABT_rwlock_wrlock(), ABT_sched_config_create(), ABT_sched_config_free(), ABT_sched_config_read(), ABT_sched_create(), ABT_sched_create_basic(), ABT_sched_exit(), ABT_sched_finish(), ABT_sched_free(), ABT_sched_get_data(), ABT_sched_get_num_pools(), ABT_sched_get_pools(), ABT_sched_get_size(), ABT_sched_get_total_size(), ABT_sched_has_to_stop(), ABT_sched_set_data(), ABT_self_get_arg(), ABT_self_get_last_pool_id(), ABT_self_get_type(), ABT_self_is_primary(), ABT_self_is_unnamed(), ABT_self_on_primary_xstream(), ABT_self_set_arg(), ABT_self_suspend(), ABT_task_create(), ABT_task_create_on_xstream(), ABT_task_self(), ABT_task_self_id(), ABT_thread_attr_create(), ABT_thread_attr_free(), ABT_thread_attr_get_stack(), ABT_thread_attr_get_stacksize(), ABT_thread_attr_set_callback(), ABT_thread_attr_set_migratable(), ABT_thread_attr_set_stack(), ABT_thread_attr_set_stacksize(), ABT_thread_cancel(), ABT_thread_create(), ABT_thread_create_many(), ABT_thread_create_on_xstream(), ABT_thread_equal(), ABT_thread_exit(), ABT_thread_free(), ABT_thread_free_many(), ABT_thread_get_arg(), ABT_thread_get_attr(), ABT_thread_get_id(), ABT_thread_get_last_pool(), ABT_thread_get_last_pool_id(), ABT_thread_get_last_xstream(), ABT_thread_get_specific(), ABT_thread_get_stacksize(), ABT_thread_get_state(), ABT_thread_is_migratable(), ABT_thread_is_primary(), ABT_thread_is_unnamed(), ABT_thread_join(), ABT_thread_join_many(), ABT_thread_migrate(), ABT_thread_migrate_to_pool(), ABT_thread_migrate_to_sched(), ABT_thread_migrate_to_xstream(), ABT_thread_resume(), ABT_thread_revive(), ABT_thread_self(), ABT_thread_self_id(), ABT_thread_set_arg(), ABT_thread_set_associated_pool(), ABT_thread_set_callback(), ABT_thread_set_migratable(), ABT_thread_set_specific(), ABT_thread_yield(), ABT_thread_yield_to(), ABT_timer_create(), ABT_timer_dup(), ABT_timer_free(), ABT_timer_get_overhead(), ABT_timer_read(), ABT_timer_start(), ABT_timer_stop(), ABT_timer_stop_and_add(), ABT_timer_stop_and_read(), ABT_tool_query_task(), ABT_tool_query_thread(), ABT_tool_register_task_callback(), ABT_tool_register_thread_callback(), ABT_unit_set_associated_pool(), ABT_xstream_barrier_create(), ABT_xstream_barrier_free(), ABT_xstream_barrier_wait(), ABT_xstream_cancel(), ABT_xstream_check_events(), ABT_xstream_create(), ABT_xstream_create_basic(), ABT_xstream_create_with_rank(), ABT_xstream_equal(), ABT_xstream_exit(), ABT_xstream_free(), ABT_xstream_get_cpubind(), ABT_xstream_get_main_pools(), ABT_xstream_get_main_sched(), ABT_xstream_get_num(), ABT_xstream_get_rank(), ABT_xstream_get_state(), ABT_xstream_is_primary(), ABT_xstream_join(), ABT_xstream_revive(), ABT_xstream_run_unit(), ABT_xstream_self(), ABT_xstream_self_rank(), ABT_xstream_set_affinity(), ABT_xstream_set_cpubind(), ABT_xstream_set_main_sched(), ABT_xstream_set_main_sched_basic(), ABT_xstream_set_rank(), ABTU_alloc_largepage(), ABTU_calloc(), ABTU_is_supported_largepage_type(), ABTU_memalign(), ABTU_realloc(), apply_cpuset(), finailze_library(), get_num_cores(), id_list_add(), id_list_create(), info_add_pool_set(), info_initialize_pool_set(), info_print_thread_stacks_in_pool(), init_library(), list_add(), list_create(), pool_create(), pool_free(), pool_init(), pool_print_all(), pool_remove(), pool_remove_private(), pool_remove_shared(), print_all_thread_stacks(), read_cpuset(), sched_create(), sched_free(), sched_init(), task_create(), thread_join(), thread_migrate_to_pool(), thread_migrate_to_xstream(), timer_alloc(), tool_query(), xstream_create(), xstream_join(), xstream_migrate_thread(), xstream_schedule_ythread(), xstream_set_new_rank(), xstream_start(), xstream_update_main_sched(), and ythread_create().
#define ABT_task_cancel ABT_thread_cancel |
#define ABT_task_equal ABT_thread_equal |
#define ABT_task_free ABT_thread_free |
#define ABT_task_get_arg ABT_thread_get_arg |
#define ABT_task_get_id ABT_thread_get_id |
#define ABT_task_get_last_pool ABT_thread_get_last_pool |
#define ABT_task_get_last_pool_id ABT_thread_get_last_pool_id |
#define ABT_task_get_specific ABT_thread_get_specific |
#define ABT_task_get_state ABT_thread_get_state |
#define ABT_task_get_xstream ABT_thread_get_last_xstream |
#define ABT_task_is_migratable ABT_thread_is_migratable |
#define ABT_task_is_unnamed ABT_thread_is_unnamed |
#define ABT_task_join ABT_thread_join |
#define ABT_TASK_NULL ABT_THREAD_NULL |
Definition at line 429 of file abt.h.
Referenced by ABT_task_self(), and unit_get_task().
#define ABT_task_revive ABT_thread_revive |
#define ABT_task_set_migratable ABT_thread_set_migratable |
#define ABT_task_set_specific ABT_thread_set_specific |
#define ABT_TASK_STATE_READY ABT_THREAD_STATE_READY |
#define ABT_TASK_STATE_RUNNING ABT_THREAD_STATE_RUNNING |
#define ABT_TASK_STATE_TERMINATED ABT_THREAD_STATE_TERMINATED |
#define ABT_THREAD_ATTR_NULL ((ABT_thread_attr) (0x09)) |
Definition at line 417 of file abt.h.
Referenced by ABT_thread_attr_free(), and ABT_thread_create_many().
#define ABT_THREAD_NULL ((ABT_thread) (0x08)) |
Definition at line 416 of file abt.h.
Referenced by ABT_thread_free(), ABT_thread_self(), and unit_get_thread().
#define ABT_TIMER_NULL ((ABT_timer) (0x13)) |
Definition at line 426 of file abt.h.
Referenced by ABT_timer_free().
#define ABT_TOOL_CONTEXT_NULL ((ABT_tool_context) (0x14)) |
#define ABT_TOOL_EVENT_TASK_ALL ((uint64_t)(((1 << 12) - 1) << 12)) |
Definition at line 281 of file abt.h.
Referenced by ABT_tool_register_task_callback().
#define ABT_TOOL_EVENT_TASK_CANCEL (ABT_TOOL_EVENT_THREAD_CANCEL << 12) |
#define ABT_TOOL_EVENT_TASK_CREATE (ABT_TOOL_EVENT_THREAD_CREATE << 12) |
#define ABT_TOOL_EVENT_TASK_FINISH (ABT_TOOL_EVENT_THREAD_FINISH << 12) |
#define ABT_TOOL_EVENT_TASK_FREE (ABT_TOOL_EVENT_THREAD_FREE << 12) |
#define ABT_TOOL_EVENT_TASK_JOIN (ABT_TOOL_EVENT_THREAD_JOIN << 12) |
#define ABT_TOOL_EVENT_TASK_NONE (0) |
Definition at line 273 of file abt.h.
Referenced by ABT_tool_register_task_callback(), and finailze_library().
#define ABT_TOOL_EVENT_TASK_REVIVE (ABT_TOOL_EVENT_THREAD_REVIVE << 12) |
#define ABT_TOOL_EVENT_TASK_RUN (ABT_TOOL_EVENT_THREAD_RUN << 12) |
#define ABT_TOOL_EVENT_THREAD_ALL ((uint64_t)((1 << 12) - 1)) |
Definition at line 271 of file abt.h.
Referenced by ABT_tool_register_thread_callback().
#define ABT_TOOL_EVENT_THREAD_NONE (0) |
Definition at line 260 of file abt.h.
Referenced by ABT_tool_register_thread_callback(), and finailze_library().
#define ABT_TRUE 1 |
Definition at line 284 of file abt.h.
Referenced by ABT_eventual_set(), ABT_eventual_test(), ABT_future_test(), ABT_info_print_sched(), ABT_info_query_config(), ABT_mutex_attr_set_recursive(), ABT_mutex_equal(), ABT_self_is_primary(), ABT_self_is_unnamed(), ABT_self_on_primary_xstream(), ABT_thread_attr_create(), ABT_thread_create(), ABT_thread_create_many(), ABT_thread_create_on_xstream(), ABT_thread_equal(), ABT_thread_get_attr(), ABT_thread_is_migratable(), ABT_thread_is_primary(), ABT_thread_is_unnamed(), ABT_thread_yield_to(), ABT_xstream_equal(), ABT_xstream_is_primary(), ABT_xstream_set_rank(), finailze_library(), init_library(), mutex_lock_low(), sched_create(), sched_run(), thread_join(), thread_key_destructor_stackable_sched(), unit_is_in_pool(), xstream_context_thread_func(), xstream_set_new_rank(), xstream_start(), and xstream_update_main_sched().
#define ABT_UNIT_NULL ((ABT_unit) (0x07)) |
Definition at line 415 of file abt.h.
Referenced by ABT_pool_push(), pool_pop(), pool_pop_private(), pool_pop_shared(), pool_pop_timedwait(), pool_pop_wait(), sched_run(), thread_root_func(), unit_free(), and ythread_create().
#define ABT_XSTREAM_BARRIER_NULL ((ABT_xstream_barrier)(0x02)) |
Definition at line 410 of file abt.h.
Referenced by ABT_xstream_barrier_free().
#define ABT_XSTREAM_NULL ((ABT_xstream) (0x01)) |
Definition at line 409 of file abt.h.
Referenced by ABT_xstream_free(), and ABT_xstream_self().
typedef struct ABT_barrier_opaque* ABT_barrier |
typedef enum ABT_sched_state ABT_sched_state ABT_DEPRECATED |
typedef struct ABT_eventual_opaque* ABT_eventual |
typedef enum ABT_exec_entity_type ABT_exec_entity_type |
typedef struct ABT_future_opaque* ABT_future |
typedef enum ABT_info_query_kind ABT_info_query_kind |
typedef struct ABT_mutex_attr_opaque* ABT_mutex_attr |
typedef enum ABT_pool_access ABT_pool_access |
typedef struct ABT_pool_config_opaque* ABT_pool_config |
typedef int(* ABT_pool_init_fn)(ABT_pool, ABT_pool_config) |
typedef enum ABT_pool_kind ABT_pool_kind |
typedef struct ABT_rwlock_opaque* ABT_rwlock |
typedef struct ABT_sched_config_opaque* ABT_sched_config |
typedef int(* ABT_sched_init_fn)(ABT_sched, ABT_sched_config) |
typedef enum ABT_sched_predef ABT_sched_predef |
typedef enum ABT_sched_type ABT_sched_type |
typedef enum ABT_sync_event_type ABT_sync_event_type |
typedef enum ABT_thread_state ABT_task_state |
typedef struct ABT_thread_opaque* ABT_thread |
typedef struct ABT_thread_attr_opaque* ABT_thread_attr |
typedef ABT_unit_id ABT_thread_id |
typedef enum ABT_thread_state ABT_thread_state |
typedef struct ABT_tool_context_opaque* ABT_tool_context |
typedef enum ABT_tool_query_kind ABT_tool_query_kind |
typedef void(* ABT_tool_task_callback_fn)(ABT_task, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg) |
typedef void(* ABT_tool_thread_callback_fn)(ABT_thread, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg) |
typedef ABT_unit(* ABT_unit_create_from_thread_fn)(ABT_thread) |
typedef ABT_thread(* ABT_unit_get_thread_fn)(ABT_unit) |
typedef ABT_unit_type(* ABT_unit_get_type_fn)(ABT_unit) |
typedef uint64_t ABT_unit_id |
typedef enum ABT_unit_type ABT_unit_type |
typedef struct ABT_xstream_opaque* ABT_xstream |
typedef struct ABT_xstream_barrier_opaque* ABT_xstream_barrier |
typedef enum ABT_xstream_state ABT_xstream_state |
enum ABT_exec_entity_type |
enum ABT_info_query_kind |
enum ABT_pool_access |
enum ABT_pool_kind |
enum ABT_sched_predef |
enum ABT_sched_state |
enum ABT_sched_type |
enum ABT_sync_event_type |
enum ABT_thread_state |
enum ABT_tool_query_kind |
enum ABT_unit_type |
enum ABT_xstream_state |
int ABT_tool_query_task | ( | ABT_tool_context | context, |
uint64_t | event_task, | ||
ABT_tool_query_kind | query_kind, | ||
void * | val | ||
) |
Query information associated with a tasklet event.
ABT_tool_query_task()
returns information associated with the tasklet event via context
. See ABT_tool_query_thread()
for details.
[in] | context | handle to the tool context |
[in] | event_task | tasklet event code passed to the callback function |
[in] | query_kind | query kind |
[out] | val | pointer to storage where a returned value is saved |
ABT_SUCCESS | on success |
ABT_ERR_FEATURE_NA | the tool feature is not supported |
int ABT_tool_query_thread | ( | ABT_tool_context | context, |
uint64_t | event_thread, | ||
ABT_tool_query_kind | query_kind, | ||
void * | val | ||
) |
Query information associated with a ULT event.
ABT_tool_query()
returns information associated with the tool context context
through val
. Since context
is valid only in the callback handler, this function must be called in the callback handler.
When query_kind
is ABT_TOOL_QUERY_KIND_POOL, it sets *val
to ABT_pool
of a pool to which a work unit is or will be pushed. The query is valid when event
is THREAD_CREATE, THREAD_REVIVE, THREAD_YIELD, THREAD_RESUME, TASK_CREATE, or TASK_REVIVE. Otherwise, *val
is set to ABT_POOL_NULL.
When query_kind
is ABT_TOOL_QUERY_KIND_STACK_DEPTH, it sets *val
to the current depth of stackable work units as an int
value while the level of the main scheduler is zero. For example, if the current thread is directly running on the main scheduler, the depth is 1. The query is valid when event
is THREAD_RUN and TASK_RUN (the depth after the work unit runs), THREAD_FINISH and TASK_FINISH (the depth before the work unit finishes), THREAD_YIELD (the depth before the work unit yields), and THREAD_SUSPEND (the depth before the work unit suspends). Otherwise, *val
is set to zero.
When query_kind
is ABT_TOOL_QUERY_KIND_CALLER_TYPE, *val
is set to ABT_exec_entity_type of an entity which incurs this event. The query is valid for all events.
When query_kind
is ABT_TOOL_QUERY_KIND_CALLER_HANDLE, *val
is set to a handle of an entity which incurs this event. Specifically, *val
is set to a ULT handle (ABT_thread) if the caller type is ABT_EXEC_ENTITY_TYPE_THREAD. *val
is set to a tasklet handle (ABT_task) if the caller type is ABT_EXEC_ENTITY_TYPE_TASK. If the caller is an external thread, *val
is set to NULL. The query is valid for all events except for THREAD_CANCEL and TASK_CANCEL. Note that the caller is a previous work unit when event
is THRAED_RUN or TASK_RUN.
When query_kind
is ABT_TOOL_QUERY_KIND_SYNC_OBJECT_TYPE, *val
is set to ABT_sync_event_type of an synchronization object which incurs this event. The synchronization object is returned when query_kind
is ABT_TOOL_QUERY_KIND_SYNC_OBJECT_HANDLE. Synchronization events, and ABT_sync_event_type, and synchronization objects are mapped as follows:
event
is neither THREAD_YIELD nor THREAD_SUSPEND. The synchronization object is not set ((void *)NULL). This query is valid for THREAD_YIELD and THREAD_SUSPEND.An object to which a returned handle points to may be in an intermediate state, so users are discouraged not to read any internal state of such an object (e.g., by ABT_thread_get_state() or ABT_pool_get_size()).
[in] | context | handle to the tool context |
[in] | event | event code passed to the callback function |
[in] | query_kind | query kind |
[out] | val | pointer to storage where a returned value is saved |
ABT_SUCCESS | on success |
ABT_ERR_FEATURE_NA | the tool feature is not supported |
int ABT_tool_register_task_callback | ( | ABT_tool_task_callback_fn | cb_func, |
uint64_t | event_mask_task, | ||
void * | user_arg | ||
) |
Register a callback function for tasklet events.
ABT_tool_register_task_callback()
sets a callback function cb_func
for tasklet events. Events that are not in event_mask
are excluded. Users can stop the event callback by setting cb_func
to zero.
cb_func
is called with a target tasklet (the first argument), an underlying execution stream (the second argument), an event code (the third argument, see ABT_TOOL_EVENT_TASK), and the tool context that can be used for ABT_tool_query(). If the event occurs on an external thread, ABT_XSTREAM_NULL is passed. The returned tool context is only valid in the callback function.
An object to which a returned handle points to may be in an intermediate state, so users are discouraged not to read any internal state of such an object (e.g., by ABT_thread_get_state()).
[in] | cb_func | callback function pointer |
[in] | event_mask | event code mask |
[in] | user_arg | user argument passed to cb_func |
ABT_SUCCESS | on success |
ABT_ERR_FEATURE_NA | tool feature is not supported |
int ABT_tool_register_thread_callback | ( | ABT_tool_thread_callback_fn | cb_func, |
uint64_t | event_mask_thread, | ||
void * | user_arg | ||
) |
Register a callback function for ULT events.
ABT_tool_register_thread_callback()
sets a callback function cb_func
for ULT events. Events that are not in event_mask
are excluded. Users can stop the event callback by setting cb_func
to zero.
cb_func
is called with a target thread (the first argument), an underlying execution stream (the second argument), an event code (the third argument, see ABT_TOOL_EVENT_THREAD), and the tool context that can be used for ABT_tool_query(). If the event occurs on an external thread, ABT_XSTREAM_NULL is passed. The returned tool context is only valid in the callback function.
An object to which a returned handle points to may be in an intermediate state, so users are discouraged not to read any internal state of such an object (e.g., by ABT_thread_get_state()).
[in] | cb_func | callback function pointer |
[in] | event_mask | event code mask |
[in] | user_arg | user argument passed to cb_func |
ABT_SUCCESS | on success |
ABT_ERR_FEATURE_NA | tool feature is not supported |
ABT_sched_config_var ABT_sched_config_automatic ABT_API_PUBLIC |