ARGOBOTS  1059a7c2eb7e3f99f736a9c3a4f6ea476ac1b804
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
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.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
 

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 
ABT_DEPRECATED
 
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 uint64_t ABT_unit_id
 
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_thread_state ABT_task_state
 
typedef ABT_unit_id ABT_thread_id
 
typedef struct ABT_thread_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 struct
ABT_tool_context_opaque * 
ABT_tool_context
 
typedef enum ABT_tool_query_kind ABT_tool_query_kind
 
typedef enum ABT_exec_entity_type ABT_exec_entity_type
 
typedef enum ABT_sync_event_type ABT_sync_event_type
 
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_wait_fn )(ABT_pool, double)
 
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))
 
typedef void(* ABT_tool_thread_callback_fn )(ABT_thread, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg)
 
typedef void(* ABT_tool_task_callback_fn )(ABT_task, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg)
 

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_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, ABT_INFO_QUERY_KIND_ENABLED_TOOL
}
 
enum  ABT_tool_query_kind {
  ABT_TOOL_QUERY_KIND_POOL, ABT_TOOL_QUERY_KIND_STACK_DEPTH, ABT_TOOL_QUERY_KIND_CALLER_TYPE, ABT_TOOL_QUERY_KIND_CALLER_HANDLE,
  ABT_TOOL_QUERY_KIND_SYNC_OBJECT_TYPE, ABT_TOOL_QUERY_KIND_SYNC_OBJECT_HANDLE
}
 
enum  ABT_exec_entity_type { ABT_EXEC_ENTITY_TYPE_EXT, ABT_EXEC_ENTITY_TYPE_THREAD, ABT_EXEC_ENTITY_TYPE_TASK }
 
enum  ABT_sync_event_type {
  ABT_SYNC_EVENT_TYPE_UNKNOWN = 0, ABT_SYNC_EVENT_TYPE_USER, ABT_SYNC_EVENT_TYPE_OTHER, ABT_SYNC_EVENT_TYPE_XSTREAM_JOIN,
  ABT_SYNC_EVENT_TYPE_THREAD_JOIN, ABT_SYNC_EVENT_TYPE_TASK_JOIN, ABT_SYNC_EVENT_TYPE_MUTEX, ABT_SYNC_EVENT_TYPE_COND,
  ABT_SYNC_EVENT_TYPE_RWLOCK, ABT_SYNC_EVENT_TYPE_EVENTUAL, ABT_SYNC_EVENT_TYPE_FUTURE, ABT_SYNC_EVENT_TYPE_BARRIER
}
 
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, 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
 

Macro Definition Documentation

Definition at line 14 of file abt.h.

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

Definition at line 58 of file abt.h.

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

Definition at line 61 of file abt.h.

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

Definition at line 111 of file abt.h.

#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_EVENTUAL   44 /* Eventual-related error */

Definition at line 109 of file abt.h.

#define ABT_ERR_FEATURE_NA   51 /* Feature not available */
#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_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().

#define ABT_ERR_INV_POOL_ACCESS   14 /* Invalid pool access mode */

Definition at line 78 of file abt.h.

#define ABT_ERR_INV_POOL_KIND   13 /* Invalid pool kind */

Definition at line 77 of file abt.h.

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

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

#define ABT_ERR_INV_SCHED_TYPE   10 /* Invalid scheduler type */

Definition at line 74 of file abt.h.

#define ABT_ERR_INV_TASK   ABT_ERR_INV_THREAD

Definition at line 82 of file abt.h.

#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_TOOL_CONTEXT   52 /* Invalid tool context */

Definition at line 93 of file abt.h.

#define ABT_ERR_INV_UNIT   15 /* Invalid scheduling unit */

Definition at line 79 of file abt.h.

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

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

Definition at line 103 of file abt.h.

#define ABT_ERR_MEM   2 /* Memory allocation failure */
#define ABT_ERR_MIGRATION_NA   49 /* Migration not available */
#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 */

Definition at line 115 of file abt.h.

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

Definition at line 104 of file abt.h.

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

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

#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

Definition at line 102 of file abt.h.

#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_TIMER   47 /* Timer-related error */

Definition at line 112 of file abt.h.

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

Definition at line 96 of file abt.h.

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

Definition at line 807 of file abt.h.

#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_NULL   0

Definition at line 387 of file abt.h.

#define ABT_NUMVERSION   10100001

Definition at line 51 of file abt.h.

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

Definition at line 414 of file abt.h.

#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_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 422 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_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

Definition at line 685 of file abt.h.

#define ABT_task_equal   ABT_thread_equal

Definition at line 695 of file abt.h.

#define ABT_task_free   ABT_thread_free

Definition at line 683 of file abt.h.

#define ABT_task_get_arg   ABT_thread_get_arg

Definition at line 697 of file abt.h.

#define ABT_task_get_id   ABT_thread_get_id

Definition at line 696 of file abt.h.

#define ABT_task_get_last_pool   ABT_thread_get_last_pool

Definition at line 690 of file abt.h.

#define ABT_task_get_last_pool_id   ABT_thread_get_last_pool_id

Definition at line 691 of file abt.h.

#define ABT_task_get_specific   ABT_thread_get_specific

Definition at line 699 of file abt.h.

#define ABT_task_get_state   ABT_thread_get_state

Definition at line 689 of file abt.h.

#define ABT_task_get_xstream   ABT_thread_get_last_xstream

Definition at line 688 of file abt.h.

#define ABT_task_is_migratable   ABT_thread_is_migratable

Definition at line 693 of file abt.h.

#define ABT_task_is_unnamed   ABT_thread_is_unnamed

Definition at line 694 of file abt.h.

#define ABT_task_join   ABT_thread_join

Definition at line 684 of file abt.h.

#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

Definition at line 682 of file abt.h.

#define ABT_task_set_migratable   ABT_thread_set_migratable

Definition at line 692 of file abt.h.

#define ABT_task_set_specific   ABT_thread_set_specific

Definition at line 698 of file abt.h.

#define ABT_TASK_STATE_READY   ABT_THREAD_STATE_READY

Definition at line 132 of file abt.h.

#define ABT_TASK_STATE_RUNNING   ABT_THREAD_STATE_RUNNING

Definition at line 133 of file abt.h.

#define ABT_TASK_STATE_TERMINATED   ABT_THREAD_STATE_TERMINATED

Definition at line 134 of file abt.h.

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

Definition at line 427 of file abt.h.

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

Definition at line 280 of file abt.h.

#define ABT_TOOL_EVENT_TASK_CREATE   (ABT_TOOL_EVENT_THREAD_CREATE << 12)

Definition at line 274 of file abt.h.

#define ABT_TOOL_EVENT_TASK_FINISH   (ABT_TOOL_EVENT_THREAD_FINISH << 12)

Definition at line 279 of file abt.h.

#define ABT_TOOL_EVENT_TASK_FREE   (ABT_TOOL_EVENT_THREAD_FREE << 12)

Definition at line 276 of file abt.h.

#define ABT_TOOL_EVENT_TASK_JOIN   (ABT_TOOL_EVENT_THREAD_JOIN << 12)

Definition at line 275 of file abt.h.

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

Definition at line 277 of file abt.h.

#define ABT_TOOL_EVENT_TASK_RUN   (ABT_TOOL_EVENT_THREAD_RUN << 12)

Definition at line 278 of file abt.h.

#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_CANCEL   (1 << 6)

Definition at line 267 of file abt.h.

#define ABT_TOOL_EVENT_THREAD_CREATE   (1 << 0)

Definition at line 261 of file abt.h.

#define ABT_TOOL_EVENT_THREAD_FINISH   (1 << 5)

Definition at line 266 of file abt.h.

#define ABT_TOOL_EVENT_THREAD_FREE   (1 << 2)

Definition at line 263 of file abt.h.

#define ABT_TOOL_EVENT_THREAD_JOIN   (1 << 1)

Definition at line 262 of file abt.h.

#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_TOOL_EVENT_THREAD_RESUME   (1 << 9)

Definition at line 270 of file abt.h.

#define ABT_TOOL_EVENT_THREAD_REVIVE   (1 << 3)

Definition at line 264 of file abt.h.

#define ABT_TOOL_EVENT_THREAD_RUN   (1 << 4)

Definition at line 265 of file abt.h.

#define ABT_TOOL_EVENT_THREAD_SUSPEND   (1 << 8)

Definition at line 269 of file abt.h.

#define ABT_TOOL_EVENT_THREAD_YIELD   (1 << 7)

Definition at line 268 of file abt.h.

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

Definition at line 50 of file abt.h.

#define ABT_XSTREAM_ANY_RANK   -1

Definition at line 288 of file abt.h.

#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 Documentation

typedef struct ABT_barrier_opaque* ABT_barrier

Definition at line 369 of file abt.h.

typedef int ABT_bool

Definition at line 373 of file abt.h.

typedef struct ABT_cond_opaque* ABT_cond

Definition at line 361 of file abt.h.

Definition at line 325 of file abt.h.

typedef struct ABT_eventual_opaque* ABT_eventual

Definition at line 365 of file abt.h.

Definition at line 381 of file abt.h.

typedef struct ABT_future_opaque* ABT_future

Definition at line 367 of file abt.h.

Definition at line 375 of file abt.h.

typedef struct ABT_key_opaque* ABT_key

Definition at line 355 of file abt.h.

typedef struct ABT_mutex_opaque* ABT_mutex

Definition at line 357 of file abt.h.

typedef struct ABT_mutex_attr_opaque* ABT_mutex_attr

Definition at line 359 of file abt.h.

typedef struct ABT_pool_opaque* ABT_pool

Definition at line 329 of file abt.h.

Definition at line 335 of file abt.h.

typedef struct ABT_pool_config_opaque* ABT_pool_config

Definition at line 331 of file abt.h.

typedef int(* ABT_pool_free_fn)(ABT_pool)

Definition at line 484 of file abt.h.

typedef size_t(* ABT_pool_get_size_fn)(ABT_pool)

Definition at line 478 of file abt.h.

typedef int(* ABT_pool_init_fn)(ABT_pool, ABT_pool_config)

Definition at line 477 of file abt.h.

Definition at line 333 of file abt.h.

typedef ABT_unit(* ABT_pool_pop_fn)(ABT_pool)

Definition at line 480 of file abt.h.

typedef ABT_unit(* ABT_pool_pop_timedwait_fn)(ABT_pool, double)

Definition at line 482 of file abt.h.

typedef ABT_unit(* ABT_pool_pop_wait_fn)(ABT_pool, double)

Definition at line 481 of file abt.h.

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

Definition at line 485 of file abt.h.

typedef void(* ABT_pool_push_fn)(ABT_pool, ABT_unit)

Definition at line 479 of file abt.h.

typedef int(* ABT_pool_remove_fn)(ABT_pool, ABT_unit)

Definition at line 483 of file abt.h.

typedef struct ABT_rwlock_opaque* ABT_rwlock

Definition at line 363 of file abt.h.

typedef struct ABT_sched_opaque* ABT_sched

Definition at line 319 of file abt.h.

typedef struct ABT_sched_config_opaque* ABT_sched_config

Definition at line 321 of file abt.h.

typedef int(* ABT_sched_free_fn)(ABT_sched)

Definition at line 455 of file abt.h.

typedef ABT_pool(* ABT_sched_get_migr_pool_fn)(ABT_sched)

Definition at line 457 of file abt.h.

typedef int(* ABT_sched_init_fn)(ABT_sched, ABT_sched_config)

Definition at line 453 of file abt.h.

Definition at line 323 of file abt.h.

typedef void(* ABT_sched_run_fn)(ABT_sched)

Definition at line 454 of file abt.h.

Definition at line 327 of file abt.h.

Definition at line 383 of file abt.h.

typedef struct ABT_thread_opaque* ABT_task

Definition at line 353 of file abt.h.

Definition at line 349 of file abt.h.

typedef struct ABT_thread_opaque* ABT_thread

Definition at line 343 of file abt.h.

typedef struct ABT_thread_attr_opaque* ABT_thread_attr

Definition at line 345 of file abt.h.

Definition at line 351 of file abt.h.

Definition at line 347 of file abt.h.

typedef struct ABT_timer_opaque* ABT_timer

Definition at line 371 of file abt.h.

typedef struct ABT_tool_context_opaque* ABT_tool_context

Definition at line 377 of file abt.h.

Definition at line 379 of file abt.h.

typedef void(* ABT_tool_task_callback_fn)(ABT_task, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg)

Definition at line 517 of file abt.h.

typedef void(* ABT_tool_thread_callback_fn)(ABT_thread, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg)

Definition at line 515 of file abt.h.

typedef struct ABT_unit_opaque* ABT_unit

Definition at line 337 of file abt.h.

typedef ABT_unit(* ABT_unit_create_from_task_fn)(ABT_task)

Definition at line 475 of file abt.h.

typedef ABT_unit(* ABT_unit_create_from_thread_fn)(ABT_thread)

Definition at line 474 of file abt.h.

typedef void(* ABT_unit_free_fn)(ABT_unit *)

Definition at line 476 of file abt.h.

typedef ABT_task(* ABT_unit_get_task_fn)(ABT_unit)

Definition at line 472 of file abt.h.

typedef ABT_thread(* ABT_unit_get_thread_fn)(ABT_unit)

Definition at line 471 of file abt.h.

typedef ABT_unit_type(* ABT_unit_get_type_fn)(ABT_unit)

Definition at line 470 of file abt.h.

typedef uint64_t ABT_unit_id

Definition at line 341 of file abt.h.

typedef ABT_bool(* ABT_unit_is_in_pool_fn)(ABT_unit)

Definition at line 473 of file abt.h.

Definition at line 339 of file abt.h.

typedef struct ABT_xstream_opaque* ABT_xstream

Definition at line 313 of file abt.h.

typedef struct ABT_xstream_barrier_opaque* ABT_xstream_barrier

Definition at line 317 of file abt.h.

Definition at line 315 of file abt.h.

Enumeration Type Documentation

Enumerator
ABT_EXEC_ENTITY_TYPE_EXT 
ABT_EXEC_ENTITY_TYPE_THREAD 
ABT_EXEC_ENTITY_TYPE_TASK 

Definition at line 237 of file abt.h.

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 
ABT_INFO_QUERY_KIND_ENABLED_TOOL 

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

Enumerator
ABT_POOL_FIFO 
ABT_POOL_FIFO_WAIT 

Definition at line 156 of file abt.h.

Enumerator
ABT_SCHED_CONFIG_INT 
ABT_SCHED_CONFIG_DOUBLE 
ABT_SCHED_CONFIG_PTR 

Definition at line 432 of file abt.h.

Enumerator
ABT_SCHED_DEFAULT 
ABT_SCHED_BASIC 
ABT_SCHED_PRIO 
ABT_SCHED_RANDWS 
ABT_SCHED_BASIC_WAIT 

Definition at line 143 of file abt.h.

Enumerator
ABT_SCHED_STATE_READY 
ABT_SCHED_STATE_RUNNING 
ABT_SCHED_STATE_STOPPED 
ABT_SCHED_STATE_TERMINATED 

Definition at line 136 of file abt.h.

Enumerator
ABT_SCHED_TYPE_ULT 
ABT_SCHED_TYPE_TASK 

Definition at line 151 of file abt.h.

Enumerator
ABT_SYNC_EVENT_TYPE_UNKNOWN 
ABT_SYNC_EVENT_TYPE_USER 
ABT_SYNC_EVENT_TYPE_OTHER 
ABT_SYNC_EVENT_TYPE_XSTREAM_JOIN 
ABT_SYNC_EVENT_TYPE_THREAD_JOIN 
ABT_SYNC_EVENT_TYPE_TASK_JOIN 
ABT_SYNC_EVENT_TYPE_MUTEX 
ABT_SYNC_EVENT_TYPE_COND 
ABT_SYNC_EVENT_TYPE_RWLOCK 
ABT_SYNC_EVENT_TYPE_EVENTUAL 
ABT_SYNC_EVENT_TYPE_FUTURE 
ABT_SYNC_EVENT_TYPE_BARRIER 

Definition at line 244 of file abt.h.

Enumerator
ABT_THREAD_STATE_READY 
ABT_THREAD_STATE_RUNNING 
ABT_THREAD_STATE_BLOCKED 
ABT_THREAD_STATE_TERMINATED 

Definition at line 125 of file abt.h.

Enumerator
ABT_TOOL_QUERY_KIND_POOL 
ABT_TOOL_QUERY_KIND_STACK_DEPTH 
ABT_TOOL_QUERY_KIND_CALLER_TYPE 
ABT_TOOL_QUERY_KIND_CALLER_HANDLE 
ABT_TOOL_QUERY_KIND_SYNC_OBJECT_TYPE 
ABT_TOOL_QUERY_KIND_SYNC_OBJECT_HANDLE 

Definition at line 227 of file abt.h.

Enumerator
ABT_UNIT_TYPE_THREAD 
ABT_UNIT_TYPE_TASK 
ABT_UNIT_TYPE_XSTREAM 
ABT_UNIT_TYPE_EXT 

Definition at line 169 of file abt.h.

Enumerator
ABT_XSTREAM_STATE_RUNNING 
ABT_XSTREAM_STATE_TERMINATED 

Definition at line 120 of file abt.h.

Function Documentation

int ABT_mutex_lock_high ( ABT_mutex  mutex)

Definition at line 209 of file mutex.c.

int ABT_mutex_unlock_de ( ABT_mutex  mutex)

Definition at line 393 of file mutex.c.

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

Definition at line 196 of file pool.c.

int ABT_pool_print_all ( ABT_pool  pool,
void *  arg,
void(*)(void *arg, ABT_unit print_fn 
)
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.

Parameters
[in]contexthandle to the tool context
[in]event_tasktasklet event code passed to the callback function
[in]query_kindquery kind
[out]valpointer to storage where a returned value is saved
Returns
Error code
Return values
ABT_SUCCESSon success
ABT_ERR_FEATURE_NAthe tool feature is not supported

Definition at line 225 of file tool.c.

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:

  • ABT_SYNC_EVENT_TYPE_USER: User's explicit call (e.g., ABT_thread_yield()) The synchronization object is not set ((void *)NULL).
  • ABT_SYNC_EVENT_TYPE_XSTREAM_JOIN: Waiting for completion of execution streams (e.g., ABT_xstream_join()) The synchronization object is an execution stream (ABT_xstream).
  • ABT_SYNC_EVENT_TYPE_THREAD_JOIN: Waiting for completion of ULTs (e.g., ABT_thread_join()) The synchronization object is a ULT (ABT_thread).
  • ABT_SYNC_EVENT_TYPE_TASK_JOIN: Waiting for completion of tasklets (e.g., ABT_task_join()) The synchronization object is a tasklet (ABT_task).
  • ABT_SYNC_EVENT_TYPE_MUTEX: Synchronization regarding a mutex (e.g., ABT_mutex_lock()) The synchronization object is a mutex (ABT_mutex).
  • ABT_SYNC_EVENT_TYPE_COND: Synchronization regarding a condition variable(e.g., ABT_cond_wait()) The synchronization object is a condition variable (ABT_cond).
  • ABT_SYNC_EVENT_TYPE_RWLOCK: Synchronization regarding a rwlock (e.g., ABT_rwlock_rdlock()) The synchronization object is a rwlock (ABT_rwlock).
  • ABT_SYNC_EVENT_TYPE_EVENTUAL: Synchronization regarding an eventual (e.g., ABT_eventual_wait()) The synchronization object is an eventual (ABT_eventual).
  • ABT_SYNC_EVENT_TYPE_FUTURE: Synchronization regarding a future (e.g., ABT_future_wait()) The synchronization object is a future (ABT_future).
  • ABT_SYNC_EVENT_TYPE_BARRIER: Synchronization regarding a barrier (e.g., ABT_barrier_wait()) The synchronization object is a barrier (ABT_barrier).
  • ABT_SYNC_EVENT_TYPE_OTHER: Unclassified synchronization (e.g., ABT_xstream_exit()) The synchronization object is not set ((void *)NULL).
  • ABT_SYNC_EVENT_TYPE_UNKNOWN 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()).

Parameters
[in]contexthandle to the tool context
[in]eventevent code passed to the callback function
[in]query_kindquery kind
[out]valpointer to storage where a returned value is saved
Returns
Error code
Return values
ABT_SUCCESSon success
ABT_ERR_FEATURE_NAthe tool feature is not supported

Definition at line 195 of file tool.c.

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

Parameters
[in]cb_funccallback function pointer
[in]event_maskevent code mask
[in]user_arguser argument passed to cb_func
Returns
Error code
Return values
ABT_SUCCESSon success
ABT_ERR_FEATURE_NAtool feature is not supported

Definition at line 87 of file tool.c.

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

Parameters
[in]cb_funccallback function pointer
[in]event_maskevent code mask
[in]user_arguser argument passed to cb_func
Returns
Error code
Return values
ABT_SUCCESSon success
ABT_ERR_FEATURE_NAtool feature is not supported

Definition at line 44 of file tool.c.

Variable Documentation

Definition at line 445 of file abt.h.