ARGOBOTS  dce6e727ffc4ca5b3ffc04cb9517c6689be51ec5
Macros
abti_error.h File Reference
#include <assert.h>
#include <abt_config.h>
Include dependency graph for abti_error.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ABTI_ASSERT(cond)
 
#define ABTI_UB_ASSERT(cond)
 
#define ABTI_UB_ASSERT_BOOL(bool_val)
 
#define ABTI_STATIC_ASSERT(cond)
 
#define ABTI_IS_PRINT_ABT_ERRNO_ENABLED   0
 
#define HANDLE_WARNING(msg)
 
#define HANDLE_ERROR(msg)
 
#define HANDLE_ERROR_WITH_CODE(msg, n)
 
#define HANDLE_ERROR_FUNC_WITH_CODE(n)
 
#define ABTI_SETUP_GLOBAL(pp_global)
 
#define ABTI_SETUP_LOCAL_XSTREAM(pp_local_xstream)
 
#define ABTI_SETUP_LOCAL_YTHREAD(pp_local_xstream, pp_ythread)
 
#define ABTI_HANDLE_ERROR(n)
 
#define ABTI_CHECK_ERROR(abt_errno)
 
#define ABTI_CHECK_TRUE(cond, abt_errno)
 
#define ABTI_CHECK_YIELDABLE(p_thread, pp_ythread, abt_errno)
 
#define ABTI_CHECK_TRUE_MSG(cond, abt_errno, msg)
 
#define ABTI_CHECK_NULL_XSTREAM_PTR(p)
 
#define ABTI_CHECK_NULL_POOL_PTR(p)
 
#define ABTI_CHECK_NULL_POOL_CONFIG_PTR(p)
 
#define ABTI_CHECK_NULL_POOL_USER_DEF_PTR(p)
 
#define ABTI_CHECK_NULL_SCHED_PTR(p)
 
#define ABTI_CHECK_NULL_SCHED_CONFIG_PTR(p)
 
#define ABTI_CHECK_NULL_THREAD_PTR(p)
 
#define ABTI_CHECK_NULL_YTHREAD_PTR(p)
 
#define ABTI_CHECK_NULL_THREAD_ATTR_PTR(p)
 
#define ABTI_CHECK_NULL_TASK_PTR(p)
 
#define ABTI_CHECK_NULL_KEY_PTR(p)
 
#define ABTI_CHECK_NULL_MUTEX_PTR(p)
 
#define ABTI_CHECK_NULL_MUTEX_ATTR_PTR(p)
 
#define ABTI_CHECK_NULL_COND_PTR(p)
 
#define ABTI_CHECK_NULL_RWLOCK_PTR(p)
 
#define ABTI_CHECK_NULL_FUTURE_PTR(p)
 
#define ABTI_CHECK_NULL_EVENTUAL_PTR(p)
 
#define ABTI_CHECK_NULL_BARRIER_PTR(p)
 
#define ABTI_CHECK_NULL_XSTREAM_BARRIER_PTR(p)
 
#define ABTI_CHECK_NULL_TIMER_PTR(p)
 
#define ABTI_CHECK_NULL_TOOL_CONTEXT_PTR(p)
 

Macro Definition Documentation

◆ ABTI_ASSERT

#define ABTI_ASSERT (   cond)
Value:
do { \
assert(cond); \
} \
} while (0)

Definition at line 12 of file abti_error.h.

◆ ABTI_CHECK_ERROR

#define ABTI_CHECK_ERROR (   abt_errno)
Value:
do { \
int abt_errno_ = (abt_errno); \
ABTU_unlikely(abt_errno_ != ABT_SUCCESS)) { \
HANDLE_ERROR_FUNC_WITH_CODE(abt_errno_); \
return abt_errno_; \
} \
} while (0)

Definition at line 136 of file abti_error.h.

◆ ABTI_CHECK_NULL_BARRIER_PTR

#define ABTI_CHECK_NULL_BARRIER_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_barrier *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_BARRIER); \
} \
} while (0)

Definition at line 328 of file abti_error.h.

◆ ABTI_CHECK_NULL_COND_PTR

#define ABTI_CHECK_NULL_COND_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_cond *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_COND); \
return ABT_ERR_INV_COND; \
} \
} while (0)

Definition at line 292 of file abti_error.h.

◆ ABTI_CHECK_NULL_EVENTUAL_PTR

#define ABTI_CHECK_NULL_EVENTUAL_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_eventual *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_EVENTUAL); \
} \
} while (0)

Definition at line 319 of file abti_error.h.

◆ ABTI_CHECK_NULL_FUTURE_PTR

#define ABTI_CHECK_NULL_FUTURE_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_future *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_FUTURE); \
} \
} while (0)

Definition at line 310 of file abti_error.h.

◆ ABTI_CHECK_NULL_KEY_PTR

#define ABTI_CHECK_NULL_KEY_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_key *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_KEY); \
return ABT_ERR_INV_KEY; \
} \
} while (0)

Definition at line 265 of file abti_error.h.

◆ ABTI_CHECK_NULL_MUTEX_ATTR_PTR

#define ABTI_CHECK_NULL_MUTEX_ATTR_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_mutex_attr *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_MUTEX_ATTR); \
} \
} while (0)

Definition at line 283 of file abti_error.h.

◆ ABTI_CHECK_NULL_MUTEX_PTR

#define ABTI_CHECK_NULL_MUTEX_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_mutex *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_MUTEX); \
} \
} while (0)

Definition at line 274 of file abti_error.h.

◆ ABTI_CHECK_NULL_POOL_CONFIG_PTR

#define ABTI_CHECK_NULL_POOL_CONFIG_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_pool_config *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_POOL_CONFIG); \
} \
} while (0)

Definition at line 193 of file abti_error.h.

◆ ABTI_CHECK_NULL_POOL_PTR

#define ABTI_CHECK_NULL_POOL_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_pool *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_POOL); \
return ABT_ERR_INV_POOL; \
} \
} while (0)

Definition at line 184 of file abti_error.h.

◆ ABTI_CHECK_NULL_POOL_USER_DEF_PTR

#define ABTI_CHECK_NULL_POOL_USER_DEF_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_pool_user_def *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_POOL_USER_DEF); \
} \
} while (0)

Definition at line 202 of file abti_error.h.

◆ ABTI_CHECK_NULL_RWLOCK_PTR

#define ABTI_CHECK_NULL_RWLOCK_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_rwlock *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_RWLOCK); \
} \
} while (0)

Definition at line 301 of file abti_error.h.

◆ ABTI_CHECK_NULL_SCHED_CONFIG_PTR

#define ABTI_CHECK_NULL_SCHED_CONFIG_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_sched_config *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_SCHED_CONFIG); \
} \
} while (0)

Definition at line 220 of file abti_error.h.

◆ ABTI_CHECK_NULL_SCHED_PTR

#define ABTI_CHECK_NULL_SCHED_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_sched *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_SCHED); \
} \
} while (0)

Definition at line 211 of file abti_error.h.

◆ ABTI_CHECK_NULL_TASK_PTR

#define ABTI_CHECK_NULL_TASK_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_thread *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_TASK); \
return ABT_ERR_INV_TASK; \
} \
} while (0)

Definition at line 256 of file abti_error.h.

◆ ABTI_CHECK_NULL_THREAD_ATTR_PTR

#define ABTI_CHECK_NULL_THREAD_ATTR_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_thread_attr *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_THREAD_ATTR); \
} \
} while (0)

Definition at line 247 of file abti_error.h.

◆ ABTI_CHECK_NULL_THREAD_PTR

#define ABTI_CHECK_NULL_THREAD_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_thread *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_THREAD); \
} \
} while (0)

Definition at line 229 of file abti_error.h.

◆ ABTI_CHECK_NULL_TIMER_PTR

#define ABTI_CHECK_NULL_TIMER_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_timer *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_TIMER); \
} \
} while (0)

Definition at line 346 of file abti_error.h.

◆ ABTI_CHECK_NULL_TOOL_CONTEXT_PTR

#define ABTI_CHECK_NULL_TOOL_CONTEXT_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_tool_context *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_TOOL_CONTEXT); \
} \
} while (0)

Definition at line 355 of file abti_error.h.

◆ ABTI_CHECK_NULL_XSTREAM_BARRIER_PTR

#define ABTI_CHECK_NULL_XSTREAM_BARRIER_PTR (   p)
Value:
do { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_XSTREAM_BARRIER); \
} \
} while (0)

Definition at line 337 of file abti_error.h.

◆ ABTI_CHECK_NULL_XSTREAM_PTR

#define ABTI_CHECK_NULL_XSTREAM_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_xstream *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_XSTREAM); \
} \
} while (0)

Definition at line 175 of file abti_error.h.

◆ ABTI_CHECK_NULL_YTHREAD_PTR

#define ABTI_CHECK_NULL_YTHREAD_PTR (   p)
Value:
do { \
ABTU_unlikely(p == (ABTI_ythread *)NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_THREAD); \
} \
} while (0)

Definition at line 238 of file abti_error.h.

◆ ABTI_CHECK_TRUE

#define ABTI_CHECK_TRUE (   cond,
  abt_errno 
)
Value:
do { \
int abt_errno_ = (abt_errno); \
HANDLE_ERROR_FUNC_WITH_CODE(abt_errno_); \
return abt_errno_; \
} \
} while (0)

Definition at line 146 of file abti_error.h.

◆ ABTI_CHECK_TRUE_MSG

#define ABTI_CHECK_TRUE_MSG (   cond,
  abt_errno,
  msg 
)
Value:
do { \
HANDLE_ERROR(msg); \
return (abt_errno); \
} \
} while (0)

Definition at line 167 of file abti_error.h.

◆ ABTI_CHECK_YIELDABLE

#define ABTI_CHECK_YIELDABLE (   p_thread,
  pp_ythread,
  abt_errno 
)
Value:
do { \
ABTI_thread *p_tmp = (p_thread); \
int abt_errno_ = (abt_errno); \
HANDLE_ERROR_FUNC_WITH_CODE(abt_errno_); \
return abt_errno_; \
} \
*(pp_ythread) = ABTI_thread_get_ythread(p_tmp); \
} while (0)

Definition at line 155 of file abti_error.h.

◆ ABTI_HANDLE_ERROR

#define ABTI_HANDLE_ERROR (   n)
Value:
do { \
HANDLE_ERROR_FUNC_WITH_CODE(n); \
return n; \
} while (0)

Definition at line 130 of file abti_error.h.

◆ ABTI_IS_PRINT_ABT_ERRNO_ENABLED

#define ABTI_IS_PRINT_ABT_ERRNO_ENABLED   0

Definition at line 43 of file abti_error.h.

◆ ABTI_SETUP_GLOBAL

#define ABTI_SETUP_GLOBAL (   pp_global)
Value:
do { \
ABTI_global *p_global_tmp = ABTI_global_get_global_or_null(); \
ABTU_unlikely(p_global_tmp == NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_UNINITIALIZED); \
} \
ABTI_global **pp_global_tmp = (pp_global); \
if (pp_global_tmp) { \
*pp_global_tmp = p_global_tmp; \
} \
} while (0)

Definition at line 75 of file abti_error.h.

◆ ABTI_SETUP_LOCAL_XSTREAM

#define ABTI_SETUP_LOCAL_XSTREAM (   pp_local_xstream)
Value:
do { \
ABTI_xstream *p_local_xstream_tmp = \
ABTI_local_get_xstream_or_null(ABTI_local_get_local()); \
ABTU_unlikely(p_local_xstream_tmp == NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_XSTREAM); \
} \
ABTI_xstream **pp_local_xstream_tmp = (pp_local_xstream); \
if (pp_local_xstream_tmp) { \
*pp_local_xstream_tmp = p_local_xstream_tmp; \
} \
} while (0)

Definition at line 89 of file abti_error.h.

◆ ABTI_SETUP_LOCAL_YTHREAD

#define ABTI_SETUP_LOCAL_YTHREAD (   pp_local_xstream,
  pp_ythread 
)
Value:
do { \
ABTI_xstream *p_local_xstream_tmp = \
ABTI_local_get_xstream_or_null(ABTI_local_get_local()); \
ABTU_unlikely(p_local_xstream_tmp == NULL)) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_XSTREAM); \
} \
ABTI_xstream **pp_local_xstream_tmp = (pp_local_xstream); \
if (pp_local_xstream_tmp) { \
*pp_local_xstream_tmp = p_local_xstream_tmp; \
} \
ABTI_thread *p_thread_tmp = p_local_xstream_tmp->p_thread; \
!(p_thread_tmp->type & ABTI_THREAD_TYPE_YIELDABLE))) { \
HANDLE_ERROR_FUNC_WITH_CODE(ABT_ERR_INV_THREAD); \
} \
ABTI_ythread **pp_ythread_tmp = (pp_ythread); \
if (pp_ythread_tmp) { \
*pp_ythread_tmp = ABTI_thread_get_ythread(p_thread_tmp); \
} \
} while (0)

Definition at line 104 of file abti_error.h.

◆ ABTI_STATIC_ASSERT

#define ABTI_STATIC_ASSERT (   cond)
Value:
do { \
((void)sizeof(char[2 * !!(cond)-1])); \
} while (0)

Definition at line 35 of file abti_error.h.

◆ ABTI_UB_ASSERT

#define ABTI_UB_ASSERT (   cond)
Value:
do { \
ABTI_ASSERT(cond); \
} \
} while (0)

Definition at line 19 of file abti_error.h.

◆ ABTI_UB_ASSERT_BOOL

#define ABTI_UB_ASSERT_BOOL (   bool_val)
Value:
do { \
ABT_bool bool_val_tmp = (bool_val); \
ABTI_ASSERT(bool_val_tmp == ABT_TRUE || \
bool_val_tmp == ABT_FALSE); \
} \
} while (0)

Definition at line 26 of file abti_error.h.

◆ HANDLE_ERROR

#define HANDLE_ERROR (   msg)
Value:
do { \
fprintf(stderr, "[%s:%d] %s\n", __FILE__, __LINE__, msg); \
} \
} while (0)

Definition at line 53 of file abti_error.h.

◆ HANDLE_ERROR_FUNC_WITH_CODE

#define HANDLE_ERROR_FUNC_WITH_CODE (   n)
Value:
do { \
fprintf(stderr, "[%s:%d] %s: %d\n", __FILE__, __LINE__, __func__, \
n); \
} \
} while (0)

Definition at line 67 of file abti_error.h.

◆ HANDLE_ERROR_WITH_CODE

#define HANDLE_ERROR_WITH_CODE (   msg,
 
)
Value:
do { \
fprintf(stderr, "[%s:%d] %s: %d\n", __FILE__, __LINE__, msg, n); \
} \
} while (0)

Definition at line 60 of file abti_error.h.

◆ HANDLE_WARNING

#define HANDLE_WARNING (   msg)
Value:
do { \
fprintf(stderr, "[%s:%d] %s\n", __FILE__, __LINE__, msg); \
} \
} while (0)

Definition at line 46 of file abti_error.h.

ABTI_key
Definition: abti.h:461
ABT_ERR_INV_POOL_USER_DEF
#define ABT_ERR_INV_POOL_USER_DEF
Error code: invalid pool definition.
Definition: abt.h:176
ABT_ERR_INV_SCHED_CONFIG
#define ABT_ERR_INV_SCHED_CONFIG
Error code: invalid scheduler configuration.
Definition: abt.h:151
ABT_ERR_INV_THREAD
#define ABT_ERR_INV_THREAD
Error code: invalid work unit.
Definition: abt.h:186
ABT_ERR_UNINITIALIZED
#define ABT_ERR_UNINITIALIZED
Error code: Argobots it not initialized.
Definition: abt.h:97
ABTI_future
Definition: abti.h:504
ABT_ERR_INV_XSTREAM
#define ABT_ERR_INV_XSTREAM
Error code: invalid execution stream.
Definition: abt.h:114
ABTI_IS_UB_ASSERT_ENABLED
#define ABTI_IS_UB_ASSERT_ENABLED
Definition: abti.h:32
ABT_ERR_INV_RWLOCK
#define ABT_ERR_INV_RWLOCK
Error code: invalid readers-writer lock.
Definition: abt.h:225
ABTI_eventual
Definition: abti.h:496
ABTI_xstream_barrier
Definition: abti.h:520
ABTI_THREAD_TYPE_YIELDABLE
#define ABTI_THREAD_TYPE_YIELDABLE
Definition: abti.h:87
ABTI_thread_get_ythread
static ABTI_ythread * ABTI_thread_get_ythread(ABTI_thread *p_thread)
Definition: abti_thread.h:52
ABTI_thread
Definition: abti.h:422
ABTI_IS_ERROR_CHECK_ENABLED
#define ABTI_IS_ERROR_CHECK_ENABLED
Definition: abti.h:20
ABTI_barrier
Definition: abti.h:513
ABTI_xstream
Definition: abti.h:294
ABT_ERR_INV_MUTEX
#define ABT_ERR_INV_MUTEX
Error code: invalid mutex.
Definition: abt.h:210
ABTI_sched_config
Definition: abti.h:344
ABT_ERR_INV_KEY
#define ABT_ERR_INV_KEY
Error code: invalid work-unit-specific data key.
Definition: abt.h:205
ABTI_thread_attr
Definition: abti.h:439
ABT_ERR_INV_SCHED
#define ABT_ERR_INV_SCHED
Error code: invalid scheduler.
Definition: abt.h:129
ABTI_pool
Definition: abti.h:389
ABTI_cond
Definition: abti.h:483
ABT_ERR_INV_POOL_CONFIG
#define ABT_ERR_INV_POOL_CONFIG
Error code: invalid pool configuration.
Definition: abt.h:171
ABT_ERR_INV_COND
#define ABT_ERR_INV_COND
Error code: invalid condition variable.
Definition: abt.h:220
ABTI_timer
Definition: abti.h:531
ABTI_rwlock
Definition: abti.h:489
ABT_ERR_INV_BARRIER
#define ABT_ERR_INV_BARRIER
Error code: invalid barrier.
Definition: abt.h:240
ABT_ERR_INV_FUTURE
#define ABT_ERR_INV_FUTURE
Error code: invalid future.
Definition: abt.h:235
ABT_ERR_INV_THREAD_ATTR
#define ABT_ERR_INV_THREAD_ATTR
Error code: invalid ULT attribute.
Definition: abt.h:191
ABTI_local_get_local
static ABTI_local * ABTI_local_get_local(void)
Definition: abti_local.h:41
ABT_ERR_INV_TASK
#define ABT_ERR_INV_TASK
Error code: invalid work unit.
Definition: abt.h:200
ABTI_pool_config
Definition: abti.h:418
ABT_SUCCESS
#define ABT_SUCCESS
Error code: the routine returns successfully.
Definition: abt.h:92
ABT_ERR_INV_TIMER
#define ABT_ERR_INV_TIMER
Error code: invalid timer.
Definition: abt.h:245
ABTI_IS_EXT_THREAD_ENABLED
#define ABTI_IS_EXT_THREAD_ENABLED
Definition: abti.h:28
ABTU_unlikely
#define ABTU_unlikely(cond)
Definition: abtu.h:120
ABT_TRUE
#define ABT_TRUE
True constant for ABT_bool.
Definition: abt.h:784
ABTI_sched
Definition: abti.h:319
ABT_FALSE
#define ABT_FALSE
False constant for ABT_bool.
Definition: abt.h:786
ABTI_ythread
Definition: abti.h:456
ABTI_mutex_attr
Definition: abti.h:197
ABT_ERR_INV_POOL
#define ABT_ERR_INV_POOL
Error code: invalid pool.
Definition: abt.h:156
ABTI_pool_user_def
Definition: abti.h:405
ABT_ERR_INV_MUTEX_ATTR
#define ABT_ERR_INV_MUTEX_ATTR
Error code: invalid mutex attribute.
Definition: abt.h:215
ABT_ERR_INV_EVENTUAL
#define ABT_ERR_INV_EVENTUAL
Error code: invalid eventual.
Definition: abt.h:230
ABTI_global_get_global_or_null
static ABTI_global * ABTI_global_get_global_or_null(void)
Definition: abti_global.h:15
ABT_ERR_INV_XSTREAM_BARRIER
#define ABT_ERR_INV_XSTREAM_BARRIER
Error code: invalid execution stream barrier.
Definition: abt.h:124
ABTI_IS_PRINT_ABT_ERRNO_ENABLED
#define ABTI_IS_PRINT_ABT_ERRNO_ENABLED
Definition: abti_error.h:43
ABT_ERR_INV_TOOL_CONTEXT
#define ABT_ERR_INV_TOOL_CONTEXT
Error code: invalid tool context.
Definition: abt.h:255
ABTI_mutex
Definition: abti.h:201