hca_ptr->ib_trans.mtu =
dapl_ib_mtu(dapl_os_get_env_val("DAPL_IB_MTU", SCM_IB_MTU));
+#ifndef CQ_WAIT_OBJECT
/* initialize cq_lock */
dat_status = dapl_os_lock_init(&hca_ptr->ib_trans.cq_lock);
if (dat_status != DAT_SUCCESS) {
" open_hca: failed to init cq_lock\n");
goto bail;
}
-
/* EVD events without direct CQ channels, non-blocking */
hca_ptr->ib_trans.ib_cq =
ibv_create_comp_channel(hca_ptr->ib_hca_handle);
ibv_get_device_name(hca_ptr->ib_trans.ib_dev));
goto bail;
}
+#endif /* CQ_WAIT_OBJECT */
/* initialize cr_list lock */
dat_status = dapl_os_lock_init(&hca_ptr->ib_trans.lock);
{
dapl_dbg_log (DAPL_DBG_TYPE_UTIL," close_hca: %p\n",hca_ptr);
+#ifndef CQ_WAIT_OBJECT
dapli_cq_thread_destroy(hca_ptr);
+ dapl_os_lock_destroy(&hca_ptr->ib_trans.cq_lock);
+#endif /* CQ_WAIT_OBJECT */
if (hca_ptr->ib_hca_handle != IB_INVALID_HANDLE) {
if (ibv_close_device(hca_ptr->ib_hca_handle))
return(dapl_convert_errno(errno,"ib_close_device"));
hca_ptr->ib_hca_handle = IB_INVALID_HANDLE;
}
- dapl_os_lock_destroy(&hca_ptr->ib_trans.cq_lock);
/* destroy cr_thread and lock */
hca_ptr->ib_trans.cr_state = IB_THREAD_CANCEL;