diff --git a/opal/mca/btl/usnic/btl_usnic.h b/opal/mca/btl/usnic/btl_usnic.h index ddc264b3aa..e2acf3b61d 100644 --- a/opal/mca/btl/usnic/btl_usnic.h +++ b/opal/mca/btl/usnic/btl_usnic.h @@ -63,6 +63,10 @@ BEGIN_C_DECLS * at other times as needed or as tuning dictates. */ extern uint64_t opal_btl_usnic_ticks; + +/* Lock for MPU_THREAD_MULTIPLE support */ +extern opal_recursive_mutex_t btl_usnic_lock; + static inline uint64_t get_nsec(void) { diff --git a/opal/mca/btl/usnic/btl_usnic_component.c b/opal/mca/btl/usnic/btl_usnic_component.c index 8a3b6e1800..a063b72da6 100644 --- a/opal/mca/btl/usnic/btl_usnic_component.c +++ b/opal/mca/btl/usnic/btl_usnic_component.c @@ -87,7 +87,7 @@ #define OPAL_BTL_USNIC_NUM_COMPLETIONS 500 /* MPI_THREAD_MULTIPLE_SUPPORT */ -opal_recursive_mutex_t btl_usnic_lock; +opal_recursive_mutex_t btl_usnic_lock = OPAL_RECURSIVE_MUTEX_STATIC_INIT; /* RNG buffer definition */ opal_rng_buff_t opal_btl_usnic_rand_buff = {0}; diff --git a/opal/mca/btl/usnic/btl_usnic_module.h b/opal/mca/btl/usnic/btl_usnic_module.h index 15cc1933ef..b7f49c596b 100644 --- a/opal/mca/btl/usnic/btl_usnic_module.h +++ b/opal/mca/btl/usnic/btl_usnic_module.h @@ -53,12 +53,6 @@ BEGIN_C_DECLS -/* - * MPI_THREAD_MULTIPLE support - */ -extern opal_recursive_mutex_t btl_usnic_lock; - - /* * Forward declarations to avoid include loops */