File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ static bool requests_initialized = false;
30
30
static opal_list_t requests ;
31
31
static opal_atomic_int32_t active_requests = 0 ;
32
32
static bool in_progress = false;
33
- static opal_mutex_t lock ;
33
+ static opal_mutex_t lock = OPAL_MUTEX_STATIC_INIT ;
34
34
35
35
static int grequestx_progress (void ) {
36
36
ompi_grequest_t * request , * next ;
@@ -79,13 +79,12 @@ int ompi_grequestx_start(
79
79
*/
80
80
OBJ_RETAIN (((ompi_grequest_t * )* request ));
81
81
82
+ OPAL_THREAD_LOCK (& lock );
82
83
if (!requests_initialized ) {
83
84
OBJ_CONSTRUCT (& requests , opal_list_t );
84
- OBJ_CONSTRUCT (& lock , opal_mutex_t );
85
85
requests_initialized = true;
86
86
}
87
87
88
- OPAL_THREAD_LOCK (& lock );
89
88
opal_list_append (& requests , & ((* request )-> super .super ));
90
89
OPAL_THREAD_UNLOCK (& lock );
91
90
int32_t tmp = OPAL_THREAD_ADD_FETCH32 (& active_requests , 1 );
You can’t perform that action at this time.
0 commit comments