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 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) 2017 Research Organization for Information Science
14
+ * and Technology (RIST). All rights reserved.
13
15
* $COPYRIGHT$
14
16
*
15
17
* Additional copyrights may follow
@@ -54,8 +56,8 @@ static inline int mca_pml_ob1_process_pending_cuda_async_copies(void)
54
56
static int mca_pml_ob1_progress_needed = 0 ;
55
57
int mca_pml_ob1_enable_progress (int32_t count )
56
58
{
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 )
59
61
return 0 ; /* progress was already on */
60
62
61
63
opal_progress_register (mca_pml_ob1_progress );
@@ -118,7 +120,7 @@ int mca_pml_ob1_progress(void)
118
120
119
121
if ( 0 != completed_requests ) {
120
122
j = OPAL_ATOMIC_ADD32 (& mca_pml_ob1_progress_needed , - completed_requests );
121
- if ( j == completed_requests ) {
123
+ if ( 0 == j ) {
122
124
opal_progress_unregister (mca_pml_ob1_progress );
123
125
}
124
126
}
You can’t perform that action at this time.
0 commit comments