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 1010 * University of Stuttgart. All rights reserved.
1111 * Copyright (c) 2004-2005 The Regents of the University of California.
1212 * 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
1414 * reserved.
1515 * Copyright (c) 2015-2016 Research Organization for Information Science
1616 * and Technology (RIST). All rights reserved.
@@ -171,9 +171,10 @@ opal_progress_finalize(void)
171171
172172static int opal_progress_events (void )
173173{
174+ static volatile int32_t lock = 0 ;
174175 int events = 0 ;
175176
176- if ( opal_progress_event_flag != 0 ) {
177+ if ( opal_progress_event_flag != 0 && ! OPAL_THREAD_SWAP_32 ( & lock , 1 ) ) {
177178#if OPAL_HAVE_WORKING_EVENTOPS
178179#if OPAL_PROGRESS_USE_TIMERS
179180#if OPAL_PROGRESS_ONLY_USEC_NATIVE
@@ -201,6 +202,7 @@ static int opal_progress_events(void)
201202#endif /* OPAL_PROGRESS_USE_TIMERS */
202203
203204#endif /* OPAL_HAVE_WORKING_EVENTOPS */
205+ lock = 0 ;
204206 }
205207
206208 return events ;
You can’t perform that action at this time.
0 commit comments