File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 10
10
* University of Stuttgart. All rights reserved.
11
11
* Copyright (c) 2004-2005 The Regents of the University of California.
12
12
* All rights reserved.
13
- * Copyright (c) 2006-2016 Los Alamos National Security, LLC. All rights
13
+ * Copyright (c) 2006-2018 Los Alamos National Security, LLC. All rights
14
14
* reserved.
15
15
* Copyright (c) 2015-2016 Research Organization for Information Science
16
16
* and Technology (RIST). All rights reserved.
@@ -171,9 +171,10 @@ opal_progress_finalize(void)
171
171
172
172
static int opal_progress_events (void )
173
173
{
174
+ static volatile int32_t lock = 0 ;
174
175
int events = 0 ;
175
176
176
- if ( opal_progress_event_flag != 0 ) {
177
+ if ( opal_progress_event_flag != 0 && ! OPAL_THREAD_SWAP_32 ( & lock , 1 ) ) {
177
178
#if OPAL_HAVE_WORKING_EVENTOPS
178
179
#if OPAL_PROGRESS_USE_TIMERS
179
180
#if OPAL_PROGRESS_ONLY_USEC_NATIVE
@@ -201,6 +202,7 @@ static int opal_progress_events(void)
201
202
#endif /* OPAL_PROGRESS_USE_TIMERS */
202
203
203
204
#endif /* OPAL_HAVE_WORKING_EVENTOPS */
205
+ lock = 0 ;
204
206
}
205
207
206
208
return events ;
You can’t perform that action at this time.
0 commit comments