summaryrefslogtreecommitdiff
path: root/gr-blocks
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2013-04-02 16:02:33 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2013-04-02 16:02:33 -0700
commiteea870b1dd9c5b90dfa7d94e6a15ffe44cfbee7f (patch)
treeaf3aa889c94cff9c503edefeaf19cb3635693bfb /gr-blocks
parente648165dcc7609524681b5eaf9620798b75b8420 (diff)
parent9acf35715fbb8aca5a991a3f41965db8f4cde683 (diff)
Merge branch 'runtime-gruel' into next
Conflicts: gnuradio-runtime/lib/CMakeLists.txt
Diffstat (limited to 'gr-blocks')
-rw-r--r--gr-blocks/grc/blocks_message_strobe.xml2
-rw-r--r--gr-blocks/grc/blocks_random_pdu.xml2
-rw-r--r--gr-blocks/include/blocks/api.h2
-rw-r--r--gr-blocks/include/blocks/pdu.h2
-rw-r--r--gr-blocks/lib/CMakeLists.txt1
-rw-r--r--gr-blocks/lib/annotator_raw_impl.cc4
-rw-r--r--gr-blocks/lib/annotator_raw_impl.h4
-rw-r--r--gr-blocks/lib/delay_impl.cc4
-rw-r--r--gr-blocks/lib/delay_impl.h4
-rw-r--r--gr-blocks/lib/file_meta_sink_impl.cc6
-rw-r--r--gr-blocks/lib/file_meta_sink_impl.h4
-rw-r--r--gr-blocks/lib/file_meta_source_impl.cc8
-rw-r--r--gr-blocks/lib/file_meta_source_impl.h6
-rw-r--r--gr-blocks/lib/file_sink_base.cc8
-rw-r--r--gr-blocks/lib/file_source_impl.cc10
-rw-r--r--gr-blocks/lib/message_debug_impl.cc4
-rw-r--r--gr-blocks/lib/message_debug_impl.h6
-rw-r--r--gr-blocks/lib/qa_blocks.h2
-rw-r--r--gr-blocks/lib/qa_rotator.cc2
-rw-r--r--gr-blocks/lib/qa_set_msg_handler.cc2
-rw-r--r--gr-blocks/lib/socket_pdu_impl.cc2
-rw-r--r--gr-blocks/lib/stream_pdu_base.cc2
-rw-r--r--gr-blocks/lib/stream_pdu_base.h6
-rw-r--r--gr-blocks/lib/tag_debug_impl.cc6
-rw-r--r--gr-blocks/lib/tag_debug_impl.h4
-rw-r--r--gr-blocks/lib/tcp_connection.h2
-rw-r--r--gr-blocks/lib/udp_sink_impl.cc6
-rw-r--r--gr-blocks/lib/udp_sink_impl.h2
-rw-r--r--gr-blocks/lib/udp_source_impl.cc8
-rw-r--r--gr-blocks/lib/udp_source_impl.h8
-rw-r--r--gr-blocks/lib/vector_map_impl.cc2
-rw-r--r--gr-blocks/lib/vector_map_impl.h4
-rw-r--r--gr-blocks/lib/wavfile_sink_impl.cc12
-rw-r--r--gr-blocks/python/parse_file_metadata.py7
-rw-r--r--gr-blocks/python/qa_python_message_passing.py3
-rw-r--r--gr-blocks/swig/CMakeLists.txt4
-rw-r--r--gr-blocks/swig/blocks_swig.i2
-rw-r--r--gr-blocks/tests/CMakeLists.txt1
38 files changed, 78 insertions, 86 deletions
diff --git a/gr-blocks/grc/blocks_message_strobe.xml b/gr-blocks/grc/blocks_message_strobe.xml
index 25c98cd01c..8cd39a8bf2 100644
--- a/gr-blocks/grc/blocks_message_strobe.xml
+++ b/gr-blocks/grc/blocks_message_strobe.xml
@@ -8,7 +8,7 @@
<name>Message Strobe</name>
<key>blocks_message_strobe</key>
<import>from gnuradio import blocks</import>
- <import>from gruel import pmt</import>
+ <import>import pmt</import>
<make>blocks.message_strobe($msg, $period)</make>
<param>
<name>Message PMT</name>
diff --git a/gr-blocks/grc/blocks_random_pdu.xml b/gr-blocks/grc/blocks_random_pdu.xml
index 640e14de8a..83e3e65fd6 100644
--- a/gr-blocks/grc/blocks_random_pdu.xml
+++ b/gr-blocks/grc/blocks_random_pdu.xml
@@ -8,7 +8,7 @@
<name>Random PDU Generator</name>
<key>blocks_random_pdu</key>
<import>from gnuradio import blocks</import>
- <import>from gruel import pmt</import>
+ <import>import pmt</import>
<make>blocks.random_pdu($minsize, $maxsize)</make>
<param>
<name>Min Bytes</name>
diff --git a/gr-blocks/include/blocks/api.h b/gr-blocks/include/blocks/api.h
index 45fbc0d216..d77bdbdd5b 100644
--- a/gr-blocks/include/blocks/api.h
+++ b/gr-blocks/include/blocks/api.h
@@ -22,7 +22,7 @@
#ifndef INCLUDED_BLOCKS_API_H
#define INCLUDED_BLOCKS_API_H
-#include <gruel/attributes.h>
+#include <attributes.h>
#ifdef gnuradio_blocks_EXPORTS
# define BLOCKS_API __GR_ATTR_EXPORT
diff --git a/gr-blocks/include/blocks/pdu.h b/gr-blocks/include/blocks/pdu.h
index ffcfbb9abb..8890c5cb17 100644
--- a/gr-blocks/include/blocks/pdu.h
+++ b/gr-blocks/include/blocks/pdu.h
@@ -25,7 +25,7 @@
#include <blocks/api.h>
#include <gr_complex.h>
-#include <gruel/pmt.h>
+#include <pmt/pmt.h>
#define PDU_PORT_ID pmt::mp("pdus")
#define PDU_LENGTH_TAG pmt::mp("pdu_length")
diff --git a/gr-blocks/lib/CMakeLists.txt b/gr-blocks/lib/CMakeLists.txt
index 5fc2b56b2d..bdd7ca77a6 100644
--- a/gr-blocks/lib/CMakeLists.txt
+++ b/gr-blocks/lib/CMakeLists.txt
@@ -128,7 +128,6 @@ include_directories(
${GR_BLOCKS_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
- ${GRUEL_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
diff --git a/gr-blocks/lib/annotator_raw_impl.cc b/gr-blocks/lib/annotator_raw_impl.cc
index fa323f999e..ee5deb1f6b 100644
--- a/gr-blocks/lib/annotator_raw_impl.cc
+++ b/gr-blocks/lib/annotator_raw_impl.cc
@@ -60,7 +60,7 @@ namespace gr {
void
annotator_raw_impl::add_tag(uint64_t offset, pmt_t key, pmt_t val)
{
- gruel::scoped_lock l(d_mutex);
+ gr::thread::scoped_lock l(d_mutex);
gr_tag_t tag;
tag.srcid = pmt::intern(name());
@@ -84,7 +84,7 @@ namespace gr {
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
- gruel::scoped_lock l(d_mutex);
+ gr::thread::scoped_lock l(d_mutex);
const char *in = (const char*)input_items[0];
char *out = (char*)output_items[0];
diff --git a/gr-blocks/lib/annotator_raw_impl.h b/gr-blocks/lib/annotator_raw_impl.h
index 2e349bfe33..e0e16c30d6 100644
--- a/gr-blocks/lib/annotator_raw_impl.h
+++ b/gr-blocks/lib/annotator_raw_impl.h
@@ -24,7 +24,7 @@
#define INCLUDED_GR_ANNOTATOR_RAW_IMPL_H
#include <blocks/annotator_raw.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
namespace gr {
namespace blocks {
@@ -34,7 +34,7 @@ namespace gr {
private:
size_t d_itemsize;
std::vector<gr_tag_t> d_queued_tags;
- gruel::mutex d_mutex;
+ gr::thread::mutex d_mutex;
public:
annotator_raw_impl(size_t sizeof_stream_item);
diff --git a/gr-blocks/lib/delay_impl.cc b/gr-blocks/lib/delay_impl.cc
index 67449aca20..08cd1db1c3 100644
--- a/gr-blocks/lib/delay_impl.cc
+++ b/gr-blocks/lib/delay_impl.cc
@@ -69,7 +69,7 @@ namespace gr {
// protects from quickly-repeated calls to this function that
// would end with d_delta=0.
if(d != dly()) {
- gruel::scoped_lock l(d_mutex_delay);
+ gr::thread::scoped_lock l(d_mutex_delay);
int old = dly();
set_history(d+1);
d_delta += dly() - old;
@@ -82,7 +82,7 @@ namespace gr {
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
- gruel::scoped_lock l(d_mutex_delay);
+ gr::thread::scoped_lock l(d_mutex_delay);
assert(input_items.size() == output_items.size());
const char *iptr;
diff --git a/gr-blocks/lib/delay_impl.h b/gr-blocks/lib/delay_impl.h
index 56d971b116..1cb959359e 100644
--- a/gr-blocks/lib/delay_impl.h
+++ b/gr-blocks/lib/delay_impl.h
@@ -24,7 +24,7 @@
#define INCLUDED_GR_DELAY_IMPL_H
#include <blocks/delay.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
namespace gr {
namespace blocks {
@@ -37,7 +37,7 @@ namespace gr {
size_t d_itemsize;
int d_delta;
- gruel::mutex d_mutex_delay;
+ gr::thread::mutex d_mutex_delay;
public:
delay_impl(size_t itemsize, int delay);
diff --git a/gr-blocks/lib/file_meta_sink_impl.cc b/gr-blocks/lib/file_meta_sink_impl.cc
index d996e7a93e..dc87a7e956 100644
--- a/gr-blocks/lib/file_meta_sink_impl.cc
+++ b/gr-blocks/lib/file_meta_sink_impl.cc
@@ -171,7 +171,7 @@ namespace gr {
bool
file_meta_sink_impl::_open(FILE **fp, const char *filename)
{
- gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this function
+ gr::thread::scoped_lock guard(d_mutex); // hold mutex for duration of this function
bool ret = true;
int fd;
@@ -201,7 +201,7 @@ namespace gr {
void
file_meta_sink_impl::close()
{
- gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this function
+ gr::thread::scoped_lock guard(d_mutex); // hold mutex for duration of this function
update_last_header();
if(d_state == STATE_DETACHED) {
@@ -222,7 +222,7 @@ namespace gr {
file_meta_sink_impl::do_update()
{
if(d_updated) {
- gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this block
+ gr::thread::scoped_lock guard(d_mutex); // hold mutex for duration of this block
if(d_state == STATE_DETACHED) {
if(d_hdr_fp)
fclose(d_hdr_fp);
diff --git a/gr-blocks/lib/file_meta_sink_impl.h b/gr-blocks/lib/file_meta_sink_impl.h
index 566c997b3d..d4048e1e4e 100644
--- a/gr-blocks/lib/file_meta_sink_impl.h
+++ b/gr-blocks/lib/file_meta_sink_impl.h
@@ -24,8 +24,8 @@
#define INCLUDED_BLOCKS_FILE_META_SINK_IMPL_H
#include <blocks/file_meta_sink.h>
-#include <gruel/pmt.h>
-#include <gruel/thread.h>
+#include <pmt/pmt.h>
+#include <thread/thread.h>
using namespace pmt;
diff --git a/gr-blocks/lib/file_meta_source_impl.cc b/gr-blocks/lib/file_meta_source_impl.cc
index 9d66193e53..5d64e40a26 100644
--- a/gr-blocks/lib/file_meta_source_impl.cc
+++ b/gr-blocks/lib/file_meta_source_impl.cc
@@ -297,7 +297,7 @@ namespace gr {
bool
file_meta_source_impl::_open(FILE **fp, const char *filename)
{
- gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this function
+ gr::thread::scoped_lock guard(d_mutex); // hold mutex for duration of this function
bool ret = true;
int fd;
@@ -326,7 +326,7 @@ namespace gr {
void
file_meta_source_impl::close()
{
- gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this function
+ gr::thread::scoped_lock guard(d_mutex); // hold mutex for duration of this function
if(d_state == STATE_DETACHED) {
if(d_new_hdr_fp) {
fclose(d_new_hdr_fp);
@@ -345,7 +345,7 @@ namespace gr {
file_meta_source_impl::do_update()
{
if(d_updated) {
- gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this block
+ gr::thread::scoped_lock guard(d_mutex); // hold mutex for duration of this block
if(d_state == STATE_DETACHED) {
if(d_hdr_fp)
fclose(d_hdr_fp);
@@ -395,7 +395,7 @@ namespace gr {
d_tags.pop_back();
}
- gruel::scoped_lock lock(d_mutex); // hold for the rest of this function
+ gr::thread::scoped_lock lock(d_mutex); // hold for the rest of this function
while(size) {
i = fread(out, d_itemsize, size, d_fp);
diff --git a/gr-blocks/lib/file_meta_source_impl.h b/gr-blocks/lib/file_meta_source_impl.h
index ca7ddc6e10..3f8ebda6ee 100644
--- a/gr-blocks/lib/file_meta_source_impl.h
+++ b/gr-blocks/lib/file_meta_source_impl.h
@@ -25,8 +25,8 @@
#include <blocks/file_meta_source.h>
#include <gr_tags.h>
-#include <gruel/pmt.h>
-#include <gruel/thread.h>
+#include <pmt/pmt.h>
+#include <thread/thread.h>
#include <blocks/file_meta_sink.h>
@@ -50,7 +50,7 @@ namespace gr {
bool d_updated;
bool d_repeat;
- gruel::mutex d_mutex;
+ gr::thread::mutex d_mutex;
FILE *d_new_fp, *d_new_hdr_fp;
FILE *d_fp, *d_hdr_fp;
meta_state_t d_state;
diff --git a/gr-blocks/lib/file_sink_base.cc b/gr-blocks/lib/file_sink_base.cc
index 47c8f9882b..d3a36f3321 100644
--- a/gr-blocks/lib/file_sink_base.cc
+++ b/gr-blocks/lib/file_sink_base.cc
@@ -31,7 +31,7 @@
#include <fcntl.h>
#include <stdexcept>
#include <stdio.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
// win32 (mingw/msvc) specific
#ifdef HAVE_IO_H
@@ -72,7 +72,7 @@ namespace gr {
bool
file_sink_base::open(const char *filename)
{
- gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this function
+ gr::thread::scoped_lock guard(d_mutex); // hold mutex for duration of this function
// we use the open system call to get access to the O_LARGEFILE flag.
int fd;
@@ -99,7 +99,7 @@ namespace gr {
void
file_sink_base::close()
{
- gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this function
+ gr::thread::scoped_lock guard(d_mutex); // hold mutex for duration of this function
if(d_new_fp) {
fclose(d_new_fp);
@@ -112,7 +112,7 @@ namespace gr {
file_sink_base::do_update()
{
if(d_updated) {
- gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this block
+ gr::thread::scoped_lock guard(d_mutex); // hold mutex for duration of this block
if(d_fp)
fclose(d_fp);
d_fp = d_new_fp; // install new file pointer
diff --git a/gr-blocks/lib/file_source_impl.cc b/gr-blocks/lib/file_source_impl.cc
index dcbd042106..3c30884a59 100644
--- a/gr-blocks/lib/file_source_impl.cc
+++ b/gr-blocks/lib/file_source_impl.cc
@@ -24,7 +24,7 @@
#include "config.h"
#endif
-#include <gruel/thread.h>
+#include <thread/thread.h>
#include "file_source_impl.h"
#include <gr_io_signature.h>
#include <cstdio>
@@ -85,7 +85,7 @@ namespace gr {
file_source_impl::open(const char *filename, bool repeat)
{
// obtain exclusive access for duration of this function
- gruel::scoped_lock lock(fp_mutex);
+ gr::thread::scoped_lock lock(fp_mutex);
int fd;
@@ -114,7 +114,7 @@ namespace gr {
file_source_impl::close()
{
// obtain exclusive access for duration of this function
- gruel::scoped_lock lock(fp_mutex);
+ gr::thread::scoped_lock lock(fp_mutex);
if(d_new_fp != NULL) {
fclose(d_new_fp);
@@ -127,7 +127,7 @@ namespace gr {
file_source_impl::do_update()
{
if(d_updated) {
- gruel::scoped_lock lock(fp_mutex); // hold while in scope
+ gr::thread::scoped_lock lock(fp_mutex); // hold while in scope
if(d_fp)
fclose(d_fp);
@@ -151,7 +151,7 @@ namespace gr {
if(d_fp == NULL)
throw std::runtime_error("work with file not open");
- gruel::scoped_lock lock(fp_mutex); // hold for the rest of this function
+ gr::thread::scoped_lock lock(fp_mutex); // hold for the rest of this function
while(size) {
i = fread(o, d_itemsize, size, (FILE*)d_fp);
diff --git a/gr-blocks/lib/message_debug_impl.cc b/gr-blocks/lib/message_debug_impl.cc
index 6455513d76..04f31f88a2 100644
--- a/gr-blocks/lib/message_debug_impl.cc
+++ b/gr-blocks/lib/message_debug_impl.cc
@@ -50,7 +50,7 @@ namespace gr {
void
message_debug_impl::store(pmt::pmt_t msg)
{
- gruel::scoped_lock guard(d_mutex);
+ gr::thread::scoped_lock guard(d_mutex);
d_messages.push_back(msg);
}
@@ -87,7 +87,7 @@ namespace gr {
pmt::pmt_t
message_debug_impl::get_message(int i)
{
- gruel::scoped_lock guard(d_mutex);
+ gr::thread::scoped_lock guard(d_mutex);
if((size_t)i >= d_messages.size()) {
throw std::runtime_error("message_debug: index for message out of bounds.\n");
diff --git a/gr-blocks/lib/message_debug_impl.h b/gr-blocks/lib/message_debug_impl.h
index c9d82bd561..817a9a834c 100644
--- a/gr-blocks/lib/message_debug_impl.h
+++ b/gr-blocks/lib/message_debug_impl.h
@@ -25,8 +25,8 @@
#include <blocks/message_debug.h>
#include <gr_block.h>
-#include <gruel/thread.h>
-#include <gruel/pmt.h>
+#include <thread/thread.h>
+#include <pmt/pmt.h>
namespace gr {
namespace blocks {
@@ -72,7 +72,7 @@ namespace gr {
*/
void store(pmt::pmt_t msg);
- gruel::mutex d_mutex;
+ gr::thread::mutex d_mutex;
std::vector<pmt::pmt_t> d_messages;
public:
diff --git a/gr-blocks/lib/qa_blocks.h b/gr-blocks/lib/qa_blocks.h
index 88eac60426..ad538134bd 100644
--- a/gr-blocks/lib/qa_blocks.h
+++ b/gr-blocks/lib/qa_blocks.h
@@ -23,7 +23,7 @@
#ifndef _QA_GR_BLOCKS_H_
#define _QA_GR_BLOCKS_H_
-#include <gruel/attributes.h>
+#include <attributes.h>
#include <cppunit/TestSuite.h>
//! collect all the tests for the gr-blocks directory
diff --git a/gr-blocks/lib/qa_rotator.cc b/gr-blocks/lib/qa_rotator.cc
index 86bbdd5282..877392075a 100644
--- a/gr-blocks/lib/qa_rotator.cc
+++ b/gr-blocks/lib/qa_rotator.cc
@@ -24,7 +24,7 @@
#include <config.h>
#endif
-#include <gruel/attributes.h>
+#include <attributes.h>
#include <cppunit/TestAssert.h>
#include <qa_rotator.h>
#include <blocks/rotator.h>
diff --git a/gr-blocks/lib/qa_set_msg_handler.cc b/gr-blocks/lib/qa_set_msg_handler.cc
index cfb990f0c4..cc94243d89 100644
--- a/gr-blocks/lib/qa_set_msg_handler.cc
+++ b/gr-blocks/lib/qa_set_msg_handler.cc
@@ -30,7 +30,7 @@
#include <blocks/null_source.h>
#include <blocks/null_sink.h>
#include <blocks/nop.h>
-#include <gruel/msg_passing.h>
+#include <messages/msg_passing.h>
#include <iostream>
#include <boost/thread/thread.hpp>
diff --git a/gr-blocks/lib/socket_pdu_impl.cc b/gr-blocks/lib/socket_pdu_impl.cc
index 4ff5ce6eb9..e4ef40f87a 100644
--- a/gr-blocks/lib/socket_pdu_impl.cc
+++ b/gr-blocks/lib/socket_pdu_impl.cc
@@ -104,7 +104,7 @@ namespace gr {
else
throw std::runtime_error("gr::blocks:socket_pdu: unknown socket type");
- d_thread = gruel::thread(boost::bind(&socket_pdu_impl::run_io_service, this));
+ d_thread = gr::thread::thread(boost::bind(&socket_pdu_impl::run_io_service, this));
d_started = true;
}
diff --git a/gr-blocks/lib/stream_pdu_base.cc b/gr-blocks/lib/stream_pdu_base.cc
index 0c4e7e0863..c887ad2fac 100644
--- a/gr-blocks/lib/stream_pdu_base.cc
+++ b/gr-blocks/lib/stream_pdu_base.cc
@@ -61,7 +61,7 @@ namespace gr {
{
d_blk = blk;
d_port = port;
- d_thread = gruel::thread(boost::bind(&stream_pdu_base::run, this));
+ d_thread = gr::thread::thread(boost::bind(&stream_pdu_base::run, this));
d_started = true;
}
diff --git a/gr-blocks/lib/stream_pdu_base.h b/gr-blocks/lib/stream_pdu_base.h
index 66eaaf0c04..c305880b07 100644
--- a/gr-blocks/lib/stream_pdu_base.h
+++ b/gr-blocks/lib/stream_pdu_base.h
@@ -23,8 +23,8 @@
#ifndef INCLUDED_STREAM_PDU_BASE_H
#define INCLUDED_STREAM_PDU_BASE_H
-#include <gruel/thread.h>
-#include <gruel/pmt.h>
+#include <thread/thread.h>
+#include <pmt/pmt.h>
class gr_basic_block;
@@ -42,7 +42,7 @@ namespace gr {
bool d_started;
bool d_finished;
std::vector<uint8_t> d_rxbuf;
- gruel::thread d_thread;
+ gr::thread::thread d_thread;
pmt::pmt_t d_port;
gr_basic_block *d_blk;
diff --git a/gr-blocks/lib/tag_debug_impl.cc b/gr-blocks/lib/tag_debug_impl.cc
index c595d41db5..3bcffb664f 100644
--- a/gr-blocks/lib/tag_debug_impl.cc
+++ b/gr-blocks/lib/tag_debug_impl.cc
@@ -56,14 +56,14 @@ namespace gr {
std::vector<gr_tag_t>
tag_debug_impl::current_tags()
{
- gruel::scoped_lock l(d_mutex);
+ gr::thread::scoped_lock l(d_mutex);
return d_tags;
}
void
tag_debug_impl::set_display(bool d)
{
- gruel::scoped_lock l(d_mutex);
+ gr::thread::scoped_lock l(d_mutex);
d_display = d;
}
@@ -72,7 +72,7 @@ namespace gr {
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
- gruel::scoped_lock l(d_mutex);
+ gr::thread::scoped_lock l(d_mutex);
std::stringstream sout;
if(d_display) {
diff --git a/gr-blocks/lib/tag_debug_impl.h b/gr-blocks/lib/tag_debug_impl.h
index 988d0e1103..caf5b6b4f5 100644
--- a/gr-blocks/lib/tag_debug_impl.h
+++ b/gr-blocks/lib/tag_debug_impl.h
@@ -24,7 +24,7 @@
#define INCLUDED_GR_TAG_DEBUG_IMPL_H
#include <blocks/tag_debug.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
#include <stddef.h>
namespace gr {
@@ -37,7 +37,7 @@ namespace gr {
std::vector<gr_tag_t> d_tags;
std::vector<gr_tag_t>::iterator d_tags_itr;
bool d_display;
- gruel::mutex d_mutex;
+ gr::thread::mutex d_mutex;
public:
tag_debug_impl(size_t sizeof_stream_item, const std::string &name);
diff --git a/gr-blocks/lib/tcp_connection.h b/gr-blocks/lib/tcp_connection.h
index ba57de0783..32a5ef8c79 100644
--- a/gr-blocks/lib/tcp_connection.h
+++ b/gr-blocks/lib/tcp_connection.h
@@ -25,7 +25,7 @@
#include <boost/array.hpp>
#include <boost/asio.hpp>
-#include <gruel/pmt.h>
+#include <pmt/pmt.h>
class gr_basic_block;
diff --git a/gr-blocks/lib/udp_sink_impl.cc b/gr-blocks/lib/udp_sink_impl.cc
index db21da3eeb..4bce4ae9c5 100644
--- a/gr-blocks/lib/udp_sink_impl.cc
+++ b/gr-blocks/lib/udp_sink_impl.cc
@@ -28,7 +28,7 @@
#include <gr_io_signature.h>
#include <boost/asio.hpp>
#include <boost/format.hpp>
-#include <gruel/thread.h>
+#include <thread/thread.h>
#include <stdexcept>
#include <stdio.h>
#include <string.h>
@@ -95,7 +95,7 @@ namespace gr {
if(!d_connected)
return;
- gruel::scoped_lock guard(d_mutex); // protect d_socket from work()
+ gr::thread::scoped_lock guard(d_mutex); // protect d_socket from work()
// Send a few zero-length packets to signal receiver we are done
boost::array<char, 1> send_buf = {{ 0 }};
@@ -120,7 +120,7 @@ namespace gr {
ssize_t r=0, bytes_sent=0, bytes_to_send=0;
ssize_t total_size = noutput_items*d_itemsize;
- gruel::scoped_lock guard(d_mutex); // protect d_socket
+ gr::thread::scoped_lock guard(d_mutex); // protect d_socket
while(bytes_sent < total_size) {
bytes_to_send = std::min((ssize_t)d_payload_size, (total_size-bytes_sent));
diff --git a/gr-blocks/lib/udp_sink_impl.h b/gr-blocks/lib/udp_sink_impl.h
index 243d499b60..0f0d081422 100644
--- a/gr-blocks/lib/udp_sink_impl.h
+++ b/gr-blocks/lib/udp_sink_impl.h
@@ -37,7 +37,7 @@ namespace gr {
int d_payload_size; // maximum transmission unit (packet length)
bool d_eof; // send zero-length packet on disconnect
bool d_connected; // are we connected?
- gruel::mutex d_mutex; // protects d_socket and d_connected
+ gr::thread::mutex d_mutex; // protects d_socket and d_connected
boost::asio::ip::udp::socket *d_socket; // handle to socket
boost::asio::ip::udp::endpoint d_endpoint;
diff --git a/gr-blocks/lib/udp_source_impl.cc b/gr-blocks/lib/udp_source_impl.cc
index e6e9caf8ad..5b108c393e 100644
--- a/gr-blocks/lib/udp_source_impl.cc
+++ b/gr-blocks/lib/udp_source_impl.cc
@@ -100,7 +100,7 @@ namespace gr {
d_socket->bind(d_endpoint);
start_receive();
- d_udp_thread = gruel::thread(boost::bind(&udp_source_impl::run_io_service, this));
+ d_udp_thread = gr::thread::thread(boost::bind(&udp_source_impl::run_io_service, this));
d_connected = true;
}
}
@@ -108,7 +108,7 @@ namespace gr {
void
udp_source_impl::disconnect()
{
- gruel::scoped_lock lock(d_setlock);
+ gr::thread::scoped_lock lock(d_setlock);
if(!d_connected)
return;
@@ -144,7 +144,7 @@ namespace gr {
{
if(!error) {
{
- boost::lock_guard<gruel::mutex> lock(d_udp_mutex);
+ boost::lock_guard<gr::thread::mutex> lock(d_udp_mutex);
if(d_eof && (bytes_transferred == 1) && (d_rxbuf[0] == 0x00)) {
// If we are using EOF notification, test for it and don't
// add anything to the output.
@@ -177,7 +177,7 @@ namespace gr {
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
- gruel::scoped_lock l(d_setlock);
+ gr::thread::scoped_lock l(d_setlock);
char *out = (char*)output_items[0];
diff --git a/gr-blocks/lib/udp_source_impl.h b/gr-blocks/lib/udp_source_impl.h
index 8927f5f933..d6c773726b 100644
--- a/gr-blocks/lib/udp_source_impl.h
+++ b/gr-blocks/lib/udp_source_impl.h
@@ -26,7 +26,7 @@
#include <blocks/udp_source.h>
#include <boost/asio.hpp>
#include <boost/format.hpp>
-#include <gruel/thread.h>
+#include <thread/thread.h>
namespace gr {
namespace blocks {
@@ -52,9 +52,9 @@ namespace gr {
boost::asio::ip::udp::endpoint d_endpoint_rcvd;
boost::asio::io_service d_io_service;
- gruel::condition_variable d_cond_wait;
- gruel::mutex d_udp_mutex;
- gruel::thread d_udp_thread;
+ gr::thread::condition_variable d_cond_wait;
+ gr::thread::mutex d_udp_mutex;
+ gr::thread::thread d_udp_thread;
void start_receive();
void handle_read(const boost::system::error_code& error,
diff --git a/gr-blocks/lib/vector_map_impl.cc b/gr-blocks/lib/vector_map_impl.cc
index cefaaeea35..19b57bac8b 100644
--- a/gr-blocks/lib/vector_map_impl.cc
+++ b/gr-blocks/lib/vector_map_impl.cc
@@ -95,7 +95,7 @@ namespace gr {
}
}
}
- gruel::scoped_lock guard(d_mutex);
+ gr::thread::scoped_lock guard(d_mutex);
d_mapping = mapping;
}
diff --git a/gr-blocks/lib/vector_map_impl.h b/gr-blocks/lib/vector_map_impl.h
index e27b3b9cec..08faa2ce09 100644
--- a/gr-blocks/lib/vector_map_impl.h
+++ b/gr-blocks/lib/vector_map_impl.h
@@ -24,7 +24,7 @@
#define INCLUDED_GR_VECTOR_MAP_IMPL_H
#include <blocks/vector_map.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
namespace gr {
namespace blocks {
@@ -35,7 +35,7 @@ namespace gr {
size_t d_item_size;
std::vector<size_t> d_in_vlens;
std::vector< std::vector< std::vector<size_t> > > d_mapping;
- gruel::mutex d_mutex; // mutex to protect set/work access
+ gr::thread::mutex d_mutex; // mutex to protect set/work access
public:
vector_map_impl(size_t item_size, std::vector<size_t> in_vlens,
diff --git a/gr-blocks/lib/wavfile_sink_impl.cc b/gr-blocks/lib/wavfile_sink_impl.cc
index f8b09a114b..4591b1f9fa 100644
--- a/gr-blocks/lib/wavfile_sink_impl.cc
+++ b/gr-blocks/lib/wavfile_sink_impl.cc
@@ -32,7 +32,7 @@
#include <cstring>
#include <cmath>
#include <fcntl.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
#include <boost/math/special_functions/round.hpp>
// win32 (mingw/msvc) specific
@@ -106,7 +106,7 @@ namespace gr {
bool
wavfile_sink_impl::open(const char* filename)
{
- gruel::scoped_lock guard(d_mutex);
+ gr::thread::scoped_lock guard(d_mutex);
// we use the open system call to get access to the O_LARGEFILE flag.
int fd;
@@ -143,7 +143,7 @@ namespace gr {
void
wavfile_sink_impl::close()
{
- gruel::scoped_lock guard(d_mutex);
+ gr::thread::scoped_lock guard(d_mutex);
if(!d_fp)
return;
@@ -183,7 +183,7 @@ namespace gr {
int nwritten;
- gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this block
+ gr::thread::scoped_lock guard(d_mutex); // hold mutex for duration of this block
do_update(); // update: d_fp is reqd
if(!d_fp) // drop output on the floor
return noutput_items;
@@ -232,7 +232,7 @@ namespace gr {
void
wavfile_sink_impl::set_bits_per_sample(int bits_per_sample)
{
- gruel::scoped_lock guard(d_mutex);
+ gr::thread::scoped_lock guard(d_mutex);
if(bits_per_sample == 8 || bits_per_sample == 16) {
d_bytes_per_sample_new = bits_per_sample / 8;
}
@@ -241,7 +241,7 @@ namespace gr {
void
wavfile_sink_impl::set_sample_rate(unsigned int sample_rate)
{
- gruel::scoped_lock guard(d_mutex);
+ gr::thread::scoped_lock guard(d_mutex);
d_sample_rate = sample_rate;
}
diff --git a/gr-blocks/python/parse_file_metadata.py b/gr-blocks/python/parse_file_metadata.py
index eaa8025bbf..a876f49b07 100644
--- a/gr-blocks/python/parse_file_metadata.py
+++ b/gr-blocks/python/parse_file_metadata.py
@@ -22,12 +22,7 @@
import sys
from gnuradio import gr
-
-try:
- import pmt
-except ImportError:
- from gruel import pmt
-
+import pmt
try:
import blocks_swig as blocks
diff --git a/gr-blocks/python/qa_python_message_passing.py b/gr-blocks/python/qa_python_message_passing.py
index f199d5470f..58bf9e59bd 100644
--- a/gr-blocks/python/qa_python_message_passing.py
+++ b/gr-blocks/python/qa_python_message_passing.py
@@ -21,8 +21,7 @@
#
from gnuradio import gr, gr_unittest
-try: import pmt
-except: from gruel import pmt
+import pmt
import numpy
import time
import blocks_swig as blocks
diff --git a/gr-blocks/swig/CMakeLists.txt b/gr-blocks/swig/CMakeLists.txt
index 94495688d8..08e48fb69d 100644
--- a/gr-blocks/swig/CMakeLists.txt
+++ b/gr-blocks/swig/CMakeLists.txt
@@ -28,7 +28,6 @@ set(GR_SWIG_INCLUDE_DIRS
${GR_BLOCKS_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
- ${GRUEL_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
@@ -37,7 +36,8 @@ if(ENABLE_GR_CTRLPORT)
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/blocks_swig_doc.i)
-set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../lib)
+set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include/blocks)
+set(GR_SWIG_DOCS_TARGET_DEPS runtime_swig_swig_doc)
set(GR_SWIG_TARGET_DEPS blocks_generated_includes)
set(GR_SWIG_LIBRARIES gnuradio-blocks)
diff --git a/gr-blocks/swig/blocks_swig.i b/gr-blocks/swig/blocks_swig.i
index fa0cbf76a0..f808d1e771 100644
--- a/gr-blocks/swig/blocks_swig.i
+++ b/gr-blocks/swig/blocks_swig.i
@@ -30,7 +30,7 @@
%include <gr_endianness.h>
-%template() std::vector<size_t>;
+// For vector_map.
%template() std::vector< std::vector< std::vector<size_t> > >;
%{
diff --git a/gr-blocks/tests/CMakeLists.txt b/gr-blocks/tests/CMakeLists.txt
index 0e7feec1b2..8f2b28edfa 100644
--- a/gr-blocks/tests/CMakeLists.txt
+++ b/gr-blocks/tests/CMakeLists.txt
@@ -27,7 +27,6 @@ GR_CHECK_HDR_N_DEF(sys/resource.h HAVE_SYS_RESOURCE_H)
include_directories(
${GR_BLOCKS_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
- ${GRUEL_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${CPPUNIT_INCLUDE_DIRS}
)