summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2016-10-28 11:05:45 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2016-10-28 11:05:45 -0700
commitd7f0b3c76e9e913b6c031f570e079ce9aa78a91a (patch)
treed27028ef37a636b9b1422642292b9885ae7dbe8b
parent66df227f72156ddbc3f8b9321ff507a4e8a91523 (diff)
parent1799695dc23d2a9135a7c966cb56c80c08880801 (diff)
Merge branch 'maint'
-rw-r--r--cmake/Modules/GrPlatform.cmake8
-rw-r--r--gnuradio-runtime/lib/pmt/pmt.cc12
-rw-r--r--gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx2
-rw-r--r--gr-utils/python/modtool/gr-newmod/cmake/Modules/GrPlatform.cmake8
4 files changed, 28 insertions, 2 deletions
diff --git a/cmake/Modules/GrPlatform.cmake b/cmake/Modules/GrPlatform.cmake
index fbbea5fee0..00a53d04d9 100644
--- a/cmake/Modules/GrPlatform.cmake
+++ b/cmake/Modules/GrPlatform.cmake
@@ -51,4 +51,12 @@ endif()
if(NOT DEFINED LIB_SUFFIX AND LIB64_CONVENTION AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$")
set(LIB_SUFFIX 64)
endif()
+
+########################################################################
+# Detect /lib versus /lib64
+########################################################################
+if (CMAKE_INSTALL_LIBDIR MATCHES lib64)
+ set(LIB_SUFFIX 64)
+endif()
+
set(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix")
diff --git a/gnuradio-runtime/lib/pmt/pmt.cc b/gnuradio-runtime/lib/pmt/pmt.cc
index 51fb86e58c..e09452e60e 100644
--- a/gnuradio-runtime/lib/pmt/pmt.cc
+++ b/gnuradio-runtime/lib/pmt/pmt.cc
@@ -281,7 +281,17 @@ string_to_symbol(const std::string &name)
if (name == _symbol(sym)->name())
return sym; // Yes. Return it
}
-
+
+ // Lock the table on insert for thread safety:
+ static boost::mutex thread_safety;
+ boost::mutex::scoped_lock lock(thread_safety);
+ // Re-do the search in case another thread inserted this symbol into the table
+ // before we got the lock
+ for (pmt_t sym = (*get_symbol_hash_table())[hash]; sym; sym = _symbol(sym)->next()){
+ if (name == _symbol(sym)->name())
+ return sym; // Yes. Return it
+ }
+
// Nope. Make a new one.
pmt_t sym = pmt_t(new pmt_symbol(name));
_symbol(sym)->set_next((*get_symbol_hash_table())[hash]);
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
index cf67584235..15a2153a0f 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
@@ -46,7 +46,7 @@ except ImportError:
"Please check that they are installed and try again."
sys.exit(1)
-from PyQt4 import QtCore,Qt,Qwt5
+from PyQt4 import QtCore,Qt
import PyQt4.QtGui as QtGui
import itertools
diff --git a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrPlatform.cmake b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrPlatform.cmake
index fbbea5fee0..00a53d04d9 100644
--- a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrPlatform.cmake
+++ b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrPlatform.cmake
@@ -51,4 +51,12 @@ endif()
if(NOT DEFINED LIB_SUFFIX AND LIB64_CONVENTION AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$")
set(LIB_SUFFIX 64)
endif()
+
+########################################################################
+# Detect /lib versus /lib64
+########################################################################
+if (CMAKE_INSTALL_LIBDIR MATCHES lib64)
+ set(LIB_SUFFIX 64)
+endif()
+
set(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix")