28 #ifndef OPAL_RUNTIME_OPAL_PROGRESS_H
29 #define OPAL_RUNTIME_OPAL_PROGRESS_H
33 #include "opal_config.h"
176 OPAL_DECLSPEC
extern volatile int32_t opal_progress_thread_count;
177 OPAL_DECLSPEC
extern int opal_progress_spin_count;
179 static inline bool opal_progress_threads(
void)
181 return (opal_progress_thread_count > 0);
192 for (c = 0; c < opal_progress_spin_count; c++) {
193 if (
true == *complete) {
210 #if OPAL_ENABLE_MULTI_THREADS
213 uint32_t opal_progress_recursion_depth_counter;
223 return opal_progress_recursion_depth_counter;
OPAL_DECLSPEC int opal_progress_set_event_flag(int flags)
Control how the event library is called.
Definition: opal_progress.c:233
#define OPAL_THREAD_ADD32(x, y)
Use an atomic operation for increment/decrement if opal_using_threads() indicates that threads are in...
Definition: mutex.h:367
OPAL_DECLSPEC int opal_progress_unregister(opal_progress_callback_t cb)
Deregister previously registered event.
Definition: opal_progress.c:372
OPAL_DECLSPEC void opal_progress_event_users_increment(void)
Increase the number of users of the event library.
Definition: opal_progress.c:245
BEGIN_C_DECLS OPAL_DECLSPEC int opal_progress_init(void)
Initialize the progress engine.
Definition: opal_progress.c:95
OPAL_DECLSPEC void opal_progress_set_event_poll_rate(int microseconds)
Set time between calls into the event library.
Definition: opal_progress.c:293
static bool opal_progress_spin(volatile bool *complete)
Progress until flag is true or poll iterations completed.
Definition: opal_progress.h:188
int(* opal_progress_callback_t)(void)
Progress callback function typedef.
Definition: opal_progress.h:155
OPAL_DECLSPEC bool opal_progress_set_yield_when_idle(bool yieldopt)
Set whether opal_progress() should yield when idle.
Definition: opal_progress.c:280
OPAL_DECLSPEC void opal_progress(void)
Progress all pending events.
Definition: opal_progress.c:165
OPAL_DECLSPEC int opal_progress_register(opal_progress_callback_t cb)
Register an event to be progressed.
Definition: opal_progress.c:334
Mutual exclusion functions.
OPAL_DECLSPEC void opal_progress_event_users_decrement(void)
Decrease the number of users of the event library.
Definition: opal_progress.c:263
OPAL_DECLSPEC int opal_progress_finalize(void)
Shut down the progress engine.
Definition: opal_progress.c:131
static uint32_t opal_progress_recursion_depth(void)
Return the current level of recursion – 0 means that we are not under an opal_progress() call at all...
Definition: opal_progress.h:221