@@ -58,30 +58,30 @@ typedef struct ompi_wait_sync_t {
58
58
* as possible. Note that the race window is small so spinning here
59
59
* is more optimal than sleeping since this macro is called in
60
60
* the critical path. */
61
- #define WAIT_SYNC_RELEASE (sync ) \
62
- if (opal_using_threads()) { \
63
- while ((sync)->signaling) { \
64
- if (OPAL_THREAD_YIELD_WHEN_IDLE_DEFAULT) { \
65
- opal_thread_yield(); \
66
- } \
67
- continue; \
68
- } \
69
- opal_thread_internal_cond_destroy(&(sync)->condition); \
70
- opal_thread_internal_mutex_destroy(&(sync)->lock); \
61
+ #define WAIT_SYNC_RELEASE (sync ) \
62
+ if (opal_using_threads()) { \
63
+ while ((sync)->signaling) { \
64
+ if (OPAL_THREAD_YIELD_WHEN_IDLE_DEFAULT) { \
65
+ opal_thread_yield(); \
66
+ } \
67
+ continue; \
68
+ } \
69
+ opal_thread_internal_cond_destroy(&(( sync)->condition) ); \
70
+ opal_thread_internal_mutex_destroy(&(( sync)->lock) ); \
71
71
}
72
72
73
- #define WAIT_SYNC_RELEASE_NOWAIT (sync ) \
74
- if (opal_using_threads()) { \
75
- opal_thread_internal_cond_destroy(&(sync)->condition); \
76
- opal_thread_internal_mutex_destroy(&(sync)->lock); \
73
+ #define WAIT_SYNC_RELEASE_NOWAIT (sync ) \
74
+ if (opal_using_threads()) { \
75
+ opal_thread_internal_cond_destroy(&(( sync)->condition) ); \
76
+ opal_thread_internal_mutex_destroy(&(( sync)->lock) ); \
77
77
}
78
78
79
- #define WAIT_SYNC_SIGNAL (sync ) \
80
- if (opal_using_threads()) { \
81
- opal_thread_internal_mutex_lock(&(sync->lock)); \
82
- opal_thread_internal_cond_signal(&sync->condition); \
83
- opal_thread_internal_mutex_unlock(&(sync->lock)); \
84
- sync->signaling = false; \
79
+ #define WAIT_SYNC_SIGNAL (sync ) \
80
+ if (opal_using_threads()) { \
81
+ opal_thread_internal_mutex_lock(&(( sync) ->lock)); \
82
+ opal_thread_internal_cond_signal(&(( sync) ->condition) ); \
83
+ opal_thread_internal_mutex_unlock(&(( sync) ->lock)); \
84
+ ( sync) ->signaling = false; \
85
85
}
86
86
87
87
#define WAIT_SYNC_SIGNALLED (sync ) \
@@ -110,17 +110,17 @@ static inline int sync_wait_st(ompi_wait_sync_t *sync)
110
110
return sync -> status ;
111
111
}
112
112
113
- #define WAIT_SYNC_INIT (sync , c ) \
114
- do { \
115
- (sync)->count = (c); \
116
- (sync)->next = NULL; \
117
- (sync)->prev = NULL; \
118
- (sync)->status = 0; \
119
- (sync)->signaling = (0 != (c)); \
120
- if (opal_using_threads()) { \
121
- opal_thread_internal_cond_init(&(sync)->condition); \
122
- opal_thread_internal_mutex_init(&(sync)->lock, false); \
123
- } \
113
+ #define WAIT_SYNC_INIT (sync , c ) \
114
+ do { \
115
+ (sync)->count = (c); \
116
+ (sync)->next = NULL; \
117
+ (sync)->prev = NULL; \
118
+ (sync)->status = 0; \
119
+ (sync)->signaling = (0 != (c)); \
120
+ if (opal_using_threads()) { \
121
+ opal_thread_internal_cond_init(&(( sync)->condition) ); \
122
+ opal_thread_internal_mutex_init(&(( sync)->lock) , false); \
123
+ } \
124
124
} while (0)
125
125
126
126
/**
0 commit comments