From afe07cd5d518f596c52aa3960422bdb15d2c11ee Mon Sep 17 00:00:00 2001 From: Thananon Patinyasakdikul Date: Mon, 20 Jun 2016 09:43:13 -0700 Subject: [PATCH] Fixed common symbol in btl/usnic - This commit fixes the accidental common symbol btl_usnic_lock - It also moves the btl_usnic_lock declaration to btl_usnic.h --- opal/mca/btl/usnic/btl_usnic.h | 4 ++++ opal/mca/btl/usnic/btl_usnic_component.c | 2 +- opal/mca/btl/usnic/btl_usnic_module.h | 6 ------ 3 files changed, 5 insertions(+), 7 deletions(-) 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 */