summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/tpb_thread_body.cc
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2014-07-07 15:31:33 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2014-07-07 15:31:33 -0700
commit3b6ca994ca2219d3834814d3175ef6aec04b33fb (patch)
treef3b58aee799276f40317f518eb548b1fd16b0be5 /gnuradio-runtime/lib/tpb_thread_body.cc
parent597b93798a804cde1783d6d2ab53b348d57c44cd (diff)
Windows compatibility fixes
* Fixed usage of Windows thread-naming API, changed minimum Windows version * Fixed MSVC usage of isnan, round
Diffstat (limited to 'gnuradio-runtime/lib/tpb_thread_body.cc')
-rw-r--r--gnuradio-runtime/lib/tpb_thread_body.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnuradio-runtime/lib/tpb_thread_body.cc b/gnuradio-runtime/lib/tpb_thread_body.cc
index d2f0fce833..d80ab860fa 100644
--- a/gnuradio-runtime/lib/tpb_thread_body.cc
+++ b/gnuradio-runtime/lib/tpb_thread_body.cc
@@ -37,7 +37,12 @@ namespace gr {
{
//std::cerr << "tpb_thread_body: " << block << std::endl;
+#ifdef _MSC_VER
+ #include <Windows.h>
+ thread::set_thread_name(GetCurrentThread(), boost::str(boost::format("%s%d") % block->name() % block->unique_id()));
+#else
thread::set_thread_name(pthread_self(), boost::str(boost::format("%s%d") % block->name() % block->unique_id()));
+#endif
block_detail *d = block->detail().get();
block_executor::state s;