diff --git a/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c b/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c index e0b8e80639..cb83d36909 100644 --- a/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c +++ b/opal/mca/btl/openib/connect/btl_openib_connect_udcm.c @@ -653,6 +653,13 @@ static int udcm_module_init (udcm_module_t *m, mca_btl_openib_module_t *btl) BTL_VERBOSE(("created cpc module %p for btl %p", (void*)m, (void*)btl)); + OBJ_CONSTRUCT(&m->cm_lock, opal_mutex_t); + OBJ_CONSTRUCT(&m->cm_send_lock, opal_mutex_t); + OBJ_CONSTRUCT(&m->cm_recv_msg_queue, opal_list_t); + OBJ_CONSTRUCT(&m->cm_recv_msg_queue_lock, opal_mutex_t); + OBJ_CONSTRUCT(&m->flying_messages, opal_list_t); + OBJ_CONSTRUCT(&m->cm_timeout_lock, opal_mutex_t); + m->btl = btl; /* Create completion channel */ @@ -725,15 +732,6 @@ static int udcm_module_init (udcm_module_t *m, mca_btl_openib_module_t *btl) udcm_cq_event_dispatch, m); m->channel_monitored = true; - OBJ_CONSTRUCT(&m->cm_lock, opal_mutex_t); - OBJ_CONSTRUCT(&m->cm_send_lock, opal_mutex_t); - OBJ_CONSTRUCT(&m->cm_recv_msg_queue, opal_list_t); - OBJ_CONSTRUCT(&m->cm_recv_msg_queue_lock, opal_mutex_t); - - OBJ_CONSTRUCT(&m->flying_messages, opal_list_t); - - OBJ_CONSTRUCT(&m->cm_timeout_lock, opal_mutex_t); - udcm_timeout_tv.tv_sec = udcm_timeout / 1000000; udcm_timeout_tv.tv_usec = udcm_timeout - 1000000 * udcm_timeout_tv.tv_sec;