diff --git a/src/cond.c b/src/cond.c index d67818d78..f4bb2bc42 100644 --- a/src/cond.c +++ b/src/cond.c @@ -222,6 +222,14 @@ int ABT_cond_wait(ABT_cond cond, ABT_mutex mutex) * Unlike other implementations of condition variables, a spurious wakeup never * occurs. * + * @note + * This function exhibits significantly higher CPU utilization than + * ABT_cond_wait() when blocking, even with the BASIC_WAIT scheduler. This + * is because Argobots lacks a user-space timeout mechanism, requiring + * continuous rescheduling of the caller to poll for `abstime`. The + * `--enable-sched-sleep` option can mitigate this, but it introduces a + * latency penalty for some workloads. + * * @contexts * \DOC_CONTEXT_ANY \DOC_CONTEXT_CTXSWITCH * diff --git a/src/include/abti_error.h b/src/include/abti_error.h index 9743c04f0..8ad5cedee 100644 --- a/src/include/abti_error.h +++ b/src/include/abti_error.h @@ -34,7 +34,7 @@ #define ABTI_STATIC_ASSERT(cond) \ do { \ - ((void)sizeof(char[2 * !!(cond)-1])); \ + ((void)sizeof(char[2 * !!(cond) - 1])); \ } while (0) #ifdef ABT_CONFIG_PRINT_ABT_ERRNO diff --git a/test/basic/info_query.c b/test/basic/info_query.c index b1826b23b..76c4bbe67 100644 --- a/test/basic/info_query.c +++ b/test/basic/info_query.c @@ -56,7 +56,7 @@ void info_query_all(ABT_bool init) while (p_query) { if (!(p_query->need_init && !init)) { const int idx = p_query->buffer_idx++; - int32_t *ptr = (int32_t *)(&p_query->buffers[1 + (idx)*3]); + int32_t *ptr = (int32_t *)(&p_query->buffers[1 + (idx) * 3]); ptr[-1] = 0x77777777; ptr[0] = 0x77777777; ptr[1] = 0x77777777; diff --git a/test/benchmark/thread_ops.c b/test/benchmark/thread_ops.c index f79cd3cc0..635f623bd 100644 --- a/test/benchmark/thread_ops.c +++ b/test/benchmark/thread_ops.c @@ -8,7 +8,7 @@ #include "abt.h" #include "abttest.h" -//#define TEST_MIGRATE_TO +// #define TEST_MIGRATE_TO #define USE_JOIN_MANY #ifdef USE_JOIN_MANY #define ABT_THREAD_JOIN_MANY(n, tl) ABT_thread_join_many(n, tl) diff --git a/test/benchmark/thread_ops_all.c b/test/benchmark/thread_ops_all.c index 5f1ac2408..9059cd8b1 100644 --- a/test/benchmark/thread_ops_all.c +++ b/test/benchmark/thread_ops_all.c @@ -8,7 +8,7 @@ #include "abt.h" #include "abttest.h" -//#define TEST_MIGRATE_TO +// #define TEST_MIGRATE_TO #define USE_JOIN_MANY #ifdef USE_JOIN_MANY #define ABT_THREAD_JOIN_MANY(n, tl) ABT_thread_join_many(n, tl)