File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
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) 2017 Research Organization for Information Science
14+ * and Technology (RIST). All rights reserved.
1315 * $COPYRIGHT$
1416 *
1517 * Additional copyrights may follow
@@ -54,8 +56,8 @@ static inline int mca_pml_ob1_process_pending_cuda_async_copies(void)
5456static int mca_pml_ob1_progress_needed = 0 ;
5557int mca_pml_ob1_enable_progress (int32_t count )
5658{
57- int32_t old = OPAL_ATOMIC_ADD32 (& mca_pml_ob1_progress_needed , count );
58- if ( 0 != old )
59+ int32_t progress_count = OPAL_ATOMIC_ADD32 (& mca_pml_ob1_progress_needed , count );
60+ if ( 1 < progress_count )
5961 return 0 ; /* progress was already on */
6062
6163 opal_progress_register (mca_pml_ob1_progress );
@@ -118,7 +120,7 @@ int mca_pml_ob1_progress(void)
118120
119121 if ( 0 != completed_requests ) {
120122 j = OPAL_ATOMIC_ADD32 (& mca_pml_ob1_progress_needed , - completed_requests );
121- if ( j == completed_requests ) {
123+ if ( 0 == j ) {
122124 opal_progress_unregister (mca_pml_ob1_progress );
123125 }
124126 }
You can’t perform that action at this time.
0 commit comments