37
37
#include "opal/runtime/opal_params.h"
38
38
39
39
#define OPAL_PROGRESS_USE_TIMERS (OPAL_TIMER_CYCLE_SUPPORTED || OPAL_TIMER_USEC_SUPPORTED)
40
+ #define OPAL_PROGRESS_ONLY_USEC_NATIVE (OPAL_TIMER_USEC_NATIVE && !OPAL_TIMER_CYCLE_NATIVE)
40
41
41
42
#if OPAL_ENABLE_DEBUG
42
43
bool opal_progress_debug = false;
@@ -189,11 +190,11 @@ opal_progress(void)
189
190
if ( opal_progress_event_flag != 0 ) {
190
191
#if OPAL_HAVE_WORKING_EVENTOPS
191
192
#if OPAL_PROGRESS_USE_TIMERS
192
- #if OPAL_TIMER_USEC_NATIVE
193
+ #if OPAL_PROGRESS_ONLY_USEC_NATIVE
193
194
opal_timer_t now = opal_timer_base_get_usec ();
194
195
#else
195
196
opal_timer_t now = opal_timer_base_get_cycles ();
196
- #endif /* OPAL_TIMER_USEC_NATIVE */
197
+ #endif /* OPAL_PROGRESS_ONLY_USEC_NATIVE */
197
198
/* trip the event library if we've reached our tick rate and we are
198
199
enabled */
199
200
if (now - event_progress_last_time > event_progress_delta ) {
@@ -316,7 +317,7 @@ opal_progress_set_event_poll_rate(int polltime)
316
317
317
318
#if OPAL_PROGRESS_USE_TIMERS
318
319
event_progress_delta = 0 ;
319
- # if OPAL_TIMER_USEC_NATIVE
320
+ # if OPAL_PROGRESS_ONLY_USEC_NATIVE
320
321
event_progress_last_time = opal_timer_base_get_usec ();
321
322
# else
322
323
event_progress_last_time = opal_timer_base_get_cycles ();
@@ -343,7 +344,7 @@ opal_progress_set_event_poll_rate(int polltime)
343
344
#endif
344
345
}
345
346
346
- #if OPAL_PROGRESS_USE_TIMERS && !OPAL_TIMER_USEC_NATIVE
347
+ #if OPAL_PROGRESS_USE_TIMERS && !OPAL_PROGRESS_ONLY_USEC_NATIVE
347
348
/* going to use cycles for counter. Adjust specified usec into cycles */
348
349
event_progress_delta = event_progress_delta * opal_timer_base_get_freq () / 1000000 ;
349
350
#endif
0 commit comments