ARGOBOTS
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
abt.h File Reference
#include <stdio.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/time.h>
Include dependency graph for abt.h:
This graph shows which files directly or indirectly include this file:

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.0"
 
#define ABT_NUMVERSION   10000300
 
#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 /* Memeory 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   18 /* Invalid tasklet */
 
#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_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   37 /* Task-related error */
 
#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_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_TASK_NULL   ((ABT_task) (0x0a))
 
#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))
 

Typedefs

typedef struct ABT_xstream_opaque * ABT_xstream
 
typedef enum ABT_xstream_state ABT_xstream_state
 
typedef struct ABT_xstream_barrier_opaque * ABT_xstream_barrier
 
typedef struct ABT_sched_opaque * ABT_sched
 
typedef struct ABT_sched_config_opaque * ABT_sched_config
 
typedef enum ABT_sched_predef ABT_sched_predef
 
typedef enum ABT_sched_state ABT_sched_state
 
typedef enum ABT_sched_type ABT_sched_type
 
typedef struct ABT_pool_opaque * ABT_pool
 
typedef struct ABT_pool_config_opaque * ABT_pool_config
 
typedef enum ABT_pool_kind ABT_pool_kind
 
typedef enum ABT_pool_access ABT_pool_access
 
typedef struct ABT_unit_opaque * ABT_unit
 
typedef enum ABT_unit_type ABT_unit_type
 
typedef struct ABT_thread_opaque * ABT_thread
 
typedef struct ABT_thread_attr_opaque * ABT_thread_attr
 
typedef enum ABT_thread_state ABT_thread_state
 
typedef enum ABT_task_state ABT_task_state
 
typedef uint64_t ABT_thread_id
 
typedef struct ABT_task_opaque * ABT_task
 
typedef struct ABT_key_opaque * ABT_key
 
typedef struct ABT_mutex_opaque * ABT_mutex
 
typedef struct ABT_mutex_attr_opaque * ABT_mutex_attr
 
typedef struct ABT_cond_opaque * ABT_cond
 
typedef struct ABT_rwlock_opaque * ABT_rwlock
 
typedef struct ABT_eventual_opaque * ABT_eventual
 
typedef struct ABT_future_opaque * ABT_future
 
typedef struct ABT_barrier_opaque * ABT_barrier
 
typedef struct ABT_timer_opaque * ABT_timer
 
typedef int ABT_bool
 
typedef enum ABT_info_query_kind ABT_info_query_kind
 
typedef int(* ABT_sched_init_fn) (ABT_sched, ABT_sched_config)
 
typedef void(* ABT_sched_run_fn) (ABT_sched)
 
typedef int(* ABT_sched_free_fn) (ABT_sched)
 
typedef ABT_pool(* ABT_sched_get_migr_pool_fn) (ABT_sched)
 
typedef ABT_unit_type(* ABT_unit_get_type_fn) (ABT_unit)
 
typedef ABT_thread(* ABT_unit_get_thread_fn) (ABT_unit)
 
typedef ABT_task(* ABT_unit_get_task_fn) (ABT_unit)
 
typedef ABT_bool(* ABT_unit_is_in_pool_fn) (ABT_unit)
 
typedef ABT_unit(* ABT_unit_create_from_thread_fn) (ABT_thread)
 
typedef ABT_unit(* ABT_unit_create_from_task_fn) (ABT_task)
 
typedef void(* ABT_unit_free_fn) (ABT_unit *)
 
typedef int(* ABT_pool_init_fn) (ABT_pool, ABT_pool_config)
 
typedef size_t(* ABT_pool_get_size_fn) (ABT_pool)
 
typedef void(* ABT_pool_push_fn) (ABT_pool, ABT_unit)
 
typedef ABT_unit(* ABT_pool_pop_fn) (ABT_pool)
 
typedef ABT_unit(* ABT_pool_pop_timedwait_fn) (ABT_pool, double)
 
typedef int(* ABT_pool_remove_fn) (ABT_pool, ABT_unit)
 
typedef int(* ABT_pool_free_fn) (ABT_pool)
 
typedef int(* ABT_pool_print_all_fn) (ABT_pool, void *arg, void(*) (void *, ABT_unit))
 

Enumerations

enum  ABT_xstream_state { ABT_XSTREAM_STATE_RUNNING, ABT_XSTREAM_STATE_TERMINATED }
 
enum  ABT_thread_state { ABT_THREAD_STATE_READY, ABT_THREAD_STATE_RUNNING, ABT_THREAD_STATE_BLOCKED, ABT_THREAD_STATE_TERMINATED }
 
enum  ABT_task_state { ABT_TASK_STATE_READY, ABT_TASK_STATE_RUNNING, ABT_TASK_STATE_TERMINATED }
 
enum  ABT_sched_state { ABT_SCHED_STATE_READY, ABT_SCHED_STATE_RUNNING, ABT_SCHED_STATE_STOPPED, ABT_SCHED_STATE_TERMINATED }
 
enum  ABT_sched_predef {
  ABT_SCHED_DEFAULT, ABT_SCHED_BASIC, ABT_SCHED_PRIO, ABT_SCHED_RANDWS,
  ABT_SCHED_BASIC_WAIT
}
 
enum  ABT_sched_type { ABT_SCHED_TYPE_ULT, ABT_SCHED_TYPE_TASK }
 
enum  ABT_pool_kind { ABT_POOL_FIFO, ABT_POOL_FIFO_WAIT }
 
enum  ABT_pool_access {
  ABT_POOL_ACCESS_PRIV, ABT_POOL_ACCESS_SPSC, ABT_POOL_ACCESS_MPSC, ABT_POOL_ACCESS_SPMC,
  ABT_POOL_ACCESS_MPMC
}
 
enum  ABT_unit_type { ABT_UNIT_TYPE_THREAD, ABT_UNIT_TYPE_TASK, ABT_UNIT_TYPE_XSTREAM, ABT_UNIT_TYPE_EXT }
 
enum  ABT_info_query_kind {
  ABT_INFO_QUERY_KIND_ENABLED_DEBUG, ABT_INFO_QUERY_KIND_ENABLED_PRINT_ERRNO, ABT_INFO_QUERY_KIND_ENABLED_LOG, ABT_INFO_QUERY_KIND_ENABLED_VALGRIND,
  ABT_INFO_QUERY_KIND_ENABLED_CHECK_ERROR, ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_PRODUCER, ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_CONSUMER, ABT_INFO_QUERY_KIND_ENABLED_PRESERVE_FPU,
  ABT_INFO_QUERY_KIND_ENABLED_THREAD_CANCEL, ABT_INFO_QUERY_KIND_ENABLED_TASK_CANCEL, ABT_INFO_QUERY_KIND_ENABLED_MIGRATION, ABT_INFO_QUERY_KIND_ENABLED_STACKABLE_SCHED,
  ABT_INFO_QUERY_KIND_ENABLED_EXTERNAL_THREAD, ABT_INFO_QUERY_KIND_ENABLED_SCHED_SLEEP, ABT_INFO_QUERY_KIND_ENABLED_PRINT_CONFIG, ABT_INFO_QUERY_KIND_ENABLED_AFFINITY,
  ABT_INFO_QUERY_KIND_MAX_NUM_XSTREAMS, ABT_INFO_QUERY_KIND_DEFAULT_THREAD_STACKSIZE, ABT_INFO_QUERY_KIND_DEFAULT_SCHED_STACKSIZE, ABT_INFO_QUERY_KIND_DEFAULT_SCHED_EVENT_FREQ,
  ABT_INFO_QUERY_KIND_DEFAULT_SCHED_SLEEP_NSEC
}
 
enum  ABT_sched_config_type { ABT_SCHED_CONFIG_INT = 0, ABT_SCHED_CONFIG_DOUBLE = 1, ABT_SCHED_CONFIG_PTR = 2 }
 

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, const 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_timedwait (ABT_pool pool, ABT_unit *unit, double abstime_secs) 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_thread_id *id) ABT_API_PUBLIC
 Return the calling ULT's ID. 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_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_thread_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_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_revive (ABT_pool pool, void(*task_func)(void *), void *arg, ABT_task *task) ABT_API_PUBLIC
 Revive the tasklet. More...
 
int ABT_task_free (ABT_task *task) ABT_API_PUBLIC
 Release the task object associated with task handle. More...
 
int ABT_task_join (ABT_task task) ABT_API_PUBLIC
 Wait for the tasklet to terminate. More...
 
int ABT_task_cancel (ABT_task task) ABT_API_PUBLIC
 Request the cancellation of the target task. More...
 
int ABT_task_self (ABT_task *task) ABT_API_PUBLIC
 Return the handle of the calling tasklet. More...
 
int ABT_task_self_id (uint64_t *id) ABT_API_PUBLIC
 Return the ID of the calling tasklet. More...
 
int ABT_task_get_xstream (ABT_task task, ABT_xstream *xstream) ABT_API_PUBLIC
 Get the ES associated with the target tasklet. More...
 
int ABT_task_get_state (ABT_task task, ABT_task_state *state) ABT_API_PUBLIC
 Return the state of task. More...
 
int ABT_task_get_last_pool (ABT_task task, ABT_pool *pool) ABT_API_PUBLIC
 Return the last pool of task. More...
 
int ABT_task_get_last_pool_id (ABT_task task, int *id) ABT_API_PUBLIC
 Get the last pool's ID of the tasklet. More...
 
int ABT_task_set_migratable (ABT_task task, ABT_bool flag) ABT_API_PUBLIC
 Set the tasklet's migratability. More...
 
int ABT_task_is_migratable (ABT_task task, ABT_bool *flag) ABT_API_PUBLIC
 Get the tasklet's migratability. More...
 
int ABT_task_equal (ABT_task task1, ABT_task task2, ABT_bool *result) ABT_API_PUBLIC
 Compare two tasklet handles for equality. More...
 
int ABT_task_get_id (ABT_task task, uint64_t *task_id) ABT_API_PUBLIC
 Get the tasklet's id. More...
 
int ABT_task_get_arg (ABT_task task, void **arg) ABT_API_PUBLIC
 Retrieve the argument for the tasklet function. 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_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_task (FILE *fp, ABT_task task) ABT_API_PUBLIC
 Write the information of the target tasklet 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...
 

Variables

ABT_sched_config_var ABT_sched_config_var_end ABT_API_PUBLIC
 

Macro Definition Documentation

Definition at line 14 of file abt.h.

#define ABT_BARRIER_NULL   ((ABT_barrier) (0x12))

Definition at line 354 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))

Definition at line 58 of file abt.h.

#define ABT_COND_NULL   ((ABT_cond) (0x0e))

Definition at line 350 of file abt.h.

Referenced by ABT_cond_free().

#define ABT_DEPRECATED   __attribute__((deprecated))

Definition at line 61 of file abt.h.

#define ABT_ERR_BARRIER   46 /* Barrier-related error */

Definition at line 110 of file abt.h.

Referenced by ABT_barrier_wait().

#define ABT_ERR_COND   41 /* Condition-related error */

Definition at line 105 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 106 of file abt.h.

Referenced by ABT_cond_timedwait().

#define ABT_ERR_EVENTUAL   44 /* Eventual-related error */

Definition at line 108 of file abt.h.

Referenced by ABT_eventual_wait().

#define ABT_ERR_FEATURE_NA   51 /* Feature not available */
#define ABT_ERR_FUTURE   45 /* Future-related error */

Definition at line 109 of file abt.h.

Referenced by ABT_future_set(), and ABT_future_wait().

#define ABT_ERR_INV_BARRIER   26 /* Invalid barrier */

Definition at line 90 of file abt.h.

#define ABT_ERR_INV_COND   22 /* Invalid condition variable */

Definition at line 86 of file abt.h.

#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_FUTURE   25 /* Invalid future */

Definition at line 89 of file abt.h.

#define ABT_ERR_INV_KEY   19 /* Invalid key */

Definition at line 83 of file abt.h.

#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 */

Definition at line 85 of file abt.h.

#define ABT_ERR_INV_POOL   12 /* Invalid pool */

Definition at line 76 of file abt.h.

Referenced by ABT_pool_free(), and ABT_thread_get_attr().

#define ABT_ERR_INV_POOL_ACCESS   14 /* Invalid pool access mode */
#define ABT_ERR_INV_POOL_KIND   13 /* Invalid pool kind */

Definition at line 77 of file abt.h.

Referenced by ABT_pool_get_id().

#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_RWLOCK   23 /* Invalid rw lock */

Definition at line 87 of file abt.h.

#define ABT_ERR_INV_SCHED   7 /* Invalid scheduler */
#define ABT_ERR_INV_SCHED_CONFIG   11 /* Invalid scheduler config */

Definition at line 75 of file abt.h.

Referenced by ABT_sched_config_free().

#define ABT_ERR_INV_SCHED_KIND   8 /* Invalid scheduler kind */

Definition at line 72 of file abt.h.

#define ABT_ERR_INV_SCHED_PREDEF   9 /* Invalid predefined scheduler */

Definition at line 73 of file abt.h.

Referenced by ABT_sched_get_total_size().

#define ABT_ERR_INV_SCHED_TYPE   10 /* Invalid scheduler type */

Definition at line 74 of file abt.h.

#define ABT_ERR_INV_TASK   18 /* Invalid tasklet */

Definition at line 82 of file abt.h.

Referenced by ABT_key_get(), ABT_key_set(), ABT_task_get_arg(), ABT_task_self(), and ABT_task_self_id().

#define ABT_ERR_INV_THREAD   16 /* Invalid ULT */
#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_TIMER   27 /* Invalid timer */

Definition at line 91 of file abt.h.

#define ABT_ERR_INV_UNIT   15 /* Invalid scheduling unit */

Definition at line 79 of file abt.h.

Referenced by ABT_xstream_run_unit().

#define ABT_ERR_INV_XSTREAM   4 /* Invalid ES */
#define ABT_ERR_INV_XSTREAM_BARRIER   6 /* Invalid ES barrier */

Definition at line 70 of file abt.h.

#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().

#define ABT_ERR_KEY   38 /* Key-related error */

Definition at line 102 of file abt.h.

#define ABT_ERR_MEM   2 /* Memeory allocation failure */

Definition at line 66 of file abt.h.

Referenced by ABT_rwlock_create(), and ABT_timer_get_overhead().

#define ABT_ERR_MIGRATION_NA   49 /* Migration not available */
#define ABT_ERR_MIGRATION_TARGET   48 /* Migration target error */

Definition at line 112 of file abt.h.

Referenced by ABT_thread_get_attr(), and ABT_thread_migrate().

#define ABT_ERR_MISSING_JOIN   50 /* An ES or more did not join */

Definition at line 114 of file abt.h.

#define ABT_ERR_MUTEX   39 /* Mutex-related error */

Definition at line 103 of file abt.h.

#define ABT_ERR_MUTEX_LOCKED   40 /* Return value when mutex is locked */

Definition at line 104 of file abt.h.

#define ABT_ERR_OTHER   3 /* Other error */
#define ABT_ERR_POOL   34 /* Pool-related error */
#define ABT_ERR_RWLOCK   43 /* rwlock-related error */

Definition at line 107 of file abt.h.

#define ABT_ERR_SCHED   32 /* Scheduler-related error */
#define ABT_ERR_SCHED_CONFIG   33 /* Scheduler config error */

Definition at line 97 of file abt.h.

Referenced by ABT_sched_config_create().

#define ABT_ERR_TASK   37 /* Task-related error */

Definition at line 101 of file abt.h.

#define ABT_ERR_THREAD   36 /* ULT-related error */

Definition at line 100 of file abt.h.

Referenced by ABT_thread_get_attr(), ABT_thread_yield(), and ABT_xstream_get_affinity().

#define ABT_ERR_TIMER   47 /* Timer-related error */

Definition at line 111 of file abt.h.

#define ABT_ERR_UNINITIALIZED   1 /* Uninitialized */
#define ABT_ERR_UNIT   35 /* Scheduling unit-related error */

Definition at line 99 of file abt.h.

Referenced by ABT_pool_push().

#define ABT_ERR_XSTREAM   29 /* ES-related error */

Definition at line 93 of file abt.h.

Referenced by ABT_xstream_set_main_sched(), and ABTDI_xstream_context_thread_func().

#define ABT_ERR_XSTREAM_BARRIER   31 /* ES barrier-related error */

Definition at line 95 of file abt.h.

#define ABT_ERR_XSTREAM_STATE   30 /* ES state error */

Definition at line 94 of file abt.h.

Referenced by ABT_xstream_set_main_sched().

#define ABT_EVENTUAL_NULL   ((ABT_eventual) (0x10))

Definition at line 352 of file abt.h.

Referenced by ABT_eventual_free().

#define ABT_FALSE   0
#define ABT_FUTURE_NULL   ((ABT_future) (0x11))

Definition at line 353 of file abt.h.

Referenced by ABT_future_free().

#define ABT_KEY_NULL   ((ABT_key) (0x0b))

Definition at line 347 of file abt.h.

Referenced by ABT_key_free().

#define ABT_MUTEX_ATTR_NULL   ((ABT_mutex_attr) (0x0d))

Definition at line 349 of file abt.h.

Referenced by ABT_mutex_attr_free().

#define ABT_MUTEX_NULL   ((ABT_mutex) (0x0c))

Definition at line 348 of file abt.h.

Referenced by ABT_mutex_free().

#define ABT_NULL   0

Definition at line 315 of file abt.h.

#define ABT_NUMVERSION   10000300

Definition at line 51 of file abt.h.

#define ABT_POOL_CONFIG_NULL   ((ABT_pool_config) (0x06))

Definition at line 342 of file abt.h.

Referenced by ABT_pool_get_id().

#define ABT_POOL_NULL   ((ABT_pool) (0x05))
#define ABT_RELEASE_TYPE_ALPHA   0

Definition at line 53 of file abt.h.

#define ABT_RELEASE_TYPE_BETA   1

Definition at line 54 of file abt.h.

#define ABT_RELEASE_TYPE_PATCH   3

Definition at line 56 of file abt.h.

#define ABT_RELEASE_TYPE_RC   2

Definition at line 55 of file abt.h.

#define ABT_RWLOCK_NULL   ((ABT_rwlock) (0x0f))

Definition at line 351 of file abt.h.

Referenced by ABT_rwlock_free().

#define ABT_SCHED_CONFIG_NULL   ((ABT_sched_config) (0x04))
#define ABT_SCHED_NULL   ((ABT_sched) (0x03))
#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_pool(), ABT_info_print_sched(), ABT_info_print_task(), 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_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_on_primary_xstream(), ABT_self_set_arg(), ABT_self_suspend(), ABT_task_cancel(), ABT_task_create(), ABT_task_create_on_xstream(), ABT_task_equal(), ABT_task_free(), ABT_task_get_arg(), ABT_task_get_id(), ABT_task_get_last_pool(), ABT_task_get_last_pool_id(), ABT_task_get_state(), ABT_task_get_xstream(), ABT_task_is_migratable(), ABT_task_join(), ABT_task_revive(), ABT_task_self(), ABT_task_self_id(), ABT_task_set_migratable(), 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_stacksize(), ABT_thread_get_state(), ABT_thread_is_migratable(), ABT_thread_is_primary(), ABT_thread_join(), ABT_thread_join_many(), ABT_thread_migrate(), 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_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_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_affinity(), 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(), ABTDI_thread_context_create(), ABTDI_xstream_context_thread_func(), pool_free(), pool_get_data_ptr(), pool_init(), pool_print_all(), pool_remove(), pool_remove_private(), pool_remove_shared(), sched_free(), and sched_init().

#define ABT_TASK_NULL   ((ABT_task) (0x0a))
#define ABT_THREAD_ATTR_NULL   ((ABT_thread_attr) (0x09))

Definition at line 345 of file abt.h.

Referenced by ABT_thread_attr_free(), and ABT_thread_create_many().

#define ABT_THREAD_NULL   ((ABT_thread) (0x08))
#define ABT_TIMER_NULL   ((ABT_timer) (0x13))

Definition at line 355 of file abt.h.

Referenced by ABT_timer_create(), and ABT_timer_free().

#define ABT_TRUE   1
#define ABT_UNIT_NULL   ((ABT_unit) (0x07))
#define ABT_VERSION   "1.0"

Definition at line 50 of file abt.h.

#define ABT_XSTREAM_ANY_RANK   -1

Definition at line 227 of file abt.h.

#define ABT_XSTREAM_BARRIER_NULL   ((ABT_xstream_barrier)(0x02))

Definition at line 338 of file abt.h.

Referenced by ABT_xstream_barrier_free().

#define ABT_XSTREAM_NULL   ((ABT_xstream) (0x01))

Typedef Documentation

typedef struct ABT_barrier_opaque* ABT_barrier

Definition at line 305 of file abt.h.

typedef int ABT_bool

Definition at line 309 of file abt.h.

typedef struct ABT_cond_opaque* ABT_cond

Definition at line 297 of file abt.h.

typedef struct ABT_eventual_opaque* ABT_eventual

Definition at line 301 of file abt.h.

typedef struct ABT_future_opaque* ABT_future

Definition at line 303 of file abt.h.

Definition at line 311 of file abt.h.

typedef struct ABT_key_opaque* ABT_key

Definition at line 291 of file abt.h.

typedef struct ABT_mutex_opaque* ABT_mutex

Definition at line 293 of file abt.h.

typedef struct ABT_mutex_attr_opaque* ABT_mutex_attr

Definition at line 295 of file abt.h.

typedef struct ABT_pool_opaque* ABT_pool

Definition at line 267 of file abt.h.

Definition at line 273 of file abt.h.

typedef struct ABT_pool_config_opaque* ABT_pool_config

Definition at line 269 of file abt.h.

typedef int(* ABT_pool_free_fn) (ABT_pool)

Definition at line 410 of file abt.h.

typedef size_t(* ABT_pool_get_size_fn) (ABT_pool)

Definition at line 405 of file abt.h.

typedef int(* ABT_pool_init_fn) (ABT_pool, ABT_pool_config)

Definition at line 404 of file abt.h.

Definition at line 271 of file abt.h.

typedef ABT_unit(* ABT_pool_pop_fn) (ABT_pool)

Definition at line 407 of file abt.h.

typedef ABT_unit(* ABT_pool_pop_timedwait_fn) (ABT_pool, double)

Definition at line 408 of file abt.h.

typedef int(* ABT_pool_print_all_fn) (ABT_pool, void *arg, void(*)(void *, ABT_unit))

Definition at line 411 of file abt.h.

typedef void(* ABT_pool_push_fn) (ABT_pool, ABT_unit)

Definition at line 406 of file abt.h.

typedef int(* ABT_pool_remove_fn) (ABT_pool, ABT_unit)

Definition at line 409 of file abt.h.

typedef struct ABT_rwlock_opaque* ABT_rwlock

Definition at line 299 of file abt.h.

typedef struct ABT_sched_opaque* ABT_sched

Definition at line 257 of file abt.h.

typedef struct ABT_sched_config_opaque* ABT_sched_config

Definition at line 259 of file abt.h.

typedef int(* ABT_sched_free_fn) (ABT_sched)

Definition at line 382 of file abt.h.

typedef ABT_pool(* ABT_sched_get_migr_pool_fn) (ABT_sched)

Definition at line 384 of file abt.h.

typedef int(* ABT_sched_init_fn) (ABT_sched, ABT_sched_config)

Definition at line 380 of file abt.h.

Definition at line 261 of file abt.h.

typedef void(* ABT_sched_run_fn) (ABT_sched)

Definition at line 381 of file abt.h.

Definition at line 263 of file abt.h.

Definition at line 265 of file abt.h.

typedef struct ABT_task_opaque* ABT_task

Definition at line 289 of file abt.h.

Definition at line 285 of file abt.h.

typedef struct ABT_thread_opaque* ABT_thread

Definition at line 279 of file abt.h.

typedef struct ABT_thread_attr_opaque* ABT_thread_attr

Definition at line 281 of file abt.h.

typedef uint64_t ABT_thread_id

Definition at line 287 of file abt.h.

Definition at line 283 of file abt.h.

typedef struct ABT_timer_opaque* ABT_timer

Definition at line 307 of file abt.h.

typedef struct ABT_unit_opaque* ABT_unit

Definition at line 275 of file abt.h.

typedef ABT_unit(* ABT_unit_create_from_task_fn) (ABT_task)

Definition at line 402 of file abt.h.

typedef ABT_unit(* ABT_unit_create_from_thread_fn) (ABT_thread)

Definition at line 401 of file abt.h.

typedef void(* ABT_unit_free_fn) (ABT_unit *)

Definition at line 403 of file abt.h.

typedef ABT_task(* ABT_unit_get_task_fn) (ABT_unit)

Definition at line 399 of file abt.h.

typedef ABT_thread(* ABT_unit_get_thread_fn) (ABT_unit)

Definition at line 398 of file abt.h.

typedef ABT_unit_type(* ABT_unit_get_type_fn) (ABT_unit)

Definition at line 397 of file abt.h.

typedef ABT_bool(* ABT_unit_is_in_pool_fn) (ABT_unit)

Definition at line 400 of file abt.h.

Definition at line 277 of file abt.h.

typedef struct ABT_xstream_opaque* ABT_xstream

Definition at line 251 of file abt.h.

typedef struct ABT_xstream_barrier_opaque* ABT_xstream_barrier

Definition at line 255 of file abt.h.

Definition at line 253 of file abt.h.

Enumeration Type Documentation

Enumerator
ABT_INFO_QUERY_KIND_ENABLED_DEBUG 
ABT_INFO_QUERY_KIND_ENABLED_PRINT_ERRNO 
ABT_INFO_QUERY_KIND_ENABLED_LOG 
ABT_INFO_QUERY_KIND_ENABLED_VALGRIND 
ABT_INFO_QUERY_KIND_ENABLED_CHECK_ERROR 
ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_PRODUCER 
ABT_INFO_QUERY_KIND_ENABLED_CHECK_POOL_CONSUMER 
ABT_INFO_QUERY_KIND_ENABLED_PRESERVE_FPU 
ABT_INFO_QUERY_KIND_ENABLED_THREAD_CANCEL 
ABT_INFO_QUERY_KIND_ENABLED_TASK_CANCEL 
ABT_INFO_QUERY_KIND_ENABLED_MIGRATION 
ABT_INFO_QUERY_KIND_ENABLED_STACKABLE_SCHED 
ABT_INFO_QUERY_KIND_ENABLED_EXTERNAL_THREAD 
ABT_INFO_QUERY_KIND_ENABLED_SCHED_SLEEP 
ABT_INFO_QUERY_KIND_ENABLED_PRINT_CONFIG 
ABT_INFO_QUERY_KIND_ENABLED_AFFINITY 
ABT_INFO_QUERY_KIND_MAX_NUM_XSTREAMS 
ABT_INFO_QUERY_KIND_DEFAULT_THREAD_STACKSIZE 
ABT_INFO_QUERY_KIND_DEFAULT_SCHED_STACKSIZE 
ABT_INFO_QUERY_KIND_DEFAULT_SCHED_EVENT_FREQ 
ABT_INFO_QUERY_KIND_DEFAULT_SCHED_SLEEP_NSEC 

Definition at line 177 of file abt.h.

Enumerator
ABT_POOL_ACCESS_PRIV 
ABT_POOL_ACCESS_SPSC 
ABT_POOL_ACCESS_MPSC 
ABT_POOL_ACCESS_SPMC 
ABT_POOL_ACCESS_MPMC 

Definition at line 162 of file abt.h.

Enumerator
ABT_POOL_FIFO 
ABT_POOL_FIFO_WAIT 

Definition at line 157 of file abt.h.

Enumerator
ABT_SCHED_CONFIG_INT 
ABT_SCHED_CONFIG_DOUBLE 
ABT_SCHED_CONFIG_PTR 

Definition at line 359 of file abt.h.

Enumerator
ABT_SCHED_DEFAULT 
ABT_SCHED_BASIC 
ABT_SCHED_PRIO 
ABT_SCHED_RANDWS 
ABT_SCHED_BASIC_WAIT 

Definition at line 144 of file abt.h.

Enumerator
ABT_SCHED_STATE_READY 
ABT_SCHED_STATE_RUNNING 
ABT_SCHED_STATE_STOPPED 
ABT_SCHED_STATE_TERMINATED 

Definition at line 137 of file abt.h.

Enumerator
ABT_SCHED_TYPE_ULT 
ABT_SCHED_TYPE_TASK 

Definition at line 152 of file abt.h.

Enumerator
ABT_TASK_STATE_READY 
ABT_TASK_STATE_RUNNING 
ABT_TASK_STATE_TERMINATED 

Definition at line 131 of file abt.h.

Enumerator
ABT_THREAD_STATE_READY 
ABT_THREAD_STATE_RUNNING 
ABT_THREAD_STATE_BLOCKED 
ABT_THREAD_STATE_TERMINATED 

Definition at line 124 of file abt.h.

Enumerator
ABT_UNIT_TYPE_THREAD 
ABT_UNIT_TYPE_TASK 
ABT_UNIT_TYPE_XSTREAM 
ABT_UNIT_TYPE_EXT 

Definition at line 170 of file abt.h.

Enumerator
ABT_XSTREAM_STATE_RUNNING 
ABT_XSTREAM_STATE_TERMINATED 

Definition at line 119 of file abt.h.

Function Documentation

int ABT_mutex_lock_high ( ABT_mutex  mutex)

Definition at line 312 of file mutex.c.

int ABT_mutex_unlock_de ( ABT_mutex  mutex)

Definition at line 634 of file mutex.c.

int ABT_pool_pop_timedwait ( ABT_pool  pool,
ABT_unit unit,
double  abstime_secs 
)

Definition at line 226 of file pool.c.

int ABT_pool_print_all ( ABT_pool  pool,
void *  arg,
void(*)(void *arg, ABT_unit print_fn 
)

Variable Documentation

Definition at line 372 of file abt.h.