We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1de67af commit 0d8ca55Copy full SHA for 0d8ca55
opal/mca/threads/wait_sync.h
@@ -144,9 +144,10 @@ OPAL_DECLSPEC void wait_sync_global_wakeup_mt(int status);
144
static inline void wait_sync_update(ompi_wait_sync_t *sync, int updates, int status)
145
{
146
if (OPAL_LIKELY(OPAL_SUCCESS == status)) {
147
- if (0 != (OPAL_THREAD_ADD_FETCH32(&sync->count, -updates))) {
+ if (1 != sync->count && 0 != (OPAL_THREAD_ADD_FETCH32(&sync->count, -updates))) {
148
return;
149
}
150
+ sync->count = 0;
151
} else {
152
/* this is an error path so just use the atomic */
153
sync->status = status;
0 commit comments