ARGOBOTS
dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
|
Go to the documentation of this file.
6 #ifndef ABTI_TOOL_H_INCLUDED
7 #define ABTI_TOOL_H_INCLUDED
12 #ifndef ABT_CONFIG_DISABLE_TOOL_INTERFACE
13 static inline ABTI_tool_context *
16 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
17 ABTI_tool_context *p_tctx;
21 p_tctx = (ABTI_tool_context *)tctx;
25 return (ABTI_tool_context *)tctx;
32 #ifndef ABT_CONFIG_DISABLE_ERROR_CHECK
45 #define ABTI_TOOL_EVENT_TAG_SIZE 20
46 #define ABTI_TOOL_EVENT_TAG_MASK \
47 ((((uint64_t)1 << (uint64_t)ABTI_TOOL_EVENT_TAG_SIZE) - 1) \
48 << (uint64_t)(64 - 1 - ABTI_TOOL_EVENT_TAG_SIZE))
49 #define ABTI_TOOL_EVENT_TAG_INC \
50 ((uint64_t)1 << (uint64_t)(64 - 1 - ABTI_TOOL_EVENT_TAG_SIZE))
51 #define ABTI_TOOL_EVENT_TAG_DIRTY_BIT ((uint64_t)1 << (uint64_t)(64 - 1))
56 uint64_t event_mask,
void *user_arg)
79 &p_global->tool_thread_event_mask_tagged);
88 p_global->tool_thread_cb_f = cb_func;
89 p_global->tool_thread_user_arg = user_arg;
107 &p_global->tool_thread_event_mask_tagged);
108 if (current_mask & event_code) {
110 p_global->tool_thread_cb_f;
111 void *user_arg_thread = p_global->tool_thread_user_arg;
114 &p_global->tool_thread_event_mask_tagged);
118 ABTI_tool_context tctx;
119 tctx.p_pool = p_pool;
120 tctx.p_parent = p_parent;
121 tctx.p_caller = p_caller;
122 tctx.sync_event_type = sync_event_type;
123 tctx.p_sync_object = p_sync_object;
132 cb_func_thread(h_thread, h_xstream, event_code, h_tctx,
#define ABTI_THREAD_TYPE_ROOT
struct ABT_thread_opaque * ABT_task
Work unit handle type.
struct ABT_thread_opaque * ABT_thread
Work unit handle type.
ABTI_global * gp_ABTI_global
static uint64_t ABTD_atomic_acquire_load_uint64(const ABTD_atomic_uint64 *ptr)
static ABT_xstream ABTI_xstream_get_handle(ABTI_xstream *p_xstream)
static void ABTD_atomic_release_store_uint64(ABTD_atomic_uint64 *ptr, uint64_t val)
struct ABT_xstream_opaque * ABT_xstream
Execution stream handle type.
static void ABTD_spinlock_acquire(ABTD_spinlock *p_lock)
static ABTI_xstream * ABTI_local_get_xstream_or_null(ABTI_local *p_local)
#define ABTU_unlikely(cond)
static void ABTD_spinlock_release(ABTD_spinlock *p_lock)
#define ABT_TOOL_CONTEXT_NULL
struct ABTI_local ABTI_local
void(* ABT_tool_thread_callback_fn)(ABT_thread, ABT_xstream, uint64_t event, ABT_tool_context context, void *user_arg)