Skip to content

Commit

Permalink
[BOLT] test: return an error if Argobots call fails.
Browse files Browse the repository at this point in the history
All Argobots functions including ABT_thread_yield() return an error code, which
should be checked in test.
  • Loading branch information
shintaro-iwasaki committed May 2, 2020
1 parent 2ad7095 commit da131bd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion runtime/test/omp_testsuite.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ static int pthread_join(pthread_t thread, void **retval) {
#ifdef BOLT_VERSION
# if BOLT_THREAD == BOLT_THREAD_ARGOBOTS
# include <abt.h>
# define THREAD_SCHED_POINT() ABT_thread_yield()
# define ABT_EXIT_IF_FAIL(_abt_call) \
do { \
int _abt_ret = (_abt_call); \
if (_abt_ret != ABT_SUCCESS) \
exit(1); \
} while (0)
# define THREAD_SCHED_POINT() ABT_EXIT_IF_FAIL(ABT_thread_yield())
# else
# define THREAD_SCHED_POINT() do {;} while(0)
# endif
Expand Down

0 comments on commit da131bd

Please sign in to comment.