From cabdafcb55423b54b63b711c942d4438b6af1a65 Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Sun, 17 Mar 2013 21:31:47 -0400
Subject: cleaning up, converting examples, etc.

---
 docs/doxygen/Doxyfile.in | 13 -------------
 1 file changed, 13 deletions(-)

(limited to 'docs/doxygen/Doxyfile.in')

diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in
index 86cf2fc96f..ccd647134b 100644
--- a/docs/doxygen/Doxyfile.in
+++ b/docs/doxygen/Doxyfile.in
@@ -581,19 +581,6 @@ EXCLUDE                = @abs_top_builddir@/docs/doxygen/html \
                          @abs_top_builddir@/docs/doxygen/other/doxypy.py \
                          @abs_top_builddir@/dtools \
                          @abs_top_builddir@/gnuradio-core/src/lib/bug_work_around_6.cc \
-                         @abs_top_builddir@/gnuradio-core/src/lib/filter/assembly.h \
-                         @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_all.py \
-                         @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_XXX.py \
-                         @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_filter_XXX.py \
-                         @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig.py \
-                         @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig_generic.py \
-                         @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_util.py \
-                         @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_freq_xlating_fir_filter_XXX.py \
-                         @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_interp_fir_filter_XXX.py \
-                         @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_rational_resampler_base_XXX.py \
-                         @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_utils.py \
-                         @abs_top_builddir@/gnuradio-core/src/lib/filter/gr_altivec.h \
-                         @abs_top_builddir@/gnuradio-core/src/lib/filter/sse_debug.h \
                          @abs_top_builddir@/gnuradio-core/src/lib/gengen/generate_all.py \
                          @abs_top_builddir@/gnuradio-core/src/lib/gengen/generate_common.py \
                          @abs_top_builddir@/gnuradio-core/src/lib/missing/bug_work_around_8.cc \
-- 
cgit v1.2.3


From f74d3dae8f2ec423c61932b4ad0359f98b996a51 Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Fri, 29 Mar 2013 17:31:06 -0400
Subject: gruel: moved gruel into subdirs of gnuradio-runtime.

PMTs are handled slightly different and are installed into their own module and include dir.
---
 CMakeLists.txt                                     |    5 +-
 docs/doxygen/Doxyfile.in                           |    2 +-
 docs/doxygen/other/metadata.dox                    |    2 +-
 docs/doxygen/other/pmt.dox                         |    4 +-
 docs/doxygen/other/thread_affinity.dox             |    8 +-
 gnuradio-runtime/CMakeLists.txt                    |    2 -
 gnuradio-runtime/apps/CMakeLists.txt               |    1 -
 gnuradio-runtime/include/CMakeLists.txt            |    8 +
 gnuradio-runtime/include/attributes.h              |   74 +
 gnuradio-runtime/include/gr_basic_block.h          |    4 +-
 gnuradio-runtime/include/gr_block.h                |    4 +-
 gnuradio-runtime/include/gr_block_detail.h         |    6 +-
 gnuradio-runtime/include/gr_buffer.h               |    8 +-
 gnuradio-runtime/include/gr_feval.h                |    2 +-
 gnuradio-runtime/include/gr_msg_accepter.h         |    6 +-
 gnuradio-runtime/include/gr_msg_queue.h            |    8 +-
 gnuradio-runtime/include/gr_prefs.h                |    4 +-
 gnuradio-runtime/include/gr_py_feval.h             |    2 +-
 gnuradio-runtime/include/gr_realtime.h             |    4 +-
 gnuradio-runtime/include/gr_runtime_api.h          |    2 +-
 gnuradio-runtime/include/gr_tags.h                 |    2 +-
 gnuradio-runtime/include/gr_tpb_detail.h           |   16 +-
 gnuradio-runtime/include/high_res_timer.h          |  126 ++
 gnuradio-runtime/include/messages/CMakeLists.txt   |   31 +
 gnuradio-runtime/include/messages/msg_accepter.h   |   56 +
 .../include/messages/msg_accepter_msgq.h           |   53 +
 gnuradio-runtime/include/messages/msg_passing.h    |  123 ++
 gnuradio-runtime/include/messages/msg_producer.h   |   52 +
 gnuradio-runtime/include/messages/msg_queue.h      |   95 ++
 gnuradio-runtime/include/pmt/CMakeLists.txt        |   29 +
 gnuradio-runtime/include/pmt/api.h                 |   33 +
 gnuradio-runtime/include/pmt/pmt.h                 |  886 ++++++++++++
 gnuradio-runtime/include/pmt/pmt_pool.h            |   73 +
 gnuradio-runtime/include/pmt/pmt_sugar.h           |  174 +++
 gnuradio-runtime/include/realtime.h                |   96 ++
 .../include/rpccallbackregister_base.h             |    8 +-
 gnuradio-runtime/include/rpcpmtconverters_ice.h    |    2 +-
 gnuradio-runtime/include/rpcregisterhelpers.h      |    4 +-
 gnuradio-runtime/include/sys_pri.h                 |   42 +
 gnuradio-runtime/include/thread/CMakeLists.txt     |   29 +
 gnuradio-runtime/include/thread/thread.h           |  144 ++
 .../include/thread/thread_body_wrapper.h           |   72 +
 gnuradio-runtime/include/thread/thread_group.h     |   48 +
 gnuradio-runtime/lib/CMakeLists.txt                |   11 +-
 gnuradio-runtime/lib/gr_basic_block.cc             |    6 +-
 gnuradio-runtime/lib/gr_block_detail.cc            |   12 +-
 gnuradio-runtime/lib/gr_block_executor.cc          |    6 +-
 gnuradio-runtime/lib/gr_buffer.cc                  |   14 +-
 gnuradio-runtime/lib/gr_flowgraph.cc               |    1 -
 gnuradio-runtime/lib/gr_msg_queue.cc               |    6 +-
 gnuradio-runtime/lib/gr_realtime.cc                |    3 +-
 gnuradio-runtime/lib/gr_scheduler_sts.cc           |    4 +-
 gnuradio-runtime/lib/gr_scheduler_sts.h            |    4 +-
 gnuradio-runtime/lib/gr_scheduler_tpb.cc           |    4 +-
 gnuradio-runtime/lib/gr_scheduler_tpb.h            |    4 +-
 gnuradio-runtime/lib/gr_sptr_magic.cc              |    8 +-
 gnuradio-runtime/lib/gr_top_block_impl.cc          |    6 +-
 gnuradio-runtime/lib/gr_top_block_impl.h           |    4 +-
 gnuradio-runtime/lib/gr_tpb_thread_body.cc         |   10 +-
 gnuradio-runtime/lib/messages/CMakeLists.txt       |   29 +
 gnuradio-runtime/lib/messages/msg_accepter.cc      |   38 +
 gnuradio-runtime/lib/messages/msg_accepter_msgq.cc |   50 +
 gnuradio-runtime/lib/messages/msg_producer.cc      |   38 +
 gnuradio-runtime/lib/messages/msg_queue.cc         |  105 ++
 gnuradio-runtime/lib/pmt/CMakeLists.txt            |   91 ++
 gnuradio-runtime/lib/pmt/gen-serial-tags.py        |   53 +
 gnuradio-runtime/lib/pmt/generate_unv.py           |  190 +++
 gnuradio-runtime/lib/pmt/pmt-serial-tags.scm       |   77 ++
 gnuradio-runtime/lib/pmt/pmt.cc                    | 1436 ++++++++++++++++++++
 gnuradio-runtime/lib/pmt/pmt_int.h                 |  247 ++++
 gnuradio-runtime/lib/pmt/pmt_io.cc                 |  169 +++
 gnuradio-runtime/lib/pmt/pmt_pool.cc               |  113 ++
 gnuradio-runtime/lib/pmt/pmt_serialize.cc          |  835 ++++++++++++
 gnuradio-runtime/lib/pmt/qa_pmt.cc                 |   40 +
 gnuradio-runtime/lib/pmt/qa_pmt.h                  |   37 +
 gnuradio-runtime/lib/pmt/qa_pmt_prims.cc           |  603 ++++++++
 gnuradio-runtime/lib/pmt/qa_pmt_prims.h            |   77 ++
 gnuradio-runtime/lib/pmt/unv_qa_template.cc.t      |   35 +
 gnuradio-runtime/lib/pmt/unv_template.cc.t         |  141 ++
 gnuradio-runtime/lib/pmt/unv_template.h.t          |   23 +
 gnuradio-runtime/lib/qa_runtime.h                  |    2 +-
 gnuradio-runtime/lib/qa_sincos.cc                  |    2 +-
 gnuradio-runtime/lib/realtime.cc                   |  178 +++
 gnuradio-runtime/lib/rpcserver_ice.cc              |    2 +-
 gnuradio-runtime/lib/sys_pri.cc                    |   63 +
 gnuradio-runtime/lib/thread/CMakeLists.txt         |   28 +
 gnuradio-runtime/lib/thread/thread.cc              |  238 ++++
 gnuradio-runtime/lib/thread/thread_body_wrapper.cc |   91 ++
 gnuradio-runtime/lib/thread/thread_group.cc        |   98 ++
 gnuradio-runtime/python/CMakeLists.txt             |    1 +
 gnuradio-runtime/python/gnuradio/gr/hier_block2.py |    6 +-
 gnuradio-runtime/python/gnuradio/gr/tag_utils.py   |    3 +-
 gnuradio-runtime/python/pmt/CMakeLists.txt         |   47 +
 gnuradio-runtime/python/pmt/__init__.py            |   31 +
 gnuradio-runtime/python/pmt/pmt_to_python.py       |   97 ++
 gnuradio-runtime/python/pmt/qa_pmt.py              |  102 ++
 gnuradio-runtime/python/pmt/qa_pmt_to_python.py    |   34 +
 gnuradio-runtime/swig/CMakeLists.txt               |   31 +-
 gnuradio-runtime/swig/gr_basic_block.i             |    1 +
 gnuradio-runtime/swig/gr_feval.i                   |    2 +-
 gnuradio-runtime/swig/gr_intrusive_ptr.i           |  102 ++
 gnuradio-runtime/swig/gr_realtime.i                |    8 +-
 gnuradio-runtime/swig/gruel_common.i               |   66 +
 gnuradio-runtime/swig/pmt_swig.i                   |  297 ++++
 gr-analog/include/analog/api.h                     |    2 +-
 gr-analog/lib/CMakeLists.txt                       |    1 -
 gr-analog/lib/fastnoise_source_X_impl.cc.t         |    6 +-
 gr-analog/lib/noise_source_X_impl.cc.t             |    6 +-
 gr-analog/lib/qa_analog.h                          |    2 +-
 gr-analog/swig/CMakeLists.txt                      |    1 -
 gr-atsc/include/atsc/api.h                         |    2 +-
 gr-atsc/lib/CMakeLists.txt                         |    1 -
 gr-atsc/swig/CMakeLists.txt                        |    1 -
 gr-audio/examples/c++/CMakeLists.txt               |    1 -
 gr-audio/include/audio/api.h                       |    2 +-
 gr-audio/lib/CMakeLists.txt                        |    1 -
 gr-audio/lib/osx/circular_buffer.h                 |   24 +-
 gr-audio/lib/osx/osx_sink.cc                       |    8 +-
 gr-audio/lib/osx/osx_sink.h                        |    4 +-
 gr-audio/lib/osx/osx_source.cc                     |    8 +-
 gr-audio/lib/osx/osx_source.h                      |    4 +-
 gr-audio/lib/portaudio/portaudio_sink.cc           |    6 +-
 gr-audio/lib/portaudio/portaudio_sink.h            |    6 +-
 gr-audio/lib/portaudio/portaudio_source.cc         |    8 +-
 gr-audio/lib/portaudio/portaudio_source.h          |    6 +-
 gr-audio/swig/CMakeLists.txt                       |    1 -
 gr-blocks/grc/blocks_message_strobe.xml            |    2 +-
 gr-blocks/grc/blocks_random_pdu.xml                |    2 +-
 gr-blocks/include/blocks/api.h                     |    2 +-
 gr-blocks/include/blocks/pdu.h                     |    2 +-
 gr-blocks/lib/CMakeLists.txt                       |    1 -
 gr-blocks/lib/annotator_raw_impl.cc                |    4 +-
 gr-blocks/lib/annotator_raw_impl.h                 |    4 +-
 gr-blocks/lib/delay_impl.cc                        |    4 +-
 gr-blocks/lib/delay_impl.h                         |    4 +-
 gr-blocks/lib/file_meta_sink_impl.cc               |    6 +-
 gr-blocks/lib/file_meta_sink_impl.h                |    4 +-
 gr-blocks/lib/file_meta_source_impl.cc             |    8 +-
 gr-blocks/lib/file_meta_source_impl.h              |    6 +-
 gr-blocks/lib/file_sink_base.cc                    |    8 +-
 gr-blocks/lib/file_source_impl.cc                  |   10 +-
 gr-blocks/lib/message_debug_impl.cc                |    4 +-
 gr-blocks/lib/message_debug_impl.h                 |    6 +-
 gr-blocks/lib/qa_blocks.h                          |    2 +-
 gr-blocks/lib/qa_rotator.cc                        |    2 +-
 gr-blocks/lib/qa_set_msg_handler.cc                |    2 +-
 gr-blocks/lib/socket_pdu_impl.cc                   |    2 +-
 gr-blocks/lib/stream_pdu_base.cc                   |    2 +-
 gr-blocks/lib/stream_pdu_base.h                    |    6 +-
 gr-blocks/lib/tag_debug_impl.cc                    |    6 +-
 gr-blocks/lib/tag_debug_impl.h                     |    4 +-
 gr-blocks/lib/tcp_connection.h                     |    2 +-
 gr-blocks/lib/udp_sink_impl.cc                     |    6 +-
 gr-blocks/lib/udp_sink_impl.h                      |    2 +-
 gr-blocks/lib/udp_source_impl.cc                   |    8 +-
 gr-blocks/lib/udp_source_impl.h                    |    8 +-
 gr-blocks/lib/vector_map_impl.cc                   |    2 +-
 gr-blocks/lib/vector_map_impl.h                    |    4 +-
 gr-blocks/lib/wavfile_sink_impl.cc                 |   12 +-
 gr-blocks/python/parse_file_metadata.py            |    7 +-
 gr-blocks/python/qa_python_message_passing.py      |    3 +-
 gr-blocks/swig/CMakeLists.txt                      |    1 -
 gr-blocks/tests/CMakeLists.txt                     |    1 -
 gr-channels/CMakeLists.txt                         |    1 -
 gr-channels/include/channels/api.h                 |    2 +-
 gr-channels/lib/CMakeLists.txt                     |    1 -
 gr-channels/swig/CMakeLists.txt                    |    1 -
 gr-comedi/include/comedi/api.h                     |    2 +-
 gr-comedi/lib/CMakeLists.txt                       |    1 -
 gr-comedi/src/CMakeLists.txt                       |    1 -
 gr-comedi/swig/CMakeLists.txt                      |    1 -
 gr-digital/include/digital/api.h                   |    2 +-
 gr-digital/lib/CMakeLists.txt                      |    1 -
 gr-digital/lib/constellation_receiver_cb_impl.h    |    2 +-
 gr-digital/lib/map_bb_impl.cc                      |    4 +-
 gr-digital/lib/map_bb_impl.h                       |    4 +-
 gr-digital/lib/mpsk_receiver_cc_impl.h             |    2 +-
 gr-digital/python/qa_crc32_bb.py                   |    3 +-
 gr-digital/python/qa_header_payload_demux.py       |    3 +-
 gr-digital/python/qa_ofdm_carrier_allocator_cvc.py |    3 +-
 gr-digital/python/qa_ofdm_chanest_vcvc.py          |    3 +-
 gr-digital/python/qa_ofdm_cyclic_prefixer.py       |    3 +-
 gr-digital/python/qa_ofdm_frame_equalizer_vcvc.py  |    3 +-
 gr-digital/python/qa_ofdm_serializer_vcc.py        |    3 +-
 gr-digital/python/qa_packet_headergenerator_bb.py  |    3 +-
 gr-digital/python/qa_packet_headerparser_b.py      |    3 +-
 gr-digital/python/utils/tagged_streams.py          |   25 +-
 gr-digital/swig/CMakeLists.txt                     |    1 -
 gr-fcd/examples/c++/CMakeLists.txt                 |    1 -
 gr-fcd/include/fcd/fcd_api.h                       |    2 +-
 gr-fcd/lib/CMakeLists.txt                          |    1 -
 gr-fcd/lib/fcd_source_c_impl.cc                    |    2 +-
 gr-fcd/swig/CMakeLists.txt                         |    1 -
 gr-fec/CMakeLists.txt                              |    1 -
 gr-fec/include/fec/api.h                           |    2 +-
 gr-fec/lib/CMakeLists.txt                          |    1 -
 gr-fec/swig/CMakeLists.txt                         |    1 -
 gr-fft/CMakeLists.txt                              |    1 -
 gr-fft/include/fft/api.h                           |    2 +-
 gr-fft/lib/CMakeLists.txt                          |    1 -
 gr-fft/swig/CMakeLists.txt                         |    1 -
 gr-filter/CMakeLists.txt                           |    1 -
 gr-filter/include/filter/api.h                     |    2 +-
 gr-filter/lib/CMakeLists.txt                       |    1 -
 gr-filter/lib/fir_filter_XXX_impl.cc.t             |    4 +-
 gr-filter/lib/pfb_arb_resampler_ccf_impl.cc        |    8 +-
 gr-filter/lib/pfb_arb_resampler_ccf_impl.h         |    4 +-
 gr-filter/lib/pfb_arb_resampler_fff_impl.cc        |    8 +-
 gr-filter/lib/pfb_arb_resampler_fff_impl.h         |    4 +-
 gr-filter/lib/pfb_channelizer_ccf_impl.cc          |    6 +-
 gr-filter/lib/pfb_channelizer_ccf_impl.h           |    4 +-
 gr-filter/lib/pfb_decimator_ccf_impl.cc            |    4 +-
 gr-filter/lib/pfb_decimator_ccf_impl.h             |    4 +-
 gr-filter/lib/pfb_interpolator_ccf_impl.cc         |    2 +-
 gr-filter/lib/pfb_interpolator_ccf_impl.h          |    4 +-
 gr-filter/lib/pfb_synthesizer_ccf_impl.cc          |    6 +-
 gr-filter/lib/pfb_synthesizer_ccf_impl.h           |    4 +-
 gr-filter/lib/qa_filter.h                          |    2 +-
 gr-filter/swig/CMakeLists.txt                      |    1 -
 gr-noaa/include/noaa/api.h                         |    2 +-
 gr-noaa/lib/CMakeLists.txt                         |    1 -
 gr-noaa/swig/CMakeLists.txt                        |    1 -
 gr-pager/include/pager/api.h                       |    2 +-
 gr-pager/lib/CMakeLists.txt                        |    1 -
 gr-pager/swig/CMakeLists.txt                       |    1 -
 gr-qtgui/CMakeLists.txt                            |    1 -
 gr-qtgui/include/qtgui/SpectrumGUIClass.h          |   12 +-
 gr-qtgui/include/qtgui/TimeRasterDisplayPlot.h     |    2 +-
 gr-qtgui/include/qtgui/WaterfallDisplayPlot.h      |    8 +-
 gr-qtgui/include/qtgui/api.h                       |    2 +-
 gr-qtgui/include/qtgui/qtgui_types.h               |   10 +-
 gr-qtgui/include/qtgui/spectrumUpdateEvents.h      |   20 +-
 gr-qtgui/lib/CMakeLists.txt                        |    1 -
 gr-qtgui/lib/SpectrumGUIClass.cc                   |   66 +-
 gr-qtgui/lib/WaterfallDisplayPlot.cc               |    8 +-
 gr-qtgui/lib/const_sink_c_impl.cc                  |    8 +-
 gr-qtgui/lib/const_sink_c_impl.h                   |   10 +-
 gr-qtgui/lib/freq_sink_c_impl.cc                   |    8 +-
 gr-qtgui/lib/freq_sink_c_impl.h                    |   10 +-
 gr-qtgui/lib/freq_sink_f_impl.cc                   |   10 +-
 gr-qtgui/lib/freq_sink_f_impl.h                    |   10 +-
 gr-qtgui/lib/sink_c_impl.cc                        |   10 +-
 gr-qtgui/lib/sink_c_impl.h                         |    6 +-
 gr-qtgui/lib/sink_f_impl.cc                        |    2 +-
 gr-qtgui/lib/sink_f_impl.h                         |    2 +-
 gr-qtgui/lib/spectrumUpdateEvents.cc               |   12 +-
 gr-qtgui/lib/spectrumdisplayform.cc                |    4 +-
 gr-qtgui/lib/time_raster_sink_b_impl.cc            |    6 +-
 gr-qtgui/lib/time_raster_sink_b_impl.h             |    8 +-
 gr-qtgui/lib/time_raster_sink_c_impl.cc            |    6 +-
 gr-qtgui/lib/time_raster_sink_c_impl.h             |    8 +-
 gr-qtgui/lib/time_raster_sink_f_impl.cc            |    6 +-
 gr-qtgui/lib/time_raster_sink_f_impl.h             |    8 +-
 gr-qtgui/lib/time_sink_c_impl.cc                   |   10 +-
 gr-qtgui/lib/time_sink_c_impl.h                    |   10 +-
 gr-qtgui/lib/time_sink_f_impl.cc                   |   10 +-
 gr-qtgui/lib/time_sink_f_impl.h                    |   10 +-
 gr-qtgui/lib/waterfall_sink_c_impl.cc              |    6 +-
 gr-qtgui/lib/waterfall_sink_c_impl.h               |    8 +-
 gr-qtgui/lib/waterfall_sink_f_impl.cc              |    6 +-
 gr-qtgui/lib/waterfall_sink_f_impl.h               |    8 +-
 gr-qtgui/lib/waterfalldisplayform.cc               |    2 +-
 gr-qtgui/swig/CMakeLists.txt                       |    1 -
 gr-shd/lib/CMakeLists.txt                          |    1 -
 gr-shd/swig/CMakeLists.txt                         |    1 -
 gr-trellis/include/trellis/api.h                   |    2 +-
 gr-trellis/lib/CMakeLists.txt                      |    1 -
 gr-trellis/src/lib/CMakeLists.txt                  |    1 -
 gr-trellis/swig/CMakeLists.txt                     |    1 -
 gr-uhd/examples/c++/CMakeLists.txt                 |    1 -
 gr-uhd/lib/CMakeLists.txt                          |    1 -
 gr-uhd/lib/amsg_source_impl.cc                     |    2 +-
 gr-uhd/lib/amsg_source_impl.h                      |    4 +-
 gr-uhd/swig/CMakeLists.txt                         |    1 -
 gr-utils/python/gr_read_file_metadata              |    2 +-
 gr-utils/python/modtool/gr-newmod/CMakeLists.txt   |    4 -
 .../python/modtool/gr-newmod/include/howto/api.h   |    2 +-
 gr-utils/python/modtool/gr-newmod/lib/qa_howto.h   |    2 +-
 .../python/modtool/gr-newmod/swig/CMakeLists.txt   |    4 -
 gr-video-sdl/include/video_sdl/api.h               |    2 +-
 gr-video-sdl/lib/CMakeLists.txt                    |    1 -
 gr-video-sdl/src/CMakeLists.txt                    |    1 -
 gr-video-sdl/swig/CMakeLists.txt                   |    1 -
 gr-vocoder/include/vocoder/api.h                   |    2 +-
 gr-vocoder/lib/CMakeLists.txt                      |    1 -
 gr-vocoder/swig/CMakeLists.txt                     |    1 -
 gr-wavelet/include/wavelet/api.h                   |    2 +-
 gr-wavelet/lib/CMakeLists.txt                      |    1 -
 gr-wavelet/swig/CMakeLists.txt                     |    1 -
 gr-wxgui/include/wxgui/api.h                       |    2 +-
 gr-wxgui/lib/CMakeLists.txt                        |    1 -
 gr-wxgui/lib/histo_sink_f_impl.cc                  |    6 +-
 gr-wxgui/lib/histo_sink_f_impl.h                   |    2 +-
 gr-wxgui/swig/CMakeLists.txt                       |    1 -
 gruel/CMakeLists.txt                               |    1 -
 gruel/src/include/gruel/api.h                      |    2 +-
 gruel/src/include/gruel/attributes.h               |   74 -
 gruel/src/include/gruel/high_res_timer.h           |  124 --
 gruel/src/include/gruel/msg_accepter.h             |   53 -
 gruel/src/include/gruel/msg_accepter_msgq.h        |   50 -
 gruel/src/include/gruel/msg_passing.h              |  116 --
 gruel/src/include/gruel/msg_producer.h             |   51 -
 gruel/src/include/gruel/msg_queue.h                |   91 --
 gruel/src/include/gruel/pmt.h                      |  884 ------------
 gruel/src/include/gruel/pmt_pool.h                 |   73 -
 gruel/src/include/gruel/pmt_sugar.h                |  171 ---
 gruel/src/include/gruel/realtime.h                 |   96 --
 gruel/src/include/gruel/sys_pri.h                  |   42 -
 gruel/src/include/gruel/thread.h                   |  139 --
 gruel/src/include/gruel/thread_body_wrapper.h      |   69 -
 gruel/src/include/gruel/thread_group.h             |   45 -
 gruel/src/lib/CMakeLists.txt                       |    2 -
 gruel/src/lib/msg/CMakeLists.txt                   |   29 -
 gruel/src/lib/msg/msg_accepter.cc                  |   36 -
 gruel/src/lib/msg/msg_accepter_msgq.cc             |   48 -
 gruel/src/lib/msg/msg_producer.cc                  |   36 -
 gruel/src/lib/msg/msg_queue.cc                     |  103 --
 gruel/src/lib/pmt/CMakeLists.txt                   |   89 --
 gruel/src/lib/pmt/gen-serial-tags.py               |   53 -
 gruel/src/lib/pmt/generate_unv.py                  |  190 ---
 gruel/src/lib/pmt/pmt-serial-tags.scm              |   77 --
 gruel/src/lib/pmt/pmt.cc                           | 1435 -------------------
 gruel/src/lib/pmt/pmt_int.h                        |  247 ----
 gruel/src/lib/pmt/pmt_io.cc                        |  168 ---
 gruel/src/lib/pmt/pmt_pool.cc                      |  112 --
 gruel/src/lib/pmt/pmt_serialize.cc                 |  834 ------------
 gruel/src/lib/pmt/qa_pmt.cc                        |   40 -
 gruel/src/lib/pmt/qa_pmt.h                         |   37 -
 gruel/src/lib/pmt/qa_pmt_prims.cc                  |  601 --------
 gruel/src/lib/pmt/qa_pmt_prims.h                   |   77 --
 gruel/src/lib/pmt/unv_qa_template.cc.t             |   35 -
 gruel/src/lib/pmt/unv_template.cc.t                |  141 --
 gruel/src/lib/pmt/unv_template.h.t                 |   23 -
 gruel/src/lib/realtime.cc                          |  178 ---
 gruel/src/lib/sys_pri.cc                           |   61 -
 gruel/src/lib/thread.cc                            |  226 ---
 gruel/src/lib/thread_body_wrapper.cc               |   85 --
 gruel/src/lib/thread_group.cc                      |   99 --
 gruel/src/python/CMakeLists.txt                    |   53 -
 gruel/src/python/__init__.py                       |   29 -
 gruel/src/python/pmt/__init__.py                   |   31 -
 gruel/src/python/pmt/pmt_to_python.py              |   97 --
 gruel/src/python/qa_pmt.py                         |  102 --
 gruel/src/python/qa_pmt_to_python.py               |   34 -
 gruel/src/swig/gr_intrusive_ptr.i                  |  102 --
 gruel/src/swig/gruel_common.i                      |   66 -
 gruel/src/swig/pmt_swig.i                          |  295 ----
 347 files changed, 8673 insertions(+), 8511 deletions(-)
 create mode 100644 gnuradio-runtime/include/attributes.h
 create mode 100644 gnuradio-runtime/include/high_res_timer.h
 create mode 100644 gnuradio-runtime/include/messages/CMakeLists.txt
 create mode 100644 gnuradio-runtime/include/messages/msg_accepter.h
 create mode 100644 gnuradio-runtime/include/messages/msg_accepter_msgq.h
 create mode 100644 gnuradio-runtime/include/messages/msg_passing.h
 create mode 100644 gnuradio-runtime/include/messages/msg_producer.h
 create mode 100644 gnuradio-runtime/include/messages/msg_queue.h
 create mode 100644 gnuradio-runtime/include/pmt/CMakeLists.txt
 create mode 100644 gnuradio-runtime/include/pmt/api.h
 create mode 100644 gnuradio-runtime/include/pmt/pmt.h
 create mode 100644 gnuradio-runtime/include/pmt/pmt_pool.h
 create mode 100644 gnuradio-runtime/include/pmt/pmt_sugar.h
 create mode 100644 gnuradio-runtime/include/realtime.h
 create mode 100644 gnuradio-runtime/include/sys_pri.h
 create mode 100644 gnuradio-runtime/include/thread/CMakeLists.txt
 create mode 100644 gnuradio-runtime/include/thread/thread.h
 create mode 100644 gnuradio-runtime/include/thread/thread_body_wrapper.h
 create mode 100644 gnuradio-runtime/include/thread/thread_group.h
 create mode 100644 gnuradio-runtime/lib/messages/CMakeLists.txt
 create mode 100644 gnuradio-runtime/lib/messages/msg_accepter.cc
 create mode 100644 gnuradio-runtime/lib/messages/msg_accepter_msgq.cc
 create mode 100644 gnuradio-runtime/lib/messages/msg_producer.cc
 create mode 100644 gnuradio-runtime/lib/messages/msg_queue.cc
 create mode 100644 gnuradio-runtime/lib/pmt/CMakeLists.txt
 create mode 100644 gnuradio-runtime/lib/pmt/gen-serial-tags.py
 create mode 100755 gnuradio-runtime/lib/pmt/generate_unv.py
 create mode 100644 gnuradio-runtime/lib/pmt/pmt-serial-tags.scm
 create mode 100644 gnuradio-runtime/lib/pmt/pmt.cc
 create mode 100644 gnuradio-runtime/lib/pmt/pmt_int.h
 create mode 100644 gnuradio-runtime/lib/pmt/pmt_io.cc
 create mode 100644 gnuradio-runtime/lib/pmt/pmt_pool.cc
 create mode 100644 gnuradio-runtime/lib/pmt/pmt_serialize.cc
 create mode 100644 gnuradio-runtime/lib/pmt/qa_pmt.cc
 create mode 100644 gnuradio-runtime/lib/pmt/qa_pmt.h
 create mode 100644 gnuradio-runtime/lib/pmt/qa_pmt_prims.cc
 create mode 100644 gnuradio-runtime/lib/pmt/qa_pmt_prims.h
 create mode 100644 gnuradio-runtime/lib/pmt/unv_qa_template.cc.t
 create mode 100644 gnuradio-runtime/lib/pmt/unv_template.cc.t
 create mode 100644 gnuradio-runtime/lib/pmt/unv_template.h.t
 create mode 100644 gnuradio-runtime/lib/realtime.cc
 create mode 100644 gnuradio-runtime/lib/sys_pri.cc
 create mode 100644 gnuradio-runtime/lib/thread/CMakeLists.txt
 create mode 100644 gnuradio-runtime/lib/thread/thread.cc
 create mode 100644 gnuradio-runtime/lib/thread/thread_body_wrapper.cc
 create mode 100644 gnuradio-runtime/lib/thread/thread_group.cc
 create mode 100644 gnuradio-runtime/python/pmt/CMakeLists.txt
 create mode 100644 gnuradio-runtime/python/pmt/__init__.py
 create mode 100644 gnuradio-runtime/python/pmt/pmt_to_python.py
 create mode 100755 gnuradio-runtime/python/pmt/qa_pmt.py
 create mode 100755 gnuradio-runtime/python/pmt/qa_pmt_to_python.py
 create mode 100644 gnuradio-runtime/swig/gr_intrusive_ptr.i
 create mode 100644 gnuradio-runtime/swig/gruel_common.i
 create mode 100644 gnuradio-runtime/swig/pmt_swig.i
 delete mode 100644 gruel/src/include/gruel/attributes.h
 delete mode 100644 gruel/src/include/gruel/high_res_timer.h
 delete mode 100644 gruel/src/include/gruel/msg_accepter.h
 delete mode 100644 gruel/src/include/gruel/msg_accepter_msgq.h
 delete mode 100644 gruel/src/include/gruel/msg_passing.h
 delete mode 100644 gruel/src/include/gruel/msg_producer.h
 delete mode 100644 gruel/src/include/gruel/msg_queue.h
 delete mode 100644 gruel/src/include/gruel/pmt.h
 delete mode 100644 gruel/src/include/gruel/pmt_pool.h
 delete mode 100644 gruel/src/include/gruel/pmt_sugar.h
 delete mode 100644 gruel/src/include/gruel/realtime.h
 delete mode 100644 gruel/src/include/gruel/sys_pri.h
 delete mode 100644 gruel/src/include/gruel/thread.h
 delete mode 100644 gruel/src/include/gruel/thread_body_wrapper.h
 delete mode 100644 gruel/src/include/gruel/thread_group.h
 delete mode 100644 gruel/src/lib/msg/CMakeLists.txt
 delete mode 100644 gruel/src/lib/msg/msg_accepter.cc
 delete mode 100644 gruel/src/lib/msg/msg_accepter_msgq.cc
 delete mode 100644 gruel/src/lib/msg/msg_producer.cc
 delete mode 100644 gruel/src/lib/msg/msg_queue.cc
 delete mode 100644 gruel/src/lib/pmt/CMakeLists.txt
 delete mode 100644 gruel/src/lib/pmt/gen-serial-tags.py
 delete mode 100755 gruel/src/lib/pmt/generate_unv.py
 delete mode 100644 gruel/src/lib/pmt/pmt-serial-tags.scm
 delete mode 100644 gruel/src/lib/pmt/pmt.cc
 delete mode 100644 gruel/src/lib/pmt/pmt_int.h
 delete mode 100644 gruel/src/lib/pmt/pmt_io.cc
 delete mode 100644 gruel/src/lib/pmt/pmt_pool.cc
 delete mode 100644 gruel/src/lib/pmt/pmt_serialize.cc
 delete mode 100644 gruel/src/lib/pmt/qa_pmt.cc
 delete mode 100644 gruel/src/lib/pmt/qa_pmt.h
 delete mode 100644 gruel/src/lib/pmt/qa_pmt_prims.cc
 delete mode 100644 gruel/src/lib/pmt/qa_pmt_prims.h
 delete mode 100644 gruel/src/lib/pmt/unv_qa_template.cc.t
 delete mode 100644 gruel/src/lib/pmt/unv_template.cc.t
 delete mode 100644 gruel/src/lib/pmt/unv_template.h.t
 delete mode 100644 gruel/src/lib/realtime.cc
 delete mode 100644 gruel/src/lib/sys_pri.cc
 delete mode 100644 gruel/src/lib/thread.cc
 delete mode 100644 gruel/src/lib/thread_body_wrapper.cc
 delete mode 100644 gruel/src/lib/thread_group.cc
 delete mode 100644 gruel/src/python/CMakeLists.txt
 delete mode 100644 gruel/src/python/__init__.py
 delete mode 100644 gruel/src/python/pmt/__init__.py
 delete mode 100644 gruel/src/python/pmt/pmt_to_python.py
 delete mode 100755 gruel/src/python/qa_pmt.py
 delete mode 100755 gruel/src/python/qa_pmt_to_python.py
 delete mode 100644 gruel/src/swig/gr_intrusive_ptr.i
 delete mode 100644 gruel/src/swig/gruel_common.i
 delete mode 100644 gruel/src/swig/pmt_swig.i

(limited to 'docs/doxygen/Doxyfile.in')

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3776a3e9a5..aa55418b1b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -256,10 +256,8 @@ install(
 ########################################################################
 # The following dependency libraries are needed by all gr modules:
 ########################################################################
-list(APPEND GR_TEST_TARGET_DEPS volk gruel gnuradio-runtime)
+list(APPEND GR_TEST_TARGET_DEPS volk gnuradio-runtime)
 list(APPEND GR_TEST_PYTHON_DIRS
-    ${CMAKE_SOURCE_DIR}/gruel/src/python
-    ${CMAKE_BINARY_DIR}/gruel/src/swig
     ${CMAKE_BINARY_DIR}/gnuradio-runtime/python
     ${CMAKE_SOURCE_DIR}/gnuradio-runtime/python
     ${CMAKE_BINARY_DIR}/gnuradio-runtime/swig
@@ -275,7 +273,6 @@ list(APPEND GR_TEST_PYTHON_DIRS
 # Add subdirectories (in order of deps)
 ########################################################################
 add_subdirectory(docs)
-add_subdirectory(gruel)
 add_subdirectory(gnuradio-runtime)
 add_subdirectory(gr-blocks)
 add_subdirectory(grc)
diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in
index ccd647134b..afb194d1fb 100644
--- a/docs/doxygen/Doxyfile.in
+++ b/docs/doxygen/Doxyfile.in
@@ -1254,7 +1254,7 @@ SEARCH_INCLUDES        = YES
 # contain include files that are not input files but should be processed by
 # the preprocessor.
 
-INCLUDE_PATH           = @abs_top_builddir@/gruel/src/lib/pmt/
+INCLUDE_PATH           = @abs_top_builddir@/gnuradio-runtime/lib/pmt/
 
 # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
 # patterns (like *.h and *.hpp) to filter out the header-files in the
diff --git a/docs/doxygen/other/metadata.dox b/docs/doxygen/other/metadata.dox
index 76553c696a..03ebe591e4 100644
--- a/docs/doxygen/other/metadata.dox
+++ b/docs/doxygen/other/metadata.dox
@@ -309,7 +309,7 @@ into the metadata to keep track of later. The date in this case is
 encoded as a vector of uint16 with [day, month, year].
 
 \code
-  from gruel import pmt
+  import pmt
   from gnuradio import blocks
 
   key = pmt.intern("date")
diff --git a/docs/doxygen/other/pmt.dox b/docs/doxygen/other/pmt.dox
index ba97863a08..04f58aafc8 100644
--- a/docs/doxygen/other/pmt.dox
+++ b/docs/doxygen/other/pmt.dox
@@ -173,7 +173,7 @@ reference to the old dictionary. This just keeps our number of
 variables small.
 
 \code
-from gruel import pmt
+import pmt
 
 key0 = pmt.intern("int")
 val0 = pmt.from_long(123)
@@ -303,7 +303,7 @@ ready to be written to a file and then deserialize it back to its
 original PMT.
 
 \code
-from gruel import pmt
+import pmt
 
 key0 = pmt.intern("int")
 val0 = pmt.from_long(123)
diff --git a/docs/doxygen/other/thread_affinity.dox b/docs/doxygen/other/thread_affinity.dox
index 235266febd..2f31d9ce53 100644
--- a/docs/doxygen/other/thread_affinity.dox
+++ b/docs/doxygen/other/thread_affinity.dox
@@ -6,8 +6,8 @@ In the thread-per-block scheduler, you can set the block's core
 affinity. Each block can be pinned to a group cores or be set back
 to use the standard kernel scheduler.
 
-The implementation is done by adding new functions to the GRUEL
-library:
+The implementation is done by adding new functions to the threading
+section of the gnuradio-runtime library:
 
 \code
   gr_thread_t get_current_thread_id();
@@ -21,7 +21,7 @@ library:
 
 The ability to set a thread's affinity to a core or groups of cores is
 not implemented in the Boost thread library, and so we have made our
-own portability library. In particular, the gruel::gr_thread_t type is
+own portability library. In particular, the gr::thread::gr_thread_t type is
 defined as the thread type for the given system. The other functions
 are designed to be portable as well by calling the specific
 implementation for the thread affinity for a particular platform.
@@ -43,7 +43,7 @@ Each block has two new data members:
 
 - threaded: a boolean value that is true if the block is attached to a
   thread.
-- thread: a gruel::gr_thread_t handle to the block's thread.
+- thread: a gr::thread::gr_thread_t handle to the block's thread.
 
 A block can set and unset it's affinity at any time using the
 following member functions:
diff --git a/gnuradio-runtime/CMakeLists.txt b/gnuradio-runtime/CMakeLists.txt
index 96b844b193..e659ce94fc 100644
--- a/gnuradio-runtime/CMakeLists.txt
+++ b/gnuradio-runtime/CMakeLists.txt
@@ -34,7 +34,6 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/ConfigChecks.cmake)
 include(GrComponent)
 GR_REGISTER_COMPONENT("gnuradio-runtime" ENABLE_GNURADIO_RUNTIME
     Boost_FOUND
-    ENABLE_GRUEL
     ENABLE_VOLK
     PYTHONINTERP_FOUND
 )
@@ -78,7 +77,6 @@ GR_REGISTER_COMPONENT("gr-ctrlport" ENABLE_GR_CTRLPORT
     SWIG_FOUND
     SWIG_VERSION_CHECK
     ICE_FOUND
-    ENABLE_GRUEL
     ENABLE_GNURADIO_RUNTIME
 )
 
diff --git a/gnuradio-runtime/apps/CMakeLists.txt b/gnuradio-runtime/apps/CMakeLists.txt
index 9efd3f2b69..3dea7268ff 100644
--- a/gnuradio-runtime/apps/CMakeLists.txt
+++ b/gnuradio-runtime/apps/CMakeLists.txt
@@ -22,7 +22,6 @@
 ########################################################################
 include_directories(
   ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-  ${GRUEL_INCLUDE_DIRS}
   ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gnuradio-runtime/include/CMakeLists.txt b/gnuradio-runtime/include/CMakeLists.txt
index 77b284705a..832522f92c 100644
--- a/gnuradio-runtime/include/CMakeLists.txt
+++ b/gnuradio-runtime/include/CMakeLists.txt
@@ -17,6 +17,10 @@
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
 
+add_subdirectory(messages)
+add_subdirectory(pmt)
+add_subdirectory(thread)
+
 ########################################################################
 # Install header files
 ########################################################################
@@ -87,6 +91,10 @@ install(FILES
   rpcserver_ice.h
   rpcserver_selector.h
   runtime_block_gateway.h
+  attributes.h
+  high_res_timer.h
+  realtime.h
+  sys_pri.h
   DESTINATION ${GR_INCLUDE_DIR}/gnuradio
   COMPONENT "runtime_devel"
 )
diff --git a/gnuradio-runtime/include/attributes.h b/gnuradio-runtime/include/attributes.h
new file mode 100644
index 0000000000..5baa52e7d3
--- /dev/null
+++ b/gnuradio-runtime/include/attributes.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2010 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_GNURADIO_ATTRIBUTES_H
+#define INCLUDED_GNURADIO_ATTRIBUTES_H
+
+////////////////////////////////////////////////////////////////////////
+// Cross-platform attribute macros
+////////////////////////////////////////////////////////////////////////
+#if defined __GNUC__
+#  define __GR_ATTR_ALIGNED(x) __attribute__((aligned(x)))
+#  define __GR_ATTR_UNUSED     __attribute__((unused))
+#  define __GR_ATTR_INLINE     __attribute__((always_inline))
+#  define __GR_ATTR_DEPRECATED __attribute__((deprecated))
+#  if __GNUC__ >= 4
+#    define __GR_ATTR_EXPORT   __attribute__((visibility("default")))
+#    define __GR_ATTR_IMPORT   __attribute__((visibility("default")))
+#  else
+#    define __GR_ATTR_EXPORT
+#    define __GR_ATTR_IMPORT
+#  endif
+#elif _MSC_VER
+#  define __GR_ATTR_ALIGNED(x) __declspec(align(x))
+#  define __GR_ATTR_UNUSED
+#  define __GR_ATTR_INLINE     __forceinline
+#  define __GR_ATTR_DEPRECATED __declspec(deprecated)
+#  define __GR_ATTR_EXPORT     __declspec(dllexport)
+#  define __GR_ATTR_IMPORT     __declspec(dllimport)
+#else
+#  define __GR_ATTR_ALIGNED(x)
+#  define __GR_ATTR_UNUSED
+#  define __GR_ATTR_INLINE
+#  define __GR_ATTR_DEPRECATED
+#  define __GR_ATTR_EXPORT
+#  define __GR_ATTR_IMPORT
+#endif
+
+////////////////////////////////////////////////////////////////////////
+// define inline when building C
+////////////////////////////////////////////////////////////////////////
+#if defined(_MSC_VER) && !defined(__cplusplus) && !defined(inline)
+#  define inline __inline
+#endif
+
+////////////////////////////////////////////////////////////////////////
+// suppress warnings
+////////////////////////////////////////////////////////////////////////
+#ifdef _MSC_VER
+#  pragma warning(disable: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B'
+#  pragma warning(disable: 4275) // non dll-interface class ... used as base for dll-interface class ...
+#  pragma warning(disable: 4244) // conversion from 'double' to 'float', possible loss of data
+#  pragma warning(disable: 4305) // 'initializing' : truncation from 'double' to 'float'
+#  pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
+#endif
+
+#endif /* INCLUDED_GNURADIO_ATTRIBUTES_H */
diff --git a/gnuradio-runtime/include/gr_basic_block.h b/gnuradio-runtime/include/gr_basic_block.h
index 1fa8bb9d7a..beb54dbb6b 100644
--- a/gnuradio-runtime/include/gr_basic_block.h
+++ b/gnuradio-runtime/include/gr_basic_block.h
@@ -33,7 +33,7 @@
 #include <deque>
 #include <map>
 #include <gr_io_signature.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 #include <boost/foreach.hpp>
 #include <boost/thread/condition_variable.hpp>
 #include <iostream>
@@ -68,7 +68,7 @@ class GR_RUNTIME_API gr_basic_block : public gr_msg_accepter, public boost::enab
   typedef std::map<pmt::pmt_t, msg_queue_t, pmt::comperator>::iterator msg_queue_map_itr;
   std::map<pmt::pmt_t, boost::shared_ptr<boost::condition_variable>, pmt::comperator> msg_queue_ready;
   
-  gruel::mutex          mutex;          //< protects all vars
+  gr::thread::mutex          mutex;          //< protects all vars
   
  protected:
   friend class gr_flowgraph;
diff --git a/gnuradio-runtime/include/gr_block.h b/gnuradio-runtime/include/gr_block.h
index a25bb4a528..77ca3f3f72 100644
--- a/gnuradio-runtime/include/gr_block.h
+++ b/gnuradio-runtime/include/gr_block.h
@@ -668,9 +668,9 @@ class GR_RUNTIME_API gr_block : public gr_basic_block {
   /*! Used by block's setters and work functions to make
    * setting/resetting of parameters thread-safe.
    *
-   * Used by calling gruel::scoped_lock l(d_setlock);
+   * Used by calling gr::thread::scoped_lock l(d_setlock);
    */ 
-  gruel::mutex d_setlock;
+  gr::thread::mutex d_setlock;
 
   /*! Used by blocks to access the logger system.
    */ 
diff --git a/gnuradio-runtime/include/gr_block_detail.h b/gnuradio-runtime/include/gr_block_detail.h
index d24148f951..14886c0a74 100644
--- a/gnuradio-runtime/include/gr_block_detail.h
+++ b/gnuradio-runtime/include/gr_block_detail.h
@@ -27,7 +27,7 @@
 #include <gr_runtime_types.h>
 #include <gr_tpb_detail.h>
 #include <gr_tags.h>
-#include <gruel/high_res_timer.h>
+#include <high_res_timer.h>
 #include <stdexcept>
 
 /*!
@@ -169,7 +169,7 @@ class GR_RUNTIME_API gr_block_detail {
   void unset_processor_affinity();
 
   bool                               threaded;  // set if thread is currently running.
-  gruel::gr_thread_t                 thread;    // portable thread handle
+  gr::thread::gr_thread_t            thread;    // portable thread handle
 
   void start_perf_counters();
   void stop_perf_counters(int noutput_items, int nproduced);
@@ -225,7 +225,7 @@ class GR_RUNTIME_API gr_block_detail {
   std::vector<float> d_ins_output_buffers_full;
   std::vector<float> d_avg_output_buffers_full;
   std::vector<float> d_var_output_buffers_full;
-  gruel::high_res_timer_type d_start_of_work, d_end_of_work;
+  gr::high_res_timer_type d_start_of_work, d_end_of_work;
   float d_ins_work_time;
   float d_avg_work_time;
   float d_var_work_time;
diff --git a/gnuradio-runtime/include/gr_buffer.h b/gnuradio-runtime/include/gr_buffer.h
index 1a10ba6d8d..810879b7ea 100644
--- a/gnuradio-runtime/include/gr_buffer.h
+++ b/gnuradio-runtime/include/gr_buffer.h
@@ -26,7 +26,7 @@
 #include <gr_runtime_api.h>
 #include <gr_runtime_types.h>
 #include <boost/weak_ptr.hpp>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 #include <gr_tags.h>
 #include <deque>
 
@@ -89,7 +89,7 @@ class GR_RUNTIME_API gr_buffer {
   size_t nreaders() const { return d_readers.size(); }
   gr_buffer_reader* reader(size_t index) { return d_readers[index]; }
 
-  gruel::mutex *mutex() { return &d_mutex; }
+  gr::thread::mutex *mutex() { return &d_mutex; }
 
   uint64_t nitems_written() { return d_abs_write_offset; }
 
@@ -142,7 +142,7 @@ class GR_RUNTIME_API gr_buffer {
   // The mutex protects d_write_index, d_abs_write_offset, d_done, d_item_tags
   // and the d_read_index's and d_abs_read_offset's in the buffer readers.
   //
-  gruel::mutex				d_mutex;
+  gr::thread::mutex				d_mutex;
   unsigned int				d_write_index;	// in items [0,d_bufsize)
   uint64_t                              d_abs_write_offset; // num items written since the start
   bool					d_done;
@@ -254,7 +254,7 @@ class GR_RUNTIME_API gr_buffer_reader {
   void set_done (bool done)   { d_buffer->set_done (done); }
   bool done () const { return d_buffer->done (); }
 
-  gruel::mutex *mutex() { return d_buffer->mutex(); }
+  gr::thread::mutex *mutex() { return d_buffer->mutex(); }
 
 
   uint64_t nitems_read() { return d_abs_read_offset; }
diff --git a/gnuradio-runtime/include/gr_feval.h b/gnuradio-runtime/include/gr_feval.h
index af11ca2a2a..07df592e58 100644
--- a/gnuradio-runtime/include/gr_feval.h
+++ b/gnuradio-runtime/include/gr_feval.h
@@ -24,7 +24,7 @@
 
 #include <gr_runtime_api.h>
 #include <gr_complex.h>
-#include <gruel/pmt.h>
+#include <pmt/pmt.h>
 
 /*!
  * \brief base class for evaluating a function: double -> double
diff --git a/gnuradio-runtime/include/gr_msg_accepter.h b/gnuradio-runtime/include/gr_msg_accepter.h
index 8db28bb747..e7feac4686 100644
--- a/gnuradio-runtime/include/gr_msg_accepter.h
+++ b/gnuradio-runtime/include/gr_msg_accepter.h
@@ -23,14 +23,14 @@
 #define INCLUDED_GR_MSG_ACCEPTER_H
 
 #include <gr_runtime_api.h>
-#include <gruel/msg_accepter.h>
-#include <gruel/pmt.h>
+#include <messages/msg_accepter.h>
+#include <pmt/pmt.h>
 
 /*!
  * \brief Accepts messages and inserts them into a message queue, then notifies
  * subclass gr_basic_block there is a message pending.
  */
-class GR_RUNTIME_API gr_msg_accepter : public gruel::msg_accepter
+class GR_RUNTIME_API gr_msg_accepter : public gr::messages::msg_accepter
 {
 public:
   gr_msg_accepter();
diff --git a/gnuradio-runtime/include/gr_msg_queue.h b/gnuradio-runtime/include/gr_msg_queue.h
index 127186ec51..ac85729c81 100644
--- a/gnuradio-runtime/include/gr_msg_queue.h
+++ b/gnuradio-runtime/include/gr_msg_queue.h
@@ -24,7 +24,7 @@
 
 #include <gr_runtime_api.h>
 #include <gr_msg_handler.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 
 class gr_msg_queue;
 typedef boost::shared_ptr<gr_msg_queue> gr_msg_queue_sptr;
@@ -37,9 +37,9 @@ GR_RUNTIME_API gr_msg_queue_sptr gr_make_msg_queue(unsigned int limit=0);
  */
 class GR_RUNTIME_API gr_msg_queue : public gr_msg_handler {
 
-  gruel::mutex		    d_mutex;
-  gruel::condition_variable d_not_empty;
-  gruel::condition_variable d_not_full;
+  gr::thread::mutex		    d_mutex;
+  gr::thread::condition_variable d_not_empty;
+  gr::thread::condition_variable d_not_full;
   gr_message_sptr	    d_head;
   gr_message_sptr	    d_tail;
   unsigned int		    d_count;    // # of messages in queue.
diff --git a/gnuradio-runtime/include/gr_prefs.h b/gnuradio-runtime/include/gr_prefs.h
index 7ca0991ca8..0f82c46fae 100644
--- a/gnuradio-runtime/include/gr_prefs.h
+++ b/gnuradio-runtime/include/gr_prefs.h
@@ -26,7 +26,7 @@
 #include <gr_runtime_api.h>
 #include <string>
 #include <map>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 
 typedef std::map< std::string, std::map<std::string, std::string> > gr_config_map_t;
 typedef std::map< std::string, std::map<std::string, std::string> >::iterator gr_config_map_itr;
@@ -135,7 +135,7 @@ public:
   virtual char * option_to_env(std::string section, std::string option);
 
  private:
-  gruel::mutex d_mutex;
+  gr::thread::mutex d_mutex;
   gr_config_map_t d_config_map;
 };
 
diff --git a/gnuradio-runtime/include/gr_py_feval.h b/gnuradio-runtime/include/gr_py_feval.h
index cf7c7bfbe5..f2f6c801a8 100644
--- a/gnuradio-runtime/include/gr_py_feval.h
+++ b/gnuradio-runtime/include/gr_py_feval.h
@@ -1,4 +1,4 @@
-#include <gruel/pmt.h>
+#include <pmt/pmt.h>
 
 class gr_py_feval_dd : public gr_feval_dd
 {
diff --git a/gnuradio-runtime/include/gr_realtime.h b/gnuradio-runtime/include/gr_realtime.h
index fcdb5222cc..a1e5af69c4 100644
--- a/gnuradio-runtime/include/gr_realtime.h
+++ b/gnuradio-runtime/include/gr_realtime.h
@@ -24,9 +24,9 @@
 #define INCLUDED_GR_REALTIME_H
 
 #include <gr_runtime_api.h>
-#include <gruel/realtime.h>
+#include <realtime.h>
 
-typedef gruel::rt_status_t gr_rt_status_t;
+typedef gr::rt_status_t gr_rt_status_t;
 
 /*!
  * \brief If possible, enable high-priority "real time" scheduling.
diff --git a/gnuradio-runtime/include/gr_runtime_api.h b/gnuradio-runtime/include/gr_runtime_api.h
index 32c53bd723..f4e1a4ea5b 100644
--- a/gnuradio-runtime/include/gr_runtime_api.h
+++ b/gnuradio-runtime/include/gr_runtime_api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_GR_RUNTIME_API_H
 #define INCLUDED_GR_RUNTIME_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_core_EXPORTS
 #  define GR_RUNTIME_API __GR_ATTR_EXPORT
diff --git a/gnuradio-runtime/include/gr_tags.h b/gnuradio-runtime/include/gr_tags.h
index 278a5a53ae..668b2bf248 100644
--- a/gnuradio-runtime/include/gr_tags.h
+++ b/gnuradio-runtime/include/gr_tags.h
@@ -23,7 +23,7 @@
 #define INCLUDED_GR_TAGS_H
 
 #include <gr_runtime_api.h>
-#include <gruel/pmt.h>
+#include <pmt/pmt.h>
 
 struct GR_RUNTIME_API gr_tag_t{
 
diff --git a/gnuradio-runtime/include/gr_tpb_detail.h b/gnuradio-runtime/include/gr_tpb_detail.h
index 398e18cdc8..f6f20917c9 100644
--- a/gnuradio-runtime/include/gr_tpb_detail.h
+++ b/gnuradio-runtime/include/gr_tpb_detail.h
@@ -22,9 +22,9 @@
 #define INCLUDED_GR_TPB_DETAIL_H
 
 #include <gr_runtime_api.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 #include <deque>
-#include <gruel/pmt.h>
+#include <pmt/pmt.h>
 
 class gr_block_detail;
 
@@ -33,11 +33,11 @@ class gr_block_detail;
  */
 struct GR_RUNTIME_API gr_tpb_detail {
 
-  gruel::mutex			mutex;			//< protects all vars
+  gr::thread::mutex			mutex;			//< protects all vars
   bool				input_changed;
-  gruel::condition_variable	input_cond;
+  gr::thread::condition_variable	input_cond;
   bool				output_changed;
-  gruel::condition_variable	output_cond;
+  gr::thread::condition_variable	output_cond;
 
 public:
   gr_tpb_detail()
@@ -61,7 +61,7 @@ public:
   //! Called by us
   void clear_changed()
   {
-    gruel::scoped_lock guard(mutex);
+    gr::thread::scoped_lock guard(mutex);
     input_changed = false;
     output_changed = false;
   }
@@ -71,7 +71,7 @@ private:
   //! Used by notify_downstream
   void set_input_changed()
   {
-    gruel::scoped_lock guard(mutex);
+    gr::thread::scoped_lock guard(mutex);
     input_changed = true;
     input_cond.notify_one();
   }
@@ -79,7 +79,7 @@ private:
   //! Used by notify_upstream
   void set_output_changed()
   {
-    gruel::scoped_lock guard(mutex);
+    gr::thread::scoped_lock guard(mutex);
     output_changed = true;
     output_cond.notify_one();
   }
diff --git a/gnuradio-runtime/include/high_res_timer.h b/gnuradio-runtime/include/high_res_timer.h
new file mode 100644
index 0000000000..fc7b007c61
--- /dev/null
+++ b/gnuradio-runtime/include/high_res_timer.h
@@ -0,0 +1,126 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2011,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_GNURADIO_HIGH_RES_TIMER_H
+#define INCLUDED_GNURADIO_HIGH_RES_TIMER_H
+
+namespace gr {
+
+    //! Typedef for the timer tick count
+    typedef signed long long high_res_timer_type;
+
+    //! Get the current time in ticks
+    high_res_timer_type high_res_timer_now(void);
+
+    //! Get the number of ticks per second
+    high_res_timer_type high_res_timer_tps(void);
+
+    //! Get the tick count at the epoch
+    high_res_timer_type high_res_timer_epoch(void);
+
+} /* namespace gr */
+
+////////////////////////////////////////////////////////////////////////
+// Use architecture defines to determine the implementation
+////////////////////////////////////////////////////////////////////////
+#if defined(linux) || defined(__linux) || defined(__linux__)
+    #define GNURADIO_HRT_USE_CLOCK_GETTIME
+#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+    #define GNURADIO_HRT_USE_QUERY_PERFORMANCE_COUNTER
+#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
+    #define GNURADIO_HRT_USE_MACH_ABSOLUTE_TIME
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+    #define GNURADIO_HRT_USE_CLOCK_GETTIME
+#else
+    #define GNURADIO_HRT_USE_MICROSEC_CLOCK
+#endif
+
+////////////////////////////////////////////////////////////////////////
+#ifdef GNURADIO_HRT_USE_CLOCK_GETTIME
+    #include <ctime>
+
+    inline gr::high_res_timer_type gr::high_res_timer_now(void){
+        timespec ts;
+        clock_gettime(CLOCK_MONOTONIC, &ts);
+        return ts.tv_sec*high_res_timer_tps() + ts.tv_nsec;
+    }
+
+    inline gr::high_res_timer_type gr::high_res_timer_tps(void){
+        return 1000000000UL;
+    }
+#endif /* GNURADIO_HRT_USE_CLOCK_GETTIME */
+
+////////////////////////////////////////////////////////////////////////
+#ifdef GNURADIO_HRT_USE_MACH_ABSOLUTE_TIME
+    #include <mach/mach_time.h>
+
+    inline gr::high_res_timer_type gr::high_res_timer_now(void){
+        return mach_absolute_time();
+    }
+
+    inline gr::high_res_timer_type gr::high_res_timer_tps(void){
+        mach_timebase_info_data_t info;
+        mach_timebase_info(&info);
+        return gr::high_res_timer_type(info.numer*1000000000UL)/info.denom;
+    }
+#endif
+
+////////////////////////////////////////////////////////////////////////
+#ifdef GNURADIO_HRT_USE_QUERY_PERFORMANCE_COUNTER
+    #include <Windows.h>
+
+    inline gr::high_res_timer_type gr::high_res_timer_now(void){
+        LARGE_INTEGER counts;
+        QueryPerformanceCounter(&counts);
+        return counts.QuadPart;
+    }
+
+    inline gr::high_res_timer_type gr::high_res_timer_tps(void){
+        LARGE_INTEGER freq;
+        QueryPerformanceFrequency(&freq);
+        return freq.QuadPart;
+    }
+#endif
+
+////////////////////////////////////////////////////////////////////////
+#ifdef GNURADIO_HRT_USE_MICROSEC_CLOCK
+    #include <boost/date_time/posix_time/posix_time.hpp>
+
+    inline gr::high_res_timer_type gr::high_res_timer_now(void){
+        static const boost::posix_time::ptime epoch(boost::posix_time::from_time_t(0));
+        return (boost::posix_time::microsec_clock::universal_time() - epoch).ticks();
+    }
+
+    inline gr::high_res_timer_type gr::high_res_timer_tps(void){
+        return boost::posix_time::time_duration::ticks_per_second();
+    }
+#endif
+
+////////////////////////////////////////////////////////////////////////
+#include <boost/date_time/posix_time/posix_time.hpp>
+
+inline gr::high_res_timer_type gr::high_res_timer_epoch(void){
+    static const double hrt_ticks_per_utc_ticks = gr::high_res_timer_tps()/double(boost::posix_time::time_duration::ticks_per_second());
+    boost::posix_time::time_duration utc = boost::posix_time::microsec_clock::universal_time() - boost::posix_time::from_time_t(0);
+    return gr::high_res_timer_now() - utc.ticks()*hrt_ticks_per_utc_ticks;
+}
+
+#endif /* INCLUDED_GNURADIO_HIGH_RES_TIMER_H */
diff --git a/gnuradio-runtime/include/messages/CMakeLists.txt b/gnuradio-runtime/include/messages/CMakeLists.txt
new file mode 100644
index 0000000000..f79f2bd24f
--- /dev/null
+++ b/gnuradio-runtime/include/messages/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Copyright 2013 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+########################################################################
+# Install header files
+########################################################################
+install(FILES
+  msg_accepter.h
+  msg_accepter_msgq.h
+  msg_passing.h
+  msg_producer.h
+  msg_queue.h
+  DESTINATION ${GR_INCLUDE_DIR}/gnuradio/messages
+  COMPONENT "runtime_devel"
+)
diff --git a/gnuradio-runtime/include/messages/msg_accepter.h b/gnuradio-runtime/include/messages/msg_accepter.h
new file mode 100644
index 0000000000..d3e89daf74
--- /dev/null
+++ b/gnuradio-runtime/include/messages/msg_accepter.h
@@ -0,0 +1,56 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_MSG_ACCEPTER_H
+#define INCLUDED_MSG_ACCEPTER_H
+
+#include <gr_runtime_api.h>
+#include <pmt/pmt.h>
+#include <boost/shared_ptr.hpp>
+
+namespace gr {
+  namespace messages {
+
+    /*!
+     * \brief Virtual base class that accepts messages
+     */
+    class GR_RUNTIME_API msg_accepter
+    {
+    public:
+      msg_accepter() {};
+      virtual ~msg_accepter();
+
+      /*!
+       * \brief send \p msg to \p msg_accepter on port \p which_port
+       *
+       * Sending a message is an asynchronous operation.  The \p post
+       * call will not wait for the message either to arrive at the
+       * destination or to be received.
+       */
+      virtual void post(pmt::pmt_t which_port, pmt::pmt_t msg) = 0;
+    };
+
+    typedef boost::shared_ptr<msg_accepter> msg_accepter_sptr;
+
+  } /* namespace messages */
+} /* namespace gr */
+
+#endif /* INCLUDED_MSG_ACCEPTER_H */
diff --git a/gnuradio-runtime/include/messages/msg_accepter_msgq.h b/gnuradio-runtime/include/messages/msg_accepter_msgq.h
new file mode 100644
index 0000000000..5d1d4f7e27
--- /dev/null
+++ b/gnuradio-runtime/include/messages/msg_accepter_msgq.h
@@ -0,0 +1,53 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_MSG_ACCEPTER_MSGQ_H
+#define INCLUDED_MSG_ACCEPTER_MSGQ_H
+
+#include <gr_runtime_api.h>
+#include <messages/msg_accepter.h>
+#include <messages/msg_queue.h>
+
+namespace gr {
+  namespace messages {
+
+    /*!
+     * \brief Concrete class that accepts messages and inserts them
+     * into a message queue.
+     */
+    class GR_RUNTIME_API msg_accepter_msgq : public msg_accepter
+    {
+    protected:
+      msg_queue_sptr d_msg_queue;
+
+    public:
+      msg_accepter_msgq(msg_queue_sptr msgq);
+      ~msg_accepter_msgq();
+
+      virtual void post(pmt::pmt_t msg);
+
+      msg_queue_sptr msg_queue() const { return d_msg_queue; }
+    };
+
+  } /* namespace messages */
+} /* namespace gr */
+
+#endif /* INCLUDED_MSG_ACCEPTER_MSGQ_H */
diff --git a/gnuradio-runtime/include/messages/msg_passing.h b/gnuradio-runtime/include/messages/msg_passing.h
new file mode 100644
index 0000000000..3bfccda339
--- /dev/null
+++ b/gnuradio-runtime/include/messages/msg_passing.h
@@ -0,0 +1,123 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_MSG_PASSING_H
+#define INCLUDED_MSG_PASSING_H
+
+/*!
+ * \brief Include this header to use the message passing features
+ */
+
+#include <gr_runtime_api.h>
+#include <pmt/pmt.h>
+#include <messages/msg_accepter.h>
+
+namespace gr {
+  namespace messages {
+
+    /*!
+     * \brief send message to msg_accepter
+     *
+     * \param accepter is the target of the send.
+     * \param which_port A pmt symbol describing the port by name.
+     * \param msg is the message to send. It's usually a pmt tuple.
+     *
+     * Sending a message is an asynchronous operation. The \p send
+     * call will not wait for the message either to arrive at the
+     * destination or to be received.
+     *
+     * \returns msg
+     */
+    static inline pmt::pmt_t
+    send(msg_accepter_sptr accepter, const pmt::pmt_t &which_port,
+         const pmt::pmt_t &msg)
+    {
+      accepter->post(which_port, msg);
+      return msg;
+    }
+
+    /*!
+     * \brief send message to msg_accepter
+     *
+     * \param accepter is the target of the send.
+     * \param which_port A pmt symbol describing the port by name.
+     * \param msg is the message to send. It's usually a pmt tuple.
+     *
+     * Sending a message is an asynchronous operation. The \p send
+     * call will not wait for the message either to arrive at the
+     * destination or to be received.
+     *
+     * \returns msg
+     */
+    static inline pmt::pmt_t
+    send(msg_accepter *accepter, const pmt::pmt_t &which_port,
+         const pmt::pmt_t &msg)
+    {
+      accepter->post(which_port, msg);
+      return msg;
+    }
+
+    /*!
+     * \brief send message to msg_accepter
+     *
+     * \param accepter is the target of the send.
+     * \param which_port A pmt symbol describing the port by name.
+     * \param msg is the message to send.  It's usually a pmt tuple.
+     *
+     * Sending a message is an asynchronous operation.  The \p send
+     * call will not wait for the message either to arrive at the
+     * destination or to be received.
+     *
+     * \returns msg
+     */
+    static inline pmt::pmt_t
+    send(msg_accepter &accepter, const pmt::pmt_t &which_port,
+         const pmt::pmt_t &msg)
+    {
+      accepter.post(which_port, msg);
+      return msg;
+    }
+
+    /*!
+     * \brief send message to msg_accepter
+     *
+     * \param accepter is the target of the send. 
+     *        aprecond: pmt::is_msg_accepter(accepter)
+     * \param which_port A pmt symbol describing the port by name.
+     * \param msg is the message to send.  It's usually a pmt tuple.
+     *
+     * Sending a message is an asynchronous operation. The \p send
+     * call will not wait for the message either to arrive at the
+     * destination or to be received.
+     *
+     * \returns msg
+     */
+    static inline pmt::pmt_t
+    send(pmt::pmt_t accepter, const pmt::pmt_t &which_port,
+         const pmt::pmt_t &msg)
+    {
+      return send(pmt::msg_accepter_ref(accepter), which_port, msg);
+    }
+
+  } /* namespace messages */
+} /* namespace gr */
+
+#endif /* INCLUDED_MSG_PASSING_H */
diff --git a/gnuradio-runtime/include/messages/msg_producer.h b/gnuradio-runtime/include/messages/msg_producer.h
new file mode 100644
index 0000000000..3167fc442a
--- /dev/null
+++ b/gnuradio-runtime/include/messages/msg_producer.h
@@ -0,0 +1,52 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_MSG_PRODUCER_H
+#define INCLUDED_MSG_PRODUCER_H
+
+#include <gr_runtime_api.h>
+#include <pmt/pmt.h>
+#include <boost/shared_ptr.hpp>
+
+namespace gr {
+  namespace messages {
+
+    /*!
+     * \brief Virtual base class that produces messages
+     */
+    class GR_RUNTIME_API msg_producer
+    {
+    public:
+      msg_producer() {}
+      virtual ~msg_producer();
+
+      /*!
+       * \brief send \p msg to \p msg_producer
+       */
+      virtual pmt::pmt_t retrieve() = 0;
+    };
+
+    typedef boost::shared_ptr<msg_producer> msg_producer_sptr;
+    
+  } /* namespace messages */
+} /* namespace gr */
+
+#endif /* INCLUDED_MSG_PRODUCER_H */
diff --git a/gnuradio-runtime/include/messages/msg_queue.h b/gnuradio-runtime/include/messages/msg_queue.h
new file mode 100644
index 0000000000..81531afcdf
--- /dev/null
+++ b/gnuradio-runtime/include/messages/msg_queue.h
@@ -0,0 +1,95 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_MSG_QUEUE_H
+#define INCLUDED_MSG_QUEUE_H
+
+#include <gr_runtime_api.h>
+#include <thread/thread.h>
+#include <pmt/pmt.h>
+#include <deque>
+
+namespace gr {
+  namespace messages {
+
+    class msg_queue;
+    typedef boost::shared_ptr<msg_queue> msg_queue_sptr;
+
+    msg_queue_sptr make_msg_queue(unsigned int limit=0);
+
+    /*!
+     * \brief thread-safe message queue
+     */
+    class GR_RUNTIME_API msg_queue
+    {
+    private:
+      gr::thread::mutex              d_mutex;
+      gr::thread::condition_variable d_not_empty;
+      gr::thread::condition_variable d_not_full;
+      unsigned int  d_limit;  // max # of messages in queue.  0 -> unbounded
+
+      std::deque<pmt::pmt_t>    d_msgs;
+
+    public:
+      msg_queue(unsigned int limit);
+      ~msg_queue();
+
+      /*!
+       * \brief Insert message at tail of queue.
+       * \param msg message
+       *
+       * Block if queue if full.
+       */
+      void insert_tail(pmt::pmt_t msg);
+
+      /*!
+       * \brief Delete message from head of queue and return it.
+       * Block if no message is available.
+       */
+      pmt::pmt_t delete_head();
+
+      /*!
+       * \brief If there's a message in the q, delete it and return it.
+       * If no message is available, return pmt_t().
+       */
+      pmt::pmt_t delete_head_nowait();
+
+      //! Delete all messages from the queue
+      void flush();
+
+      //! is the queue empty?
+      bool empty_p() const { return d_msgs.empty(); }
+
+      //! is the queue full?
+      bool full_p() const { return d_limit != 0 && count() >= d_limit; }
+
+      //! return number of messages in queue
+      unsigned int count() const { return d_msgs.size(); }
+
+      //! return limit on number of message in queue.  0 -> unbounded
+      unsigned int limit() const { return d_limit; }
+    };
+
+  } /* namespace messages */
+} /* namespace gr */
+
+#endif /* INCLUDED_MSG_QUEUE_H */
diff --git a/gnuradio-runtime/include/pmt/CMakeLists.txt b/gnuradio-runtime/include/pmt/CMakeLists.txt
new file mode 100644
index 0000000000..4ae0e22431
--- /dev/null
+++ b/gnuradio-runtime/include/pmt/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Copyright 2010-2013 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+########################################################################
+# Install the headers
+########################################################################
+install(FILES
+  api.h
+  pmt.h
+  pmt_pool.h
+  pmt_sugar.h
+  DESTINATION ${GR_INCLUDE_DIR}/pmt
+  COMPONENT "runtime_devel")
diff --git a/gnuradio-runtime/include/pmt/api.h b/gnuradio-runtime/include/pmt/api.h
new file mode 100644
index 0000000000..5dcc8a84a5
--- /dev/null
+++ b/gnuradio-runtime/include/pmt/api.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2010,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_PMT_API_H
+#define INCLUDED_PMT_API_H
+
+#include <attributes.h>
+
+#ifdef pmt_EXPORTS
+#  define PMT_API __GR_ATTR_EXPORT
+#else
+#  define PMT_API __GR_ATTR_IMPORT
+#endif
+
+#endif /* INCLUDED_PMT_API_H */
diff --git a/gnuradio-runtime/include/pmt/pmt.h b/gnuradio-runtime/include/pmt/pmt.h
new file mode 100644
index 0000000000..c4efbfc173
--- /dev/null
+++ b/gnuradio-runtime/include/pmt/pmt.h
@@ -0,0 +1,886 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009,2010,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_PMT_H
+#define INCLUDED_PMT_H
+
+#include <pmt/api.h>
+#include <boost/intrusive_ptr.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/any.hpp>
+#include <complex>
+#include <string>
+#include <stdint.h>
+#include <iosfwd>
+#include <stdexcept>
+#include <vector>
+
+namespace gr {
+  namespace messages {
+    class msg_accepter;
+  }
+}
+
+/*!
+ * This file defines a polymorphic type and the operations on it.
+ *
+ * It draws heavily on the idea of scheme and lisp data types.
+ * The interface parallels that in Guile 1.8, with the notable
+ * exception that these objects are transparently reference counted.
+ */
+
+namespace pmt {
+
+/*!
+ * \brief base class of all pmt types
+ */
+class pmt_base;
+
+/*!
+ * \brief typedef for shared pointer (transparent reference counting).
+ * See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
+ */
+typedef boost::intrusive_ptr<pmt_base> pmt_t;
+
+extern PMT_API void intrusive_ptr_add_ref(pmt_base*);
+extern PMT_API void intrusive_ptr_release(pmt_base*);
+
+class PMT_API exception : public std::logic_error
+{
+public:
+  exception(const std::string &msg, pmt_t obj);
+};
+
+class PMT_API wrong_type : public exception
+{
+public:
+  wrong_type(const std::string &msg, pmt_t obj);
+};
+
+class PMT_API out_of_range : public exception
+{
+public:
+  out_of_range(const std::string &msg, pmt_t obj);
+};
+
+class PMT_API notimplemented : public exception
+{
+public:
+  notimplemented(const std::string &msg, pmt_t obj);
+};
+
+/*
+ * ------------------------------------------------------------------------
+ * Booleans.  Two constants, #t and #f.
+ *
+ * In predicates, anything that is not #f is considered true.
+ * I.e., there is a single false value, #f.
+ * ------------------------------------------------------------------------
+ */
+extern PMT_API const pmt_t PMT_T;	//< \#t : boolean true constant
+extern PMT_API const pmt_t PMT_F;	//< \#f : boolean false constant
+
+//! Return true if obj is \#t or \#f, else return false.
+PMT_API bool is_bool(pmt_t obj);
+
+//! Return false if obj is \#f, else return true.
+PMT_API bool is_true(pmt_t obj);
+
+//! Return true if obj is \#f, else return true.
+PMT_API bool is_false(pmt_t obj);
+
+//! Return \#f is val is false, else return \#t.
+PMT_API pmt_t from_bool(bool val);
+
+//! Return true if val is pmt::True, return false when val is pmt::PMT_F,
+// else raise wrong_type exception.
+PMT_API bool to_bool(pmt_t val);
+
+/*
+ * ------------------------------------------------------------------------
+ *			       Symbols
+ * ------------------------------------------------------------------------
+ */
+
+//! Return true if obj is a symbol, else false.
+PMT_API bool is_symbol(const pmt_t& obj);
+
+//! Return the symbol whose name is \p s.
+PMT_API pmt_t string_to_symbol(const std::string &s);
+
+//! Alias for pmt_string_to_symbol
+PMT_API pmt_t intern(const std::string &s);
+
+
+/*!
+ * If \p is a symbol, return the name of the symbol as a string.
+ * Otherwise, raise the wrong_type exception.
+ */
+PMT_API const std::string symbol_to_string(const pmt_t& sym);
+
+/*
+ * ------------------------------------------------------------------------
+ *           Numbers: we support integer, real and complex
+ * ------------------------------------------------------------------------
+ */
+
+//! Return true if obj is any kind of number, else false.
+PMT_API bool is_number(pmt_t obj);
+
+/*
+ * ------------------------------------------------------------------------
+ *			       Integers
+ * ------------------------------------------------------------------------
+ */
+
+//! Return true if \p x is an integer number, else false
+PMT_API bool is_integer(pmt_t x);
+
+//! Return the pmt value that represents the integer \p x.
+PMT_API pmt_t from_long(long x);
+
+/*!
+ * \brief Convert pmt to long if possible.
+ *
+ * When \p x represents an exact integer that fits in a long,
+ * return that integer.  Else raise an exception, either wrong_type
+ * when x is not an exact integer, or out_of_range when it doesn't fit.
+ */
+PMT_API long to_long(pmt_t x);
+
+/*
+ * ------------------------------------------------------------------------
+ *			       uint64_t
+ * ------------------------------------------------------------------------
+ */
+
+//! Return true if \p x is an uint64 number, else false
+PMT_API bool is_uint64(pmt_t x);
+
+//! Return the pmt value that represents the uint64 \p x.
+PMT_API pmt_t from_uint64(uint64_t x);
+
+/*!
+ * \brief Convert pmt to uint64 if possible.
+ *
+ * When \p x represents an exact integer that fits in a uint64,
+ * return that uint64.  Else raise an exception, either wrong_type
+ * when x is not an exact uint64, or out_of_range when it doesn't fit.
+ */
+PMT_API uint64_t to_uint64(pmt_t x);
+
+/*
+ * ------------------------------------------------------------------------
+ *				Reals
+ * ------------------------------------------------------------------------
+ */
+
+/*
+ * \brief Return true if \p obj is a real number, else false.
+ */
+PMT_API bool is_real(pmt_t obj);
+
+//! Return the pmt value that represents double \p x.
+PMT_API pmt_t from_double(double x);
+
+/*!
+ * \brief Convert pmt to double if possible.
+ *
+ * Returns the number closest to \p val that is representable
+ * as a double.  The argument \p val must be a real or integer, otherwise
+ * a wrong_type exception is raised.
+ */
+PMT_API double to_double(pmt_t x);
+
+/*
+ * ------------------------------------------------------------------------
+ *			       Complex
+ * ------------------------------------------------------------------------
+ */
+
+/*!
+ * \brief return true if \p obj is a complex number, false otherwise.
+ */
+PMT_API bool is_complex(pmt_t obj);
+
+//! Return a complex number constructed of the given real and imaginary parts.
+PMT_API pmt_t make_rectangular(double re, double im);
+
+//! Return a complex number constructed of the given real and imaginary parts.
+PMT_API pmt_t from_complex(double re, double im);
+
+//! Return a complex number constructed of the given a complex number.
+PMT_API pmt_t from_complex(const std::complex<double> &z);
+
+//! Return a complex number constructed of the given real and imaginary parts.
+PMT_API pmt_t pmt_from_complex(double re, double im);
+
+//! Return a complex number constructed of the given a complex number.
+PMT_API pmt_t pmt_from_complex(const std::complex<double> &z);
+
+/*!
+ * If \p z is complex, real or integer, return the closest complex<double>.
+ * Otherwise, raise the wrong_type exception.
+ */
+PMT_API std::complex<double> to_complex(pmt_t z);
+
+/*
+ * ------------------------------------------------------------------------
+ *				Pairs
+ * ------------------------------------------------------------------------
+ */
+
+extern PMT_API const pmt_t PMT_NIL;	//< the empty list
+
+//! Return true if \p x is the empty list, otherwise return false.
+PMT_API bool is_null(const pmt_t& x);
+
+//! Return true if \p obj is a pair, else false.
+PMT_API bool is_pair(const pmt_t& obj);
+
+//! Return a newly allocated pair whose car is \p x and whose cdr is \p y.
+PMT_API pmt_t cons(const pmt_t& x, const pmt_t& y);
+
+//! If \p pair is a pair, return the car of the \p pair, otherwise raise wrong_type.
+PMT_API pmt_t car(const pmt_t& pair);
+
+//! If \p pair is a pair, return the cdr of the \p pair, otherwise raise wrong_type.
+PMT_API pmt_t cdr(const pmt_t& pair);
+
+//! Stores \p value in the car field of \p pair.
+PMT_API void set_car(pmt_t pair, pmt_t value);
+
+//! Stores \p value in the cdr field of \p pair.
+PMT_API void set_cdr(pmt_t pair, pmt_t value);
+
+PMT_API pmt_t caar(pmt_t pair);
+PMT_API pmt_t cadr(pmt_t pair);
+PMT_API pmt_t cdar(pmt_t pair);
+PMT_API pmt_t cddr(pmt_t pair);
+PMT_API pmt_t caddr(pmt_t pair);
+PMT_API pmt_t cadddr(pmt_t pair);
+
+/*
+ * ------------------------------------------------------------------------
+ *			          Tuples
+ *
+ * Store a fixed number of objects.  Tuples are not modifiable, and thus
+ * are excellent for use as messages.  Indexing is zero based.
+ * Access time to an element is O(1).
+ * ------------------------------------------------------------------------
+ */
+
+//! Return true if \p x is a tuple, othewise false.
+PMT_API bool is_tuple(pmt_t x);
+
+PMT_API pmt_t make_tuple();
+PMT_API pmt_t make_tuple(const pmt_t &e0);
+PMT_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1);
+PMT_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2);
+PMT_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3);
+PMT_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4);
+PMT_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5);
+PMT_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6);
+PMT_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7);
+PMT_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8);
+PMT_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8, const pmt_t &e9);
+
+/*!
+ * If \p x is a vector or proper list, return a tuple containing the elements of x
+ */
+PMT_API pmt_t to_tuple(const pmt_t &x);
+
+/*!
+ * Return the contents of position \p k of \p tuple.
+ * \p k must be a valid index of \p tuple.
+ */
+PMT_API pmt_t tuple_ref(const pmt_t &tuple, size_t k);
+
+/*
+ * ------------------------------------------------------------------------
+ *			       Vectors
+ *
+ * These vectors can hold any kind of objects.  Indexing is zero based.
+ * ------------------------------------------------------------------------
+ */
+
+//! Return true if \p x is a vector, othewise false.
+PMT_API bool is_vector(pmt_t x);
+
+//! Make a vector of length \p k, with initial values set to \p fill
+PMT_API pmt_t make_vector(size_t k, pmt_t fill);
+
+/*!
+ * Return the contents of position \p k of \p vector.
+ * \p k must be a valid index of \p vector.
+ */
+PMT_API pmt_t vector_ref(pmt_t vector, size_t k);
+
+//! Store \p obj in position \p k.
+PMT_API void vector_set(pmt_t vector, size_t k, pmt_t obj);
+
+//! Store \p fill in every position of \p vector
+PMT_API void vector_fill(pmt_t vector, pmt_t fill);
+
+/*
+ * ------------------------------------------------------------------------
+ *		      Binary Large Objects (BLOBs)
+ *
+ * Handy for passing around uninterpreted chunks of memory.
+ * ------------------------------------------------------------------------
+ */
+
+//! Return true if \p x is a blob, othewise false.
+PMT_API bool is_blob(pmt_t x);
+
+/*!
+ * \brief Make a blob given a pointer and length in bytes
+ *
+ * \param buf is the pointer to data to use to create blob
+ * \param len is the size of the data in bytes.
+ *
+ * The data is copied into the blob.
+ */
+PMT_API pmt_t make_blob(const void *buf, size_t len);
+
+//! Return a pointer to the blob's data
+PMT_API const void *blob_data(pmt_t blob);
+
+//! Return the blob's length in bytes
+PMT_API size_t blob_length(pmt_t blob);
+
+/*!
+ * <pre>
+ * ------------------------------------------------------------------------
+ *		       Uniform Numeric Vectors
+ *
+ * A uniform numeric vector is a vector whose elements are all of single
+ * numeric type.  pmt offers uniform numeric vectors for signed and
+ * unsigned 8-bit, 16-bit, 32-bit, and 64-bit integers, two sizes of
+ * floating point values, and complex floating-point numbers of these
+ * two sizes.  Indexing is zero based.
+ *
+ * The names of the functions include these tags in their names:
+ *
+ *    u8  unsigned 8-bit integers
+ *    s8  signed 8-bit integers
+ *   u16  unsigned 16-bit integers
+ *   s16  signed 16-bit integers
+ *   u32  unsigned 32-bit integers
+ *   s32  signed 32-bit integers
+ *   u64  unsigned 64-bit integers
+ *   s64  signed 64-bit integers
+ *   f32  the C++ type float
+ *   f64  the C++ type double
+ *   c32  the C++ type complex<float>
+ *   c64  the C++ type complex<double>
+ * ------------------------------------------------------------------------
+ * </pre>
+ */
+
+//! true if \p x is any kind of uniform numeric vector
+PMT_API bool is_uniform_vector(pmt_t x);
+
+PMT_API bool is_u8vector(pmt_t x);
+PMT_API bool is_s8vector(pmt_t x);
+PMT_API bool is_u16vector(pmt_t x);
+PMT_API bool is_s16vector(pmt_t x);
+PMT_API bool is_u32vector(pmt_t x);
+PMT_API bool is_s32vector(pmt_t x);
+PMT_API bool is_u64vector(pmt_t x);
+PMT_API bool is_s64vector(pmt_t x);
+PMT_API bool is_f32vector(pmt_t x);
+PMT_API bool is_f64vector(pmt_t x);
+PMT_API bool is_c32vector(pmt_t x);
+PMT_API bool is_c64vector(pmt_t x);
+
+PMT_API pmt_t make_u8vector(size_t k, uint8_t fill);
+PMT_API pmt_t make_s8vector(size_t k, int8_t fill);
+PMT_API pmt_t make_u16vector(size_t k, uint16_t fill);
+PMT_API pmt_t make_s16vector(size_t k, int16_t fill);
+PMT_API pmt_t make_u32vector(size_t k, uint32_t fill);
+PMT_API pmt_t make_s32vector(size_t k, int32_t fill);
+PMT_API pmt_t make_u64vector(size_t k, uint64_t fill);
+PMT_API pmt_t make_s64vector(size_t k, int64_t fill);
+PMT_API pmt_t make_f32vector(size_t k, float fill);
+PMT_API pmt_t make_f64vector(size_t k, double fill);
+PMT_API pmt_t make_c32vector(size_t k, std::complex<float> fill);
+PMT_API pmt_t make_c64vector(size_t k, std::complex<double> fill);
+
+PMT_API pmt_t init_u8vector(size_t k, const uint8_t *data);
+PMT_API pmt_t init_u8vector(size_t k, const std::vector<uint8_t> &data);
+PMT_API pmt_t init_s8vector(size_t k, const int8_t *data);
+PMT_API pmt_t init_s8vector(size_t k, const std::vector<int8_t> &data);
+PMT_API pmt_t init_u16vector(size_t k, const uint16_t *data);
+PMT_API pmt_t init_u16vector(size_t k, const std::vector<uint16_t> &data);
+PMT_API pmt_t init_s16vector(size_t k, const int16_t *data);
+PMT_API pmt_t init_s16vector(size_t k, const std::vector<int16_t> &data);
+PMT_API pmt_t init_u32vector(size_t k, const uint32_t *data);
+PMT_API pmt_t init_u32vector(size_t k, const std::vector<uint32_t> &data);
+PMT_API pmt_t init_s32vector(size_t k, const int32_t *data);
+PMT_API pmt_t init_s32vector(size_t k, const std::vector<int32_t> &data);
+PMT_API pmt_t init_u64vector(size_t k, const uint64_t *data);
+PMT_API pmt_t init_u64vector(size_t k, const std::vector<uint64_t> &data);
+PMT_API pmt_t init_s64vector(size_t k, const int64_t *data);
+PMT_API pmt_t init_s64vector(size_t k, const std::vector<int64_t> &data);
+PMT_API pmt_t init_f32vector(size_t k, const float *data);
+PMT_API pmt_t init_f32vector(size_t k, const std::vector<float> &data);
+PMT_API pmt_t init_f64vector(size_t k, const double *data);
+PMT_API pmt_t init_f64vector(size_t k, const std::vector<double> &data);
+PMT_API pmt_t init_c32vector(size_t k, const std::complex<float> *data);
+PMT_API pmt_t init_c32vector(size_t k, const std::vector<std::complex<float> > &data);
+PMT_API pmt_t init_c64vector(size_t k, const std::complex<double> *data);
+PMT_API pmt_t init_c64vector(size_t k, const std::vector<std::complex<double> > &data);
+
+PMT_API uint8_t  u8vector_ref(pmt_t v, size_t k);
+PMT_API int8_t   s8vector_ref(pmt_t v, size_t k);
+PMT_API uint16_t u16vector_ref(pmt_t v, size_t k);
+PMT_API int16_t  s16vector_ref(pmt_t v, size_t k);
+PMT_API uint32_t u32vector_ref(pmt_t v, size_t k);
+PMT_API int32_t  s32vector_ref(pmt_t v, size_t k);
+PMT_API uint64_t u64vector_ref(pmt_t v, size_t k);
+PMT_API int64_t  s64vector_ref(pmt_t v, size_t k);
+PMT_API float    f32vector_ref(pmt_t v, size_t k);
+PMT_API double   f64vector_ref(pmt_t v, size_t k);
+PMT_API std::complex<float>  c32vector_ref(pmt_t v, size_t k);
+PMT_API std::complex<double> c64vector_ref(pmt_t v, size_t k);
+
+PMT_API void u8vector_set(pmt_t v, size_t k, uint8_t x);  //< v[k] = x
+PMT_API void s8vector_set(pmt_t v, size_t k, int8_t x);
+PMT_API void u16vector_set(pmt_t v, size_t k, uint16_t x);
+PMT_API void s16vector_set(pmt_t v, size_t k, int16_t x);
+PMT_API void u32vector_set(pmt_t v, size_t k, uint32_t x);
+PMT_API void s32vector_set(pmt_t v, size_t k, int32_t x);
+PMT_API void u64vector_set(pmt_t v, size_t k, uint64_t x);
+PMT_API void s64vector_set(pmt_t v, size_t k, int64_t x);
+PMT_API void f32vector_set(pmt_t v, size_t k, float x);
+PMT_API void f64vector_set(pmt_t v, size_t k, double x);
+PMT_API void c32vector_set(pmt_t v, size_t k, std::complex<float> x);
+PMT_API void c64vector_set(pmt_t v, size_t k, std::complex<double> x);
+
+// Return const pointers to the elements
+
+PMT_API const void *uniform_vector_elements(pmt_t v, size_t &len);  //< works with any; len is in bytes
+
+PMT_API const uint8_t  *u8vector_elements(pmt_t v, size_t &len);  //< len is in elements
+PMT_API const int8_t   *s8vector_elements(pmt_t v, size_t &len);  //< len is in elements
+PMT_API const uint16_t *u16vector_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API const int16_t  *s16vector_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API const uint32_t *u32vector_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API const int32_t  *s32vector_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API const uint64_t *u64vector_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API const int64_t  *s64vector_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API const float    *f32vector_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API const double   *f64vector_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API const std::complex<float>  *c32vector_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API const std::complex<double> *c64vector_elements(pmt_t v, size_t &len); //< len is in elements
+
+// len is in elements
+PMT_API const std::vector<uint8_t>  u8vector_elements(pmt_t v);
+PMT_API const std::vector<int8_t>   s8vector_elements(pmt_t v);
+PMT_API const std::vector<uint16_t> u16vector_elements(pmt_t v);
+PMT_API const std::vector<int16_t>  s16vector_elements(pmt_t v);
+PMT_API const std::vector<uint32_t> u32vector_elements(pmt_t v);
+PMT_API const std::vector<int32_t>  s32vector_elements(pmt_t v);
+PMT_API const std::vector<uint64_t> u64vector_elements(pmt_t v);
+PMT_API const std::vector<int64_t>  s64vector_elements(pmt_t v);
+PMT_API const std::vector<float>    f32vector_elements(pmt_t v);
+PMT_API const std::vector<double>   f64vector_elements(pmt_t v);
+PMT_API const std::vector<std::complex<float> > c32vector_elements(pmt_t v);
+PMT_API const std::vector<std::complex<double> > c64vector_elements(pmt_t v);
+
+// len is in elements
+PMT_API const std::vector<uint8_t>  pmt_u8vector_elements(pmt_t v);
+PMT_API const std::vector<int8_t>   pmt_s8vector_elements(pmt_t v);
+PMT_API const std::vector<uint16_t> pmt_u16vector_elements(pmt_t v);
+PMT_API const std::vector<int16_t>  pmt_s16vector_elements(pmt_t v);
+PMT_API const std::vector<uint32_t> pmt_u32vector_elements(pmt_t v);
+PMT_API const std::vector<int32_t>  pmt_s32vector_elements(pmt_t v);
+PMT_API const std::vector<uint64_t> pmt_u64vector_elements(pmt_t v);
+PMT_API const std::vector<int64_t>  pmt_s64vector_elements(pmt_t v);
+PMT_API const std::vector<float>    pmt_f32vector_elements(pmt_t v);
+PMT_API const std::vector<double>   pmt_f64vector_elements(pmt_t v);
+PMT_API const std::vector<std::complex<float> > pmt_c32vector_elements(pmt_t v);
+PMT_API const std::vector<std::complex<double> > pmt_c64vector_elements(pmt_t v);
+
+// Return non-const pointers to the elements
+
+PMT_API void *uniform_vector_writable_elements(pmt_t v, size_t &len);  //< works with any; len is in bytes
+
+PMT_API uint8_t  *u8vector_writable_elements(pmt_t v, size_t &len);  //< len is in elements
+PMT_API int8_t   *s8vector_writable_elements(pmt_t v, size_t &len);  //< len is in elements
+PMT_API uint16_t *u16vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API int16_t  *s16vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API uint32_t *u32vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API int32_t  *s32vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API uint64_t *u64vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API int64_t  *s64vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API float    *f32vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API double   *f64vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API std::complex<float>  *c32vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
+PMT_API std::complex<double> *c64vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
+
+/*
+ * ------------------------------------------------------------------------
+ *	   Dictionary (a.k.a associative array, hash, map)
+ *
+ * This is a functional data structure that is persistent.  Updating a
+ * functional data structure does not destroy the existing version, but
+ * rather creates a new version that coexists with the old.
+ * ------------------------------------------------------------------------
+ */
+
+//! Return true if \p obj is a dictionary
+PMT_API bool is_dict(const pmt_t &obj);
+
+//! Make an empty dictionary
+PMT_API pmt_t make_dict();
+
+//! Return a new dictionary with \p key associated with \p value.
+PMT_API pmt_t dict_add(const pmt_t &dict, const pmt_t &key, const pmt_t &value);
+
+//! Return a new dictionary with \p key removed.
+PMT_API pmt_t dict_delete(const pmt_t &dict, const pmt_t &key);
+
+//! Return true if \p key exists in \p dict
+PMT_API bool  dict_has_key(const pmt_t &dict, const pmt_t &key);
+
+//! If \p key exists in \p dict, return associated value; otherwise return \p not_found.
+PMT_API pmt_t dict_ref(const pmt_t &dict, const pmt_t &key, const pmt_t &not_found);
+
+//! Return list of (key . value) pairs
+PMT_API pmt_t dict_items(pmt_t dict);
+
+//! Return list of keys
+PMT_API pmt_t dict_keys(pmt_t dict);
+
+//! Return list of values
+PMT_API pmt_t dict_values(pmt_t dict);
+
+/*
+ * ------------------------------------------------------------------------
+ *   Any (wraps boost::any -- can be used to wrap pretty much anything)
+ *
+ * Cannot be serialized or used across process boundaries.
+ * See http://www.boost.org/doc/html/any.html
+ * ------------------------------------------------------------------------
+ */
+
+//! Return true if \p obj is an any
+PMT_API bool is_any(pmt_t obj);
+
+//! make an any
+PMT_API pmt_t make_any(const boost::any &any);
+
+//! Return underlying boost::any
+PMT_API boost::any any_ref(pmt_t obj);
+
+//! Store \p any in \p obj
+PMT_API void any_set(pmt_t obj, const boost::any &any);
+
+
+/*
+ * ------------------------------------------------------------------------
+ *    msg_accepter -- pmt representation of pmt::msg_accepter
+ * ------------------------------------------------------------------------
+ */
+//! Return true if \p obj is a msg_accepter
+PMT_API bool is_msg_accepter(const pmt_t &obj);
+
+//! make a msg_accepter
+PMT_API pmt_t make_msg_accepter(boost::shared_ptr<gr::messages::msg_accepter> ma);
+
+//! Return underlying msg_accepter
+PMT_API boost::shared_ptr<gr::messages::msg_accepter> msg_accepter_ref(const pmt_t &obj);
+
+/*
+ * ------------------------------------------------------------------------
+ *			  General functions
+ * ------------------------------------------------------------------------
+ */
+
+//! Return true if x and y are the same object; otherwise return false.
+PMT_API bool eq(const pmt_t& x, const pmt_t& y);
+
+/*!
+ * \brief Return true if x and y should normally be regarded as the same object, else false.
+ *
+ * <pre>
+ * eqv returns true if:
+ *   x and y are the same object.
+ *   x and y are both \#t or both \#f.
+ *   x and y are both symbols and their names are the same.
+ *   x and y are both numbers, and are numerically equal.
+ *   x and y are both the empty list (nil).
+ *   x and y are pairs or vectors that denote same location in store.
+ * </pre>
+ */
+PMT_API bool eqv(const pmt_t& x, const pmt_t& y);
+
+/*!
+ * pmt::equal recursively compares the contents of pairs and vectors,
+ * applying pmt::eqv on other objects such as numbers and symbols.
+ * pmt::equal may fail to terminate if its arguments are circular data
+ * structures.
+ */
+PMT_API bool equal(const pmt_t& x, const pmt_t& y);
+
+
+//! Return the number of elements in v
+PMT_API size_t length(const pmt_t& v);
+
+/*!
+ * \brief Find the first pair in \p alist whose car field is \p obj
+ *  and return that pair.
+ *
+ * \p alist (for "association list") must be a list of pairs.  If no pair
+ * in \p alist has \p obj as its car then \#f is returned.
+ * Uses pmt::eq to compare \p obj with car fields of the pairs in \p alist.
+ */
+PMT_API pmt_t assq(pmt_t obj, pmt_t alist);
+
+/*!
+ * \brief Find the first pair in \p alist whose car field is \p obj
+ *  and return that pair.
+ *
+ * \p alist (for "association list") must be a list of pairs.  If no pair
+ * in \p alist has \p obj as its car then \#f is returned.
+ * Uses pmt::eqv to compare \p obj with car fields of the pairs in \p alist.
+ */
+PMT_API pmt_t assv(pmt_t obj, pmt_t alist);
+
+/*!
+ * \brief Find the first pair in \p alist whose car field is \p obj
+ *  and return that pair.
+ *
+ * \p alist (for "association list") must be a list of pairs.  If no pair
+ * in \p alist has \p obj as its car then \#f is returned.
+ * Uses pmt::equal to compare \p obj with car fields of the pairs in \p alist.
+ */
+PMT_API pmt_t assoc(pmt_t obj, pmt_t alist);
+
+/*!
+ * \brief Apply \p proc element-wise to the elements of list and returns
+ * a list of the results, in order.
+ *
+ * \p list must be a list.  The dynamic order in which \p proc is
+ * applied to the elements of \p list is unspecified.
+ */
+PMT_API pmt_t map(pmt_t proc(const pmt_t&), pmt_t list);
+
+/*!
+ * \brief reverse \p list.
+ *
+ * \p list must be a proper list.
+ */
+PMT_API pmt_t reverse(pmt_t list);
+
+/*!
+ * \brief destructively reverse \p list.
+ *
+ * \p list must be a proper list.
+ */
+PMT_API pmt_t reverse_x(pmt_t list);
+
+/*!
+ * \brief (acons x y a) == (cons (cons x y) a)
+ */
+inline static pmt_t
+acons(pmt_t x, pmt_t y, pmt_t a)
+{
+  return cons(cons(x, y), a);
+}
+
+/*!
+ * \brief locates \p nth element of \n list where the car is the 'zeroth' element.
+ */
+PMT_API pmt_t nth(size_t n, pmt_t list);
+
+/*!
+ * \brief returns the tail of \p list that would be obtained by calling
+ * cdr \p n times in succession.
+ */
+PMT_API pmt_t nthcdr(size_t n, pmt_t list);
+
+/*!
+ * \brief Return the first sublist of \p list whose car is \p obj.
+ * If \p obj does not occur in \p list, then \#f is returned.
+ * pmt::memq use pmt::eq to compare \p obj with the elements of \p list.
+ */
+PMT_API pmt_t memq(pmt_t obj, pmt_t list);
+
+/*!
+ * \brief Return the first sublist of \p list whose car is \p obj.
+ * If \p obj does not occur in \p list, then \#f is returned.
+ * pmt::memv use pmt::eqv to compare \p obj with the elements of \p list.
+ */
+PMT_API pmt_t memv(pmt_t obj, pmt_t list);
+
+/*!
+ * \brief Return the first sublist of \p list whose car is \p obj.
+ * If \p obj does not occur in \p list, then \#f is returned.
+ * pmt::member use pmt::equal to compare \p obj with the elements of \p list.
+ */
+PMT_API pmt_t member(pmt_t obj, pmt_t list);
+
+/*!
+ * \brief Return true if every element of \p list1 appears in \p list2, and false otherwise.
+ * Comparisons are done with pmt::eqv.
+ */
+PMT_API bool subsetp(pmt_t list1, pmt_t list2);
+
+/*!
+ * \brief Return a list of length 1 containing \p x1
+ */
+PMT_API pmt_t list1(const pmt_t& x1);
+
+/*!
+ * \brief Return a list of length 2 containing \p x1, \p x2
+ */
+PMT_API pmt_t list2(const pmt_t& x1, const pmt_t& x2);
+
+/*!
+ * \brief Return a list of length 3 containing \p x1, \p x2, \p x3
+ */
+PMT_API pmt_t list3(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3);
+
+/*!
+ * \brief Return a list of length 4 containing \p x1, \p x2, \p x3, \p x4
+ */
+PMT_API pmt_t list4(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4);
+
+/*!
+ * \brief Return a list of length 5 containing \p x1, \p x2, \p x3, \p x4, \p x5
+ */
+PMT_API pmt_t list5(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4, const pmt_t& x5);
+
+/*!
+ * \brief Return a list of length 6 containing \p x1, \p x2, \p x3, \p x4, \p
+ * x5, \p x6
+ */
+PMT_API pmt_t list6(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4, const pmt_t& x5, const pmt_t& x6);
+
+/*!
+ * \brief Return \p list with \p item added to it.
+ */
+PMT_API pmt_t list_add(pmt_t list, const pmt_t& item);
+
+/*!
+ * \brief Return \p list with \p item removed from it.
+ */
+PMT_API pmt_t list_rm(pmt_t list, const pmt_t& item);
+
+/*!
+ * \brief Return bool of \p list contains \p item
+ */
+PMT_API bool list_has(pmt_t list, const pmt_t& item);
+
+
+/*
+ * ------------------------------------------------------------------------
+ *			     read / write
+ * ------------------------------------------------------------------------
+ */
+extern PMT_API const pmt_t PMT_EOF;	//< The end of file object
+
+//! return true if obj is the EOF object, otherwise return false.
+PMT_API bool is_eof_object(pmt_t obj);
+
+/*!
+ * read converts external representations of pmt objects into the
+ * objects themselves.  Read returns the next object parsable from
+ * the given input port, updating port to point to the first
+ * character past the end of the external representation of the
+ * object.
+ *
+ * If an end of file is encountered in the input before any
+ * characters are found that can begin an object, then an end of file
+ * object is returned.   The port remains open, and further attempts
+ * to read will also return an end of file object.  If an end of file
+ * is encountered after the beginning of an object's external
+ * representation, but the external representation is incomplete and
+ * therefore not parsable, an error is signaled.
+ */
+PMT_API pmt_t read(std::istream &port);
+
+/*!
+ * Write a written representation of \p obj to the given \p port.
+ */
+PMT_API void write(pmt_t obj, std::ostream &port);
+
+/*!
+ * Return a string representation of \p obj.
+ * This is the same output as would be generated by pmt::write.
+ */
+PMT_API std::string write_string(pmt_t obj);
+
+
+PMT_API std::ostream& operator<<(std::ostream &os, pmt_t obj);
+
+/*!
+ * \brief Write pmt string representation to stdout.
+ */
+PMT_API void print(pmt_t v);
+
+
+/*
+ * ------------------------------------------------------------------------
+ *		      portable byte stream representation
+ * ------------------------------------------------------------------------
+ */
+/*!
+ * \brief Write portable byte-serial representation of \p obj to \p sink
+ */
+PMT_API bool serialize(pmt_t obj, std::streambuf &sink);
+
+/*!
+ * \brief Create obj from portable byte-serial representation
+ */
+PMT_API pmt_t deserialize(std::streambuf &source);
+
+
+PMT_API void dump_sizeof();	// debugging
+
+/*!
+ * \brief Provide a simple string generating interface to pmt's serialize function
+ */
+PMT_API std::string serialize_str(pmt_t obj);
+
+/*!
+ * \brief Provide a simple string generating interface to pmt's deserialize function
+ */
+PMT_API pmt_t deserialize_str(std::string str);
+
+/*!
+ * \brief Provide a comparator function object to allow pmt use in stl types
+ */
+class comperator {
+    public:
+        bool operator()(pmt::pmt_t const& p1, pmt::pmt_t const& p2) const
+            { return pmt::eqv(p1,p2)?false:p1.get()>p2.get(); }
+    };
+
+} /* namespace pmt */
+
+#include <pmt/pmt_sugar.h>
+
+#endif /* INCLUDED_PMT_H */
diff --git a/gnuradio-runtime/include/pmt/pmt_pool.h b/gnuradio-runtime/include/pmt/pmt_pool.h
new file mode 100644
index 0000000000..a8cb8e6314
--- /dev/null
+++ b/gnuradio-runtime/include/pmt/pmt_pool.h
@@ -0,0 +1,73 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2009,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_PMT_POOL_H
+#define INCLUDED_PMT_POOL_H
+
+#include <pmt/api.h>
+#include <cstddef>
+#include <vector>
+#include <boost/thread.hpp>
+
+namespace pmt {
+
+/*!
+ * \brief very simple thread-safe fixed-size allocation pool
+ *
+ * FIXME may want to go to global allocation with per-thread free list.
+ * This would eliminate virtually all lock contention.
+ */
+class PMT_API pmt_pool {
+
+  struct PMT_API item {
+    struct item	*d_next;
+  };
+
+  typedef boost::unique_lock<boost::mutex>  scoped_lock;
+  mutable boost::mutex 		d_mutex;
+  boost::condition_variable	d_cond;
+
+  size_t	      d_itemsize;
+  size_t	      d_alignment;
+  size_t	      d_allocation_size;
+  size_t	      d_max_items;
+  size_t	      d_n_items;
+  item	       	     *d_freelist;
+  std::vector<char *> d_allocations;
+
+public:
+  /*!
+   * \param itemsize size in bytes of the items to be allocated.
+   * \param alignment alignment in bytes of all objects to be allocated (must be power-of-2).
+   * \param allocation_size number of bytes to allocate at a time from the underlying allocator.
+   * \param max_items is the maximum number of items to allocate.  If this number is exceeded,
+   *	      the allocate blocks.  0 implies no limit.
+   */
+  pmt_pool(size_t itemsize, size_t alignment = 16,
+	   size_t allocation_size = 4096, size_t max_items = 0);
+  ~pmt_pool();
+
+  void *malloc();
+  void free(void *p);
+};
+
+} /* namespace pmt */
+
+#endif /* INCLUDED_PMT_POOL_H */
diff --git a/gnuradio-runtime/include/pmt/pmt_sugar.h b/gnuradio-runtime/include/pmt/pmt_sugar.h
new file mode 100644
index 0000000000..09c9a5e3e4
--- /dev/null
+++ b/gnuradio-runtime/include/pmt/pmt_sugar.h
@@ -0,0 +1,174 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_PMT_SUGAR_H
+#define INCLUDED_PMT_SUGAR_H
+
+/*!
+ * This file is included by pmt.h and contains pseudo-constructor
+ * shorthand for making pmt objects
+ */
+
+#include <messages/msg_accepter.h>
+
+namespace pmt {
+
+  //! Make pmt symbol
+  static inline pmt_t
+  mp(const std::string &s)
+  {
+    return string_to_symbol(s);
+  }
+
+  //! Make pmt symbol
+  static inline pmt_t
+  mp(const char *s)
+  {
+    return string_to_symbol(s);
+  }
+
+  //! Make pmt long
+  static inline pmt_t
+  mp(long x){
+    return from_long(x);
+  }
+
+  //! Make pmt long
+  static inline pmt_t
+  mp(long long unsigned x){
+    return from_long(x);
+  }
+
+  //! Make pmt long
+  static inline pmt_t
+  mp(int x){
+    return from_long(x);
+  }
+
+  //! Make pmt double
+  static inline pmt_t
+  mp(double x){
+    return from_double(x);
+  }
+
+  //! Make pmt complex
+  static inline pmt_t
+  mp(std::complex<double> z)
+  {
+    return make_rectangular(z.real(), z.imag());
+  }
+
+  //! Make pmt complex
+  static inline pmt_t
+  mp(std::complex<float> z)
+  {
+    return make_rectangular(z.real(), z.imag());
+  }
+
+  //! Make pmt msg_accepter
+  static inline pmt_t
+  mp(boost::shared_ptr<gr::messages::msg_accepter> ma)
+  {
+    return make_msg_accepter(ma);
+  }
+
+  //! Make pmt Binary Large Object (BLOB)
+  static inline pmt_t
+  mp(const void *data, size_t len_in_bytes)
+  {
+    return make_blob(data, len_in_bytes);
+  }
+
+  //! Make tuple
+  static inline pmt_t
+  mp(const pmt_t &e0)
+  {
+    return make_tuple(e0);
+  }
+
+  //! Make tuple
+  static inline pmt_t
+  mp(const pmt_t &e0, const pmt_t &e1)
+  {
+    return make_tuple(e0, e1);
+  }
+
+  //! Make tuple
+  static inline pmt_t
+  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2)
+  {
+    return make_tuple(e0, e1, e2);
+  }
+
+  //! Make tuple
+  static inline pmt_t
+  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3)
+  {
+    return make_tuple(e0, e1, e2, e3);
+  }
+
+  //! Make tuple
+  static inline pmt_t
+  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4)
+  {
+    return make_tuple(e0, e1, e2, e3, e4);
+  }
+
+  //! Make tuple
+  static inline pmt_t
+  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5)
+  {
+    return make_tuple(e0, e1, e2, e3, e4, e5);
+  }
+
+  //! Make tuple
+  static inline pmt_t
+  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6)
+  {
+    return make_tuple(e0, e1, e2, e3, e4, e5, e6);
+  }
+
+  //! Make tuple
+  static inline pmt_t
+  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7)
+  {
+    return make_tuple(e0, e1, e2, e3, e4, e5, e6, e7);
+  }
+
+  //! Make tuple
+  static inline pmt_t
+  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8)
+  {
+    return make_tuple(e0, e1, e2, e3, e4, e5, e6, e7, e8);
+  }
+
+  //! Make tuple
+  static inline pmt_t
+  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8, const pmt_t &e9)
+  {
+    return make_tuple(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9);
+  }
+
+
+} /* namespace pmt */
+
+
+#endif /* INCLUDED_PMT_SUGAR_H */
diff --git a/gnuradio-runtime/include/realtime.h b/gnuradio-runtime/include/realtime.h
new file mode 100644
index 0000000000..9a51a6ba1d
--- /dev/null
+++ b/gnuradio-runtime/include/realtime.h
@@ -0,0 +1,96 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2008,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_GNURADIO_REALTIME_H
+#define INCLUDED_GNURADIO_REALTIME_H
+
+#include <gr_runtime_api.h>
+#include <stdexcept>
+
+/*!
+ * \brief System independent way to ask for realtime scheduling
+ *
+ * \sa sys_pri.h
+ */
+
+namespace gr {
+
+  typedef enum {
+    RT_OK = 0,
+    RT_NOT_IMPLEMENTED,
+    RT_NO_PRIVS,
+    RT_OTHER_ERROR
+  } rt_status_t;
+
+
+  enum rt_sched_policy {
+    RT_SCHED_RR   = 0,		// round robin
+    RT_SCHED_FIFO = 1,		// first in first out
+  };
+
+  /*
+   * Define the range for our virtual priorities (don't change these)
+   *
+   * Processes (or threads) with numerically higher priority values
+   * are scheduled before processes with numerically lower priority
+   * values.  Thus, the value returned by rt_priority_max() will be
+   * greater than the value returned by rt_priority_min().
+   */
+  static inline int rt_priority_min() { return  0; }
+  static inline int rt_priority_max() { return 15; }
+  static inline int rt_priority_default() { return 1; }
+
+  struct GR_RUNTIME_API rt_sched_param {
+    int			priority;
+    rt_sched_policy	policy;
+
+    rt_sched_param()
+      : priority(rt_priority_default()), policy(RT_SCHED_RR){}
+
+    rt_sched_param(int priority_, rt_sched_policy policy_ = RT_SCHED_RR)
+    {
+      if (priority_ < rt_priority_min() || priority_ > rt_priority_max())
+	throw std::invalid_argument("rt_sched_param: priority out of range");
+
+      priority = priority_;
+      policy = policy_;
+    }
+  };
+
+  /*!
+   * \brief If possible, enable "realtime" scheduling.
+   * \ingroup misc
+   *
+   * In general, this means that the code will be scheduled before any
+   * non-realtime (normal) processes.  Note that if your code contains
+   * an non-blocking infinite loop and you enable realtime scheduling,
+   * it's possible to hang the system.
+   */
+
+  // NOTE: If you change this, you need to change the code in
+  // gnuradio-core/src/lib/runtime/gr_realtime.i, see note there.
+  rt_status_t
+  GR_RUNTIME_API enable_realtime_scheduling(rt_sched_param = rt_sched_param());
+
+} // namespace gr
+
+#endif /* INCLUDED_GNURADIO_REALTIME_H */
diff --git a/gnuradio-runtime/include/rpccallbackregister_base.h b/gnuradio-runtime/include/rpccallbackregister_base.h
index dbfda4ed47..f2cd1d8051 100644
--- a/gnuradio-runtime/include/rpccallbackregister_base.h
+++ b/gnuradio-runtime/include/rpccallbackregister_base.h
@@ -23,8 +23,8 @@
 #ifndef RPCCALLBACKREGISTER_BASE_H
 #define RPCCALLBACKREGISTER_BASE_H
 
-#include <gruel/msg_accepter.h>
-#include <gruel/msg_producer.h>
+#include <messages/msg_accepter.h>
+#include <messages/msg_producer.h>
 
 typedef uint32_t DisplayType;
 
@@ -90,8 +90,8 @@ struct callbackregister_base
     Tsptr callback;
   };
 
-  typedef callback_t<gruel::msg_accepter, gruel::msg_accepter_sptr> configureCallback_t;
-  typedef callback_t<gruel::msg_producer, gruel::msg_producer_sptr> queryCallback_t;
+  typedef callback_t<gr::messages::msg_accepter, gr::messages::msg_accepter_sptr> configureCallback_t;
+  typedef callback_t<gr::messages::msg_producer, gr::messages::msg_producer_sptr> queryCallback_t;
 
   callbackregister_base() {;}
   virtual ~callbackregister_base() {;}
diff --git a/gnuradio-runtime/include/rpcpmtconverters_ice.h b/gnuradio-runtime/include/rpcpmtconverters_ice.h
index 4403b96a2a..e592f4cdfb 100644
--- a/gnuradio-runtime/include/rpcpmtconverters_ice.h
+++ b/gnuradio-runtime/include/rpcpmtconverters_ice.h
@@ -23,7 +23,7 @@
 #ifndef RPCPMTCONVERTERS_ICE_H
 #define RPCPMTCONVERTERS_ICE_H
 
-#include <gruel/pmt.h>
+#include <pmt/pmt.h>
 #include <gnuradio.h>
 
 namespace rpcpmtconverter
diff --git a/gnuradio-runtime/include/rpcregisterhelpers.h b/gnuradio-runtime/include/rpcregisterhelpers.h
index 1be3769ac8..b09aae9704 100644
--- a/gnuradio-runtime/include/rpcregisterhelpers.h
+++ b/gnuradio-runtime/include/rpcregisterhelpers.h
@@ -34,7 +34,7 @@
 
 // Base classes
 template<typename T, typename Tto> class rpcextractor_base
-  : public virtual gruel::msg_accepter
+  : public virtual gr::messages::msg_accepter
 {
 public:
   rpcextractor_base(T* source, void (T::*func)(Tto)) :
@@ -60,7 +60,7 @@ public:
 };
 
 template<typename T, typename Tfrom>
-class rpcinserter_base : public virtual gruel::msg_producer
+class rpcinserter_base : public virtual gr::messages::msg_producer
 {
 public:
   rpcinserter_base(T* source, Tfrom (T::*func)()) : _source(source), _func(func) {;}
diff --git a/gnuradio-runtime/include/sys_pri.h b/gnuradio-runtime/include/sys_pri.h
new file mode 100644
index 0000000000..745176e681
--- /dev/null
+++ b/gnuradio-runtime/include/sys_pri.h
@@ -0,0 +1,42 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_GNURADIO_SYS_PRI_H
+#define INCLUDED_GNURADIO_SYS_PRI_H
+
+#include <gr_runtime_api.h>
+#include <realtime.h>
+
+/*
+ * A single place to define real-time priorities used by the system itself
+ */
+namespace gr {
+
+  struct GR_RUNTIME_API sys_pri {
+    static rt_sched_param python();		  // python code
+    static rt_sched_param normal();		  // normal blocks
+    static rt_sched_param gcell_event_handler();
+    static rt_sched_param usrp2_backend();	  // thread that services the ethernet
+  };
+
+} /* namespace gr */
+
+#endif /* INCLUDED_GNURADIO_SYS_PRI_H */
diff --git a/gnuradio-runtime/include/thread/CMakeLists.txt b/gnuradio-runtime/include/thread/CMakeLists.txt
new file mode 100644
index 0000000000..8ea4bfc66e
--- /dev/null
+++ b/gnuradio-runtime/include/thread/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Copyright 2013 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+########################################################################
+# Install header files
+########################################################################
+install(FILES
+  thread.h
+  thread_body_wrapper.h
+  thread_group.h
+  DESTINATION ${GR_INCLUDE_DIR}/gnuradio/thread
+  COMPONENT "runtime_devel"
+)
diff --git a/gnuradio-runtime/include/thread/thread.h b/gnuradio-runtime/include/thread/thread.h
new file mode 100644
index 0000000000..548d76e9a5
--- /dev/null
+++ b/gnuradio-runtime/include/thread/thread.h
@@ -0,0 +1,144 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009-2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_THREAD_H
+#define INCLUDED_THREAD_H
+
+#include <gr_runtime_api.h>
+#include <boost/thread/thread.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/locks.hpp>
+#include <boost/thread/condition_variable.hpp>
+#include <vector>
+
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+
+#include <windows.h>
+
+#endif
+
+namespace gr {
+  namespace thread {
+
+    typedef boost::thread                    thread;
+    typedef boost::mutex                     mutex;
+    typedef boost::unique_lock<boost::mutex> scoped_lock;
+    typedef boost::condition_variable        condition_variable;
+
+    /*! \brief a system-dependent typedef for the underlying thread type.
+     */
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+    typedef HANDLE gr_thread_t;
+#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
+    typedef pthread_t gr_thread_t;
+#else
+    typedef pthread_t gr_thread_t;
+#endif
+
+    /*! \brief Get the current thread's ID as a gr_thread_t
+     *
+     * We use this when setting the thread affinity or any other
+     * low-level thread settings. Can be called withing a GNU Radio
+     * block to get a reference to its current thread ID.
+     */
+    GR_RUNTIME_API gr_thread_t get_current_thread_id();
+
+    /*! \brief Bind the current thread to a set of cores.
+     *
+     * Wrapper for system-dependent calls to set the affinity of the
+     * current thread to the processor mask. The mask is simply a
+     * 1-demensional vector containing the processor or core number
+     * from 0 to N-1 for N cores.
+     *
+     * Note: this does not work on OSX; it is a nop call since OSX
+     * does not support the concept of thread affinity (and what they
+     * do support in this way since 10.5 is not what we want or can
+     * use in this fashion).
+     */
+    GR_RUNTIME_API void thread_bind_to_processor(const std::vector<int> &mask);
+
+    /*! \brief Convineince function to bind the current thread to a single core.
+     *
+     * Wrapper for system-dependent calls to set the affinity of the
+     * current thread to a given core from 0 to N-1 for N cores.
+     *
+     * Note: this does not work on OSX; it is a nop call since OSX
+     * does not support the concept of thread affinity (and what they
+     * do support in this way since 10.5 is not what we want or can
+     * use in this fashion).
+     */
+    GR_RUNTIME_API void thread_bind_to_processor(int n);
+
+    /*! \brief Bind a thread to a set of cores.
+     *
+     * Wrapper for system-dependent calls to set the affinity of the
+     * given thread ID to the processor mask. The mask is simply a
+     * 1-demensional vector containing the processor or core number
+     * from 0 to N-1 for N cores.
+     *
+     * Note: this does not work on OSX; it is a nop call since OSX
+     * does not support the concept of thread affinity (and what they
+     * do support in this way since 10.5 is not what we want or can
+     * use in this fashion).
+     */
+    GR_RUNTIME_API void thread_bind_to_processor(gr_thread_t thread,
+                                                 const std::vector<int> &mask);
+
+
+    /*! \brief Convineince function to bind the a thread to a single core.
+     *
+     * Wrapper for system-dependent calls to set the affinity of the
+     * given thread ID to a given core from 0 to N-1 for N cores.
+     *
+     * Note: this does not work on OSX; it is a nop call since OSX
+     * does not support the concept of thread affinity (and what they
+     * do support in this way since 10.5 is not what we want or can
+     * use in this fashion).
+     */
+    GR_RUNTIME_API void thread_bind_to_processor(gr_thread_t thread,
+                                                 unsigned int n);
+
+    /*! \brief Remove any thread-processor affinity for the current thread.
+     *
+     * Note: this does not work on OSX; it is a nop call since OSX
+     * does not support the concept of thread affinity (and what they
+     * do support in this way since 10.5 is not what we want or can
+     * use in this fashion).
+     */
+    GR_RUNTIME_API void thread_unbind();
+
+    /*! \brief Remove any thread-processor affinity for a given thread ID.
+     *
+     * Note: this does not work on OSX; it is a nop call since OSX
+     * does not support the concept of thread affinity (and what they
+     * do support in this way since 10.5 is not what we want or can
+     * use in this fashion).
+     */
+    GR_RUNTIME_API void thread_unbind(gr_thread_t thread);
+
+  } /* namespace thread */
+} /* namespace gr */
+
+#endif /* INCLUDED_THREAD_H */
diff --git a/gnuradio-runtime/include/thread/thread_body_wrapper.h b/gnuradio-runtime/include/thread/thread_body_wrapper.h
new file mode 100644
index 0000000000..dcf8cff48e
--- /dev/null
+++ b/gnuradio-runtime/include/thread/thread_body_wrapper.h
@@ -0,0 +1,72 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,2009,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_THREAD_BODY_WRAPPER_H
+#define INCLUDED_THREAD_BODY_WRAPPER_H
+
+#include <gr_runtime_api.h>
+#include <thread/thread.h>
+#include <exception>
+#include <iostream>
+
+namespace gr {
+  namespace thread {
+
+  GR_RUNTIME_API void mask_signals();
+
+    template <class F>
+    class thread_body_wrapper
+    {
+    private:
+      F d_f;
+      std::string d_name;
+
+    public:
+      explicit thread_body_wrapper(F f, const std::string &name="")
+        : d_f(f), d_name(name) {}
+
+      void operator()()
+      {
+        mask_signals();
+
+        try {
+          d_f();
+        }
+        catch(boost::thread_interrupted const &)
+          {
+          }
+        catch(std::exception const &e)
+          {
+            std::cerr << "thread[" << d_name << "]: "
+                      << e.what() << std::endl;
+          }
+        catch(...)
+          {
+            std::cerr << "thread[" << d_name << "]: "
+                      << "caught unrecognized exception\n";
+          }
+      }
+    };
+
+  } /* namespace thread */
+} /* namespace gr */
+
+#endif /* INCLUDED_THREAD_BODY_WRAPPER_H */
diff --git a/gnuradio-runtime/include/thread/thread_group.h b/gnuradio-runtime/include/thread/thread_group.h
new file mode 100644
index 0000000000..81b561bd64
--- /dev/null
+++ b/gnuradio-runtime/include/thread/thread_group.h
@@ -0,0 +1,48 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2001-2003 William E. Kempf
+ * Copyright (C) 2007 Anthony Williams
+ * Copyright 2008,2009 Free Software Foundation, Inc.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+/*
+ * This was extracted from Boost 1.35.0 and fixed.
+ */
+
+#ifndef INCLUDED_THREAD_GROUP_H
+#define INCLUDED_THREAD_GROUP_H
+
+#include <gr_runtime_api.h>
+#include <thread/thread.h>
+#include <boost/utility.hpp>
+#include <boost/thread/shared_mutex.hpp>
+#include <boost/function.hpp>
+
+namespace gr {
+  namespace thread {
+
+    class GR_RUNTIME_API thread_group : public boost::noncopyable
+    {
+    public:
+      thread_group();
+      ~thread_group();
+
+      boost::thread* create_thread(const boost::function0<void>& threadfunc);
+      void add_thread(boost::thread* thrd);
+      void remove_thread(boost::thread* thrd);
+      void join_all();
+      void interrupt_all();
+      size_t size() const;
+
+    private:
+      std::list<boost::thread*> m_threads;
+      mutable boost::shared_mutex m_mutex;
+    };
+
+  } /* namespace thread */
+} /* namespace gr */
+
+#endif /* INCLUDED_THREAD_GROUP_H */
diff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt
index 637982ffa7..1767920b5d 100644
--- a/gnuradio-runtime/lib/CMakeLists.txt
+++ b/gnuradio-runtime/lib/CMakeLists.txt
@@ -54,10 +54,16 @@ include_directories(${GNURADIO_RUNTIME_INCLUDE_DIRS}
                     ${CMAKE_CURRENT_SOURCE_DIR}
 		    ${CMAKE_CURRENT_BINARY_DIR}/../include/
                     ${Boost_INCLUDE_DIRS}
-                    ${GRUEL_INCLUDE_DIRS}
 		    ${VOLK_INCLUDE_DIRS}
 )
 
+########################################################################
+# Include subdirs rather to populate to the sources lists.
+########################################################################
+GR_INCLUDE_SUBDIRECTORY(messages)
+GR_INCLUDE_SUBDIRECTORY(pmt)
+GR_INCLUDE_SUBDIRECTORY(thread)
+
 ########################################################################
 # Setup library
 ########################################################################
@@ -129,7 +135,6 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
 endif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
 
 list(APPEND gnuradio_runtime_libs
-    gruel
     volk
     ${Boost_LIBRARIES}
     ${LOG4CPP_LIBRARIES}
@@ -209,7 +214,7 @@ endif(TRY_SHM_VMCIRCBUF)
 add_library(gnuradio-runtime SHARED ${gnuradio_runtime_sources})
 target_link_libraries(gnuradio-runtime ${gnuradio_runtime_libs})
 GR_LIBRARY_FOO(gnuradio-runtime RUNTIME_COMPONENT "runtime" DEVEL_COMPONENT "runtime_devel")
-set_target_properties(gnuradio-runtime PROPERTIES LINK_INTERFACE_LIBRARIES "gruel")
+#set_target_properties(gnuradio-runtime PROPERTIES LINK_INTERFACE_LIBRARIES "gruel")
 
 add_dependencies(gnuradio-runtime
   runtime_generated_includes
diff --git a/gnuradio-runtime/lib/gr_basic_block.cc b/gnuradio-runtime/lib/gr_basic_block.cc
index 35ea797167..83f6c07c87 100644
--- a/gnuradio-runtime/lib/gr_basic_block.cc
+++ b/gnuradio-runtime/lib/gr_basic_block.cc
@@ -182,7 +182,7 @@ gr_basic_block::_post(pmt::pmt_t which_port, pmt::pmt_t msg)
 void
 gr_basic_block::insert_tail(pmt::pmt_t which_port, pmt::pmt_t msg)
 {
-  gruel::scoped_lock guard(mutex);
+  gr::thread::scoped_lock guard(mutex);
 
     if( (msg_queue.find(which_port) == msg_queue.end()) || (msg_queue_ready.find(which_port) == msg_queue_ready.end())){
         std::cout << "target port = " << pmt::symbol_to_string(which_port) << std::endl;
@@ -199,7 +199,7 @@ gr_basic_block::insert_tail(pmt::pmt_t which_port, pmt::pmt_t msg)
 pmt::pmt_t
 gr_basic_block::delete_head_nowait(pmt::pmt_t which_port)
 {
-  gruel::scoped_lock guard(mutex);
+  gr::thread::scoped_lock guard(mutex);
 
   if (empty_p(which_port)){
     return pmt::pmt_t();
@@ -214,7 +214,7 @@ gr_basic_block::delete_head_nowait(pmt::pmt_t which_port)
 pmt::pmt_t
 gr_basic_block::delete_head_blocking(pmt::pmt_t which_port)
 {
-  gruel::scoped_lock guard(mutex);
+  gr::thread::scoped_lock guard(mutex);
 
   while (empty_p(which_port)){
     msg_queue_ready[which_port]->wait(guard);
diff --git a/gnuradio-runtime/lib/gr_block_detail.cc b/gnuradio-runtime/lib/gr_block_detail.cc
index af767da8ec..7098113301 100644
--- a/gnuradio-runtime/lib/gr_block_detail.cc
+++ b/gnuradio-runtime/lib/gr_block_detail.cc
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2004,2009,2010 Free Software Foundation, Inc.
+ * Copyright 2004,2009,2010,2013 Free Software Foundation, Inc.
  *
  * This file is part of GNU Radio
  *
@@ -222,7 +222,7 @@ gr_block_detail::set_processor_affinity(const std::vector<int> &mask)
 {
   if(threaded) {
     try {
-      gruel::thread_bind_to_processor(thread, mask);
+      gr::thread::thread_bind_to_processor(thread, mask);
     }
     catch (std::runtime_error e) {
       std::cerr << "set_processor_affinity: invalid mask."  << std::endl;;
@@ -234,21 +234,21 @@ void
 gr_block_detail::unset_processor_affinity()
 {
   if(threaded) {
-    gruel::thread_unbind(thread);
+    gr::thread::thread_unbind(thread);
   }
 }
 
 void
 gr_block_detail::start_perf_counters()
 {
-  d_start_of_work = gruel::high_res_timer_now();
+  d_start_of_work = gr::high_res_timer_now();
 }
 
 void
 gr_block_detail::stop_perf_counters(int noutput_items, int nproduced)
 {
-  d_end_of_work = gruel::high_res_timer_now();
-  gruel::high_res_timer_type diff = d_end_of_work - d_start_of_work;
+  d_end_of_work = gr::high_res_timer_now();
+  gr::high_res_timer_type diff = d_end_of_work - d_start_of_work;
 
   if(d_pc_counter == 0) {
     d_ins_work_time = diff;
diff --git a/gnuradio-runtime/lib/gr_block_executor.cc b/gnuradio-runtime/lib/gr_block_executor.cc
index e070f3c508..cfef406412 100644
--- a/gnuradio-runtime/lib/gr_block_executor.cc
+++ b/gnuradio-runtime/lib/gr_block_executor.cc
@@ -71,7 +71,7 @@ min_available_space (gr_block_detail *d, int output_multiple, int min_noutput_it
   if (min_noutput_items == 0)
     min_noutput_items = 1;
   for (int i = 0; i < d->noutputs (); i++){
-    gruel::scoped_lock guard(*d->output(i)->mutex());
+    gr::thread::scoped_lock guard(*d->output(i)->mutex());
     int avail_n = round_down(d->output(i)->space_available(), output_multiple);
     int best_n = round_down(d->output(i)->bufsize()/2, output_multiple);
     if (best_n < min_noutput_items)
@@ -239,7 +239,7 @@ gr_block_executor::run_one_iteration()
 	/*
 	 * Acquire the mutex and grab local copies of items_available and done.
 	 */
-	gruel::scoped_lock guard(*d->input(i)->mutex());
+	gr::thread::scoped_lock guard(*d->input(i)->mutex());
 	d_ninput_items[i] = d->input(i)->items_available();
 	d_input_done[i] = d->input(i)->done();
       }
@@ -283,7 +283,7 @@ gr_block_executor::run_one_iteration()
 	/*
 	 * Acquire the mutex and grab local copies of items_available and done.
 	 */
-	gruel::scoped_lock guard(*d->input(i)->mutex());
+	gr::thread::scoped_lock guard(*d->input(i)->mutex());
 	d_ninput_items[i] = d->input(i)->items_available ();
 	d_input_done[i] = d->input(i)->done();
       }
diff --git a/gnuradio-runtime/lib/gr_buffer.cc b/gnuradio-runtime/lib/gr_buffer.cc
index 369959d65f..bdce5b4036 100644
--- a/gnuradio-runtime/lib/gr_buffer.cc
+++ b/gnuradio-runtime/lib/gr_buffer.cc
@@ -185,7 +185,7 @@ gr_buffer::write_pointer ()
 void
 gr_buffer::update_write_pointer (int nitems)
 {
-  gruel::scoped_lock guard(*mutex());
+  gr::thread::scoped_lock guard(*mutex());
   d_write_index = index_add (d_write_index, nitems);
   d_abs_write_offset += nitems;
 }
@@ -193,7 +193,7 @@ gr_buffer::update_write_pointer (int nitems)
 void
 gr_buffer::set_done (bool done)
 {
-  gruel::scoped_lock guard(*mutex());
+  gr::thread::scoped_lock guard(*mutex());
   d_done = done;
 }
 
@@ -229,14 +229,14 @@ gr_buffer::drop_reader (gr_buffer_reader *reader)
 void
 gr_buffer::add_item_tag(const gr_tag_t &tag)
 {
-  gruel::scoped_lock guard(*mutex());
+  gr::thread::scoped_lock guard(*mutex());
   d_item_tags.push_back(tag);
 }
 
 void
 gr_buffer::remove_item_tag(const gr_tag_t &tag)
 {
-  gruel::scoped_lock guard(*mutex());
+  gr::thread::scoped_lock guard(*mutex());
   for (std::deque<gr_tag_t>::iterator it = d_item_tags.begin(); it != d_item_tags.end(); ++it) {
     if (*it == tag) {
       d_item_tags.erase(it);
@@ -256,7 +256,7 @@ gr_buffer::prune_tags(uint64_t max_time)
      If this function is used elsewhere, remember to lock the
      buffer's mutex al la the scoped_lock line below.
   */
-  //gruel::scoped_lock guard(*mutex());
+  //gr::thread::scoped_lock guard(*mutex());
   std::deque<gr_tag_t>::iterator itr = d_item_tags.begin();
 
   uint64_t item_time;
@@ -313,7 +313,7 @@ gr_buffer_reader::read_pointer ()
 void
 gr_buffer_reader::update_read_pointer (int nitems)
 {
-  gruel::scoped_lock guard(*mutex());
+  gr::thread::scoped_lock guard(*mutex());
   d_read_index = d_buffer->index_add (d_read_index, nitems);
   d_abs_read_offset += nitems;
 }
@@ -323,7 +323,7 @@ gr_buffer_reader::get_tags_in_range(std::vector<gr_tag_t> &v,
 				    uint64_t abs_start,
 				    uint64_t abs_end)
 {
-  gruel::scoped_lock guard(*mutex());
+  gr::thread::scoped_lock guard(*mutex());
 
   v.resize(0);
   std::deque<gr_tag_t>::iterator itr = d_buffer->get_tags_begin();
diff --git a/gnuradio-runtime/lib/gr_flowgraph.cc b/gnuradio-runtime/lib/gr_flowgraph.cc
index 63a2084802..28cd693171 100644
--- a/gnuradio-runtime/lib/gr_flowgraph.cc
+++ b/gnuradio-runtime/lib/gr_flowgraph.cc
@@ -49,7 +49,6 @@ gr_flowgraph::~gr_flowgraph()
 {
 }
 
-// FIXME: move to libgruel as a utility function
 template<class T>
 static
 std::vector<T>
diff --git a/gnuradio-runtime/lib/gr_msg_queue.cc b/gnuradio-runtime/lib/gr_msg_queue.cc
index 0cf0467715..03bbe046a4 100644
--- a/gnuradio-runtime/lib/gr_msg_queue.cc
+++ b/gnuradio-runtime/lib/gr_msg_queue.cc
@@ -49,7 +49,7 @@ gr_msg_queue::insert_tail(gr_message_sptr msg)
   if (msg->d_next)
     throw std::invalid_argument("gr_msg_queue::insert_tail: msg already in queue");
 
-  gruel::scoped_lock guard(d_mutex);
+  gr::thread::scoped_lock guard(d_mutex);
 
   while (full_p())
     d_not_full.wait(guard);
@@ -72,7 +72,7 @@ gr_msg_queue::insert_tail(gr_message_sptr msg)
 gr_message_sptr
 gr_msg_queue::delete_head()
 {
-  gruel::scoped_lock guard(d_mutex);
+  gr::thread::scoped_lock guard(d_mutex);
   gr_message_sptr m;
 
   while ((m = d_head) == 0)
@@ -94,7 +94,7 @@ gr_msg_queue::delete_head()
 gr_message_sptr
 gr_msg_queue::delete_head_nowait()
 {
-  gruel::scoped_lock guard(d_mutex);
+  gr::thread::scoped_lock guard(d_mutex);
   gr_message_sptr m;
 
   if ((m = d_head) == 0){
diff --git a/gnuradio-runtime/lib/gr_realtime.cc b/gnuradio-runtime/lib/gr_realtime.cc
index 75b497999d..d7a7eab5ba 100644
--- a/gnuradio-runtime/lib/gr_realtime.cc
+++ b/gnuradio-runtime/lib/gr_realtime.cc
@@ -23,10 +23,11 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+
 #include <gr_realtime.h>
 
 gr_rt_status_t
 gr_enable_realtime_scheduling()
 {
-  return gruel::enable_realtime_scheduling();
+  return gr_enable_realtime_scheduling();
 }
diff --git a/gnuradio-runtime/lib/gr_scheduler_sts.cc b/gnuradio-runtime/lib/gr_scheduler_sts.cc
index 2c96def6d1..10f01edaf6 100644
--- a/gnuradio-runtime/lib/gr_scheduler_sts.cc
+++ b/gnuradio-runtime/lib/gr_scheduler_sts.cc
@@ -24,7 +24,7 @@
 #endif
 #include <gr_scheduler_sts.h>
 #include <gr_single_threaded_scheduler.h>
-#include <gruel/thread_body_wrapper.h>
+#include <thread/thread_body_wrapper.h>
 
 class sts_container
 {
@@ -64,7 +64,7 @@ gr_scheduler_sts::gr_scheduler_sts(gr_flat_flowgraph_sptr ffg, int max_noutput_i
 
     gr_block_vector_t blocks = gr_flat_flowgraph::make_block_vector(*p);
     d_threads.create_thread(
-        gruel::thread_body_wrapper<sts_container>(sts_container(blocks),
+        gr::thread::thread_body_wrapper<sts_container>(sts_container(blocks),
 						  "single-threaded-scheduler"));
   }
 }
diff --git a/gnuradio-runtime/lib/gr_scheduler_sts.h b/gnuradio-runtime/lib/gr_scheduler_sts.h
index 43b97b62c1..af98c6d8ba 100644
--- a/gnuradio-runtime/lib/gr_scheduler_sts.h
+++ b/gnuradio-runtime/lib/gr_scheduler_sts.h
@@ -23,14 +23,14 @@
 
 #include <gr_runtime_api.h>
 #include <gr_scheduler.h>
-#include <gruel/thread_group.h>
+#include <thread/thread_group.h>
 
 /*!
  * \brief Concrete scheduler that uses the single_threaded_scheduler
  */
 class GR_RUNTIME_API gr_scheduler_sts : public gr_scheduler
 {
-  gruel::thread_group		       d_threads;
+  gr::thread::thread_group		       d_threads;
 
 protected:
   /*!
diff --git a/gnuradio-runtime/lib/gr_scheduler_tpb.cc b/gnuradio-runtime/lib/gr_scheduler_tpb.cc
index 2824eb1b3b..e67078632f 100644
--- a/gnuradio-runtime/lib/gr_scheduler_tpb.cc
+++ b/gnuradio-runtime/lib/gr_scheduler_tpb.cc
@@ -24,7 +24,7 @@
 #endif
 #include <gr_scheduler_tpb.h>
 #include <gr_tpb_thread_body.h>
-#include <gruel/thread_body_wrapper.h>
+#include <thread/thread_body_wrapper.h>
 #include <sstream>
 
 /*
@@ -80,7 +80,7 @@ gr_scheduler_tpb::gr_scheduler_tpb(gr_flat_flowgraph_sptr ffg, int max_noutput_i
       max_noutput_items = blocks[i]->max_noutput_items();
     
     d_threads.create_thread(
-	    gruel::thread_body_wrapper<tpb_container>(tpb_container(blocks[i], max_noutput_items),
+	    gr::thread::thread_body_wrapper<tpb_container>(tpb_container(blocks[i], max_noutput_items),
 						      name.str()));
   }
 }
diff --git a/gnuradio-runtime/lib/gr_scheduler_tpb.h b/gnuradio-runtime/lib/gr_scheduler_tpb.h
index d978dd28e1..4ab7bb16d2 100644
--- a/gnuradio-runtime/lib/gr_scheduler_tpb.h
+++ b/gnuradio-runtime/lib/gr_scheduler_tpb.h
@@ -23,14 +23,14 @@
 
 #include <gr_runtime_api.h>
 #include <gr_scheduler.h>
-#include <gruel/thread_group.h>
+#include <thread/thread_group.h>
 
 /*!
  * \brief Concrete scheduler that uses a kernel thread-per-block
  */
 class GR_RUNTIME_API gr_scheduler_tpb : public gr_scheduler
 {
-  gruel::thread_group		       d_threads;
+  gr::thread::thread_group		       d_threads;
 
 protected:
   /*!
diff --git a/gnuradio-runtime/lib/gr_sptr_magic.cc b/gnuradio-runtime/lib/gr_sptr_magic.cc
index 7fdadf24a2..2073701422 100644
--- a/gnuradio-runtime/lib/gr_sptr_magic.cc
+++ b/gnuradio-runtime/lib/gr_sptr_magic.cc
@@ -27,11 +27,11 @@
 #include <stdexcept>
 
 
-#include <gruel/thread.h>
+#include <thread/thread.h>
 
 namespace gnuradio {
 
-  static gruel::mutex	s_mutex;
+  static gr::thread::mutex	s_mutex;
   typedef std::map<gr_basic_block*, gr_basic_block_sptr> sptr_map;
   static sptr_map	s_map;
 
@@ -39,7 +39,7 @@ namespace gnuradio {
   detail::sptr_magic::create_and_stash_initial_sptr(gr_hier_block2 *p)
   {
     gr_basic_block_sptr sptr(p);
-    gruel::scoped_lock guard(s_mutex);
+    gr::thread::scoped_lock guard(s_mutex);
     s_map.insert(sptr_map::value_type(static_cast<gr_basic_block *>(p), sptr));
   }
 
@@ -60,7 +60,7 @@ namespace gnuradio {
      * p is a subclass of gr_hier_block2, thus we've already created the shared pointer
      * and stashed it away.  Fish it out and return it.
      */
-    gruel::scoped_lock guard(s_mutex);
+    gr::thread::scoped_lock guard(s_mutex);
     sptr_map::iterator pos = s_map.find(static_cast<gr_basic_block *>(p));
     if (pos == s_map.end())
       throw std::invalid_argument("gr_sptr_magic: invalid pointer!");
diff --git a/gnuradio-runtime/lib/gr_top_block_impl.cc b/gnuradio-runtime/lib/gr_top_block_impl.cc
index b6d427ce27..ef645ea57d 100644
--- a/gnuradio-runtime/lib/gr_top_block_impl.cc
+++ b/gnuradio-runtime/lib/gr_top_block_impl.cc
@@ -92,7 +92,7 @@ gr_top_block_impl::~gr_top_block_impl()
 void
 gr_top_block_impl::start(int max_noutput_items)
 {
-  gruel::scoped_lock	l(d_mutex);
+  gr::thread::scoped_lock	l(d_mutex);
 
   d_max_noutput_items = max_noutput_items;
 
@@ -141,14 +141,14 @@ gr_top_block_impl::wait()
 void
 gr_top_block_impl::lock()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   d_lock_count++;
 }
 
 void
 gr_top_block_impl::unlock()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
 
   if (d_lock_count <= 0){
     d_lock_count = 0;		// fix it, then complain
diff --git a/gnuradio-runtime/lib/gr_top_block_impl.h b/gnuradio-runtime/lib/gr_top_block_impl.h
index 7293531090..345a33152f 100644
--- a/gnuradio-runtime/lib/gr_top_block_impl.h
+++ b/gnuradio-runtime/lib/gr_top_block_impl.h
@@ -25,7 +25,7 @@
 
 #include <gr_runtime_api.h>
 #include <gr_scheduler.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 
 /*!
  *\brief Abstract implementation details of gr_top_block
@@ -76,7 +76,7 @@ protected:
   gr_flat_flowgraph_sptr         d_ffg;
   gr_scheduler_sptr		 d_scheduler;
 
-  gruel::mutex                   d_mutex;	// protects d_state and d_lock_count
+  gr::thread::mutex                   d_mutex;	// protects d_state and d_lock_count
   tb_state			 d_state;
   int                            d_lock_count;
   int                            d_max_noutput_items;
diff --git a/gnuradio-runtime/lib/gr_tpb_thread_body.cc b/gnuradio-runtime/lib/gr_tpb_thread_body.cc
index 679fd15124..11934dbf09 100644
--- a/gnuradio-runtime/lib/gr_tpb_thread_body.cc
+++ b/gnuradio-runtime/lib/gr_tpb_thread_body.cc
@@ -25,7 +25,7 @@
 #include <gr_prefs.h>
 #include <iostream>
 #include <boost/thread.hpp>
-#include <gruel/pmt.h>
+#include <pmt/pmt.h>
 #include <boost/foreach.hpp>
 
 using namespace pmt;
@@ -40,14 +40,14 @@ gr_tpb_thread_body::gr_tpb_thread_body(gr_block_sptr block, int max_noutput_item
   pmt_t msg;
 
   d->threaded = true;
-  d->thread = gruel::get_current_thread_id();
+  d->thread = gr::thread::get_current_thread_id();
 
   gr_prefs *p = gr_prefs::singleton();
   size_t max_nmsgs = static_cast<size_t>(p->get_long("DEFAULT", "max_messages", 100));
 
   // Set thread affinity if it was set before fg was started.
   if(block->processor_affinity().size() > 0) {
-    gruel::thread_bind_to_processor(d->thread, block->processor_affinity());
+    gr::thread::thread_bind_to_processor(d->thread, block->processor_affinity());
   }
 
   while (1){
@@ -97,7 +97,7 @@ gr_tpb_thread_body::gr_tpb_thread_body(gr_block_sptr block, int max_noutput_item
 
     case gr_block_executor::BLKD_IN:		// Wait for input.
       {
-	gruel::scoped_lock guard(d->d_tpb.mutex);
+	gr::thread::scoped_lock guard(d->d_tpb.mutex);
 	while (!d->d_tpb.input_changed){
 
 	  // wait for input or message
@@ -120,7 +120,7 @@ gr_tpb_thread_body::gr_tpb_thread_body(gr_block_sptr block, int max_noutput_item
 
     case gr_block_executor::BLKD_OUT:		// Wait for output buffer space.
       {
-	gruel::scoped_lock guard(d->d_tpb.mutex);
+	gr::thread::scoped_lock guard(d->d_tpb.mutex);
 	while (!d->d_tpb.output_changed){
 
 	  // wait for output room or message
diff --git a/gnuradio-runtime/lib/messages/CMakeLists.txt b/gnuradio-runtime/lib/messages/CMakeLists.txt
new file mode 100644
index 0000000000..20d4f30b06
--- /dev/null
+++ b/gnuradio-runtime/lib/messages/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Copyright 2010,2013 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+
+list(APPEND gnuradio_runtime_sources
+  ${CMAKE_CURRENT_SOURCE_DIR}/msg_accepter.cc
+  ${CMAKE_CURRENT_SOURCE_DIR}/msg_accepter_msgq.cc
+  ${CMAKE_CURRENT_SOURCE_DIR}/msg_producer.cc
+  ${CMAKE_CURRENT_SOURCE_DIR}/msg_queue.cc
+)
diff --git a/gnuradio-runtime/lib/messages/msg_accepter.cc b/gnuradio-runtime/lib/messages/msg_accepter.cc
new file mode 100644
index 0000000000..a0d2d840c6
--- /dev/null
+++ b/gnuradio-runtime/lib/messages/msg_accepter.cc
@@ -0,0 +1,38 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <messages/msg_accepter.h>
+
+namespace gr {
+  namespace messages {
+
+    msg_accepter::~msg_accepter()
+    {
+      // NOP, required as virtual destructor
+    }
+
+  } /* namespace messages */
+} /* namespace gr */
diff --git a/gnuradio-runtime/lib/messages/msg_accepter_msgq.cc b/gnuradio-runtime/lib/messages/msg_accepter_msgq.cc
new file mode 100644
index 0000000000..adbea5ebc6
--- /dev/null
+++ b/gnuradio-runtime/lib/messages/msg_accepter_msgq.cc
@@ -0,0 +1,50 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <messages/msg_accepter_msgq.h>
+
+using namespace pmt;
+
+namespace gr {
+  namespace messages {
+
+    msg_accepter_msgq::msg_accepter_msgq(msg_queue_sptr msgq)
+      : d_msg_queue(msgq)
+    {
+    }
+
+    msg_accepter_msgq::~msg_accepter_msgq()
+    {
+      // NOP, required as virtual destructor
+    }
+
+    void
+    msg_accepter_msgq::post(pmt_t msg)
+    {
+      d_msg_queue->insert_tail(msg);
+    }
+
+  } /* namespace messages */
+} /* namespace gr */
diff --git a/gnuradio-runtime/lib/messages/msg_producer.cc b/gnuradio-runtime/lib/messages/msg_producer.cc
new file mode 100644
index 0000000000..c354422aa6
--- /dev/null
+++ b/gnuradio-runtime/lib/messages/msg_producer.cc
@@ -0,0 +1,38 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012-2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <messages/msg_producer.h>
+
+namespace gr {
+  namespace messages {
+
+    msg_producer::~msg_producer()
+    {
+      // NOP, required as virtual destructor
+    }
+
+  } /* namespace messages */
+} /* namespace gr */
diff --git a/gnuradio-runtime/lib/messages/msg_queue.cc b/gnuradio-runtime/lib/messages/msg_queue.cc
new file mode 100644
index 0000000000..0d460dc05c
--- /dev/null
+++ b/gnuradio-runtime/lib/messages/msg_queue.cc
@@ -0,0 +1,105 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <messages/msg_queue.h>
+#include <stdexcept>
+
+using namespace pmt;
+
+namespace gr {
+  namespace messages {
+
+    msg_queue_sptr
+    make_msg_queue(unsigned int limit)
+    {
+      return msg_queue_sptr(new msg_queue(limit));
+    }
+
+    msg_queue::msg_queue(unsigned int limit)
+      : d_limit(limit)
+    {
+    }
+
+    msg_queue::~msg_queue()
+    {
+      flush();
+    }
+
+    void
+    msg_queue::insert_tail(pmt_t msg)
+    {
+      gr::thread::scoped_lock guard(d_mutex);
+
+      while(full_p())
+        d_not_full.wait(guard);
+
+      d_msgs.push_back(msg);
+      d_not_empty.notify_one();
+    }
+
+    pmt_t
+    msg_queue::delete_head()
+    {
+      gr::thread::scoped_lock guard(d_mutex);
+
+      while(empty_p())
+        d_not_empty.wait(guard);
+
+      pmt_t m(d_msgs.front());
+      d_msgs.pop_front();
+
+      if(d_limit > 0)		// Unlimited length queues never block on write
+        d_not_full.notify_one();
+
+      return m;
+    }
+
+    pmt_t
+    msg_queue::delete_head_nowait()
+    {
+      gr::thread::scoped_lock guard(d_mutex);
+
+      if(empty_p())
+        return pmt_t();
+
+      pmt_t m(d_msgs.front());
+      d_msgs.pop_front();
+
+      if(d_limit > 0)		// Unlimited length queues never block on write
+        d_not_full.notify_one();
+
+      return m;
+    }
+
+    void
+    msg_queue::flush()
+    {
+      while(delete_head_nowait() != pmt_t())
+        ;
+    }
+    
+  } /* namespace messages */
+} /* namespace gr */
diff --git a/gnuradio-runtime/lib/pmt/CMakeLists.txt b/gnuradio-runtime/lib/pmt/CMakeLists.txt
new file mode 100644
index 0000000000..9d191df06a
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/CMakeLists.txt
@@ -0,0 +1,91 @@
+# Copyright 2010-2013 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+########################################################################
+# Generate serial tags header file
+########################################################################
+
+get_filename_component(PMT_SERIAL_TAGS_H
+    ${CMAKE_CURRENT_BINARY_DIR}/../../include/pmt/pmt_serial_tags.h ABSOLUTE
+)
+
+add_custom_command(
+    OUTPUT ${PMT_SERIAL_TAGS_H}
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gen-serial-tags.py
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/pmt-serial-tags.scm
+    COMMAND ${PYTHON_EXECUTABLE}
+        ${CMAKE_CURRENT_SOURCE_DIR}/gen-serial-tags.py
+        ${CMAKE_CURRENT_SOURCE_DIR}/pmt-serial-tags.scm
+        ${PMT_SERIAL_TAGS_H}
+)
+
+install(
+    FILES ${PMT_SERIAL_TAGS_H}
+    DESTINATION ${GR_INCLUDE_DIR}/pmt
+    COMPONENT "runtime_devel"
+)
+
+include(AddFileDependencies)
+ADD_FILE_DEPENDENCIES(
+    ${CMAKE_CURRENT_SOURCE_DIR}/pmt_serialize.cc
+    ${PMT_SERIAL_TAGS_H}
+)
+
+add_custom_target(pmt_generated DEPENDS ${PMT_SERIAL_TAGS_H})
+
+########################################################################
+# Generate other pmt stuff
+########################################################################
+add_custom_command(
+    OUTPUT
+        ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv_int.h
+        ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.h
+        ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv.cc
+        ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.cc
+    DEPENDS
+        ${CMAKE_CURRENT_SOURCE_DIR}/generate_unv.py
+        ${CMAKE_CURRENT_SOURCE_DIR}/unv_template.h.t
+        ${CMAKE_CURRENT_SOURCE_DIR}/unv_template.cc.t
+        ${CMAKE_CURRENT_SOURCE_DIR}/unv_qa_template.cc.t
+    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} -c
+    \"import os,sys\;srcdir='${CMAKE_CURRENT_SOURCE_DIR}'\;sys.path.append(srcdir)\;os.environ['srcdir']=srcdir\;from generate_unv import main\;main()\"
+    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+list(APPEND gnuradio_runtime_sources
+    ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv.cc
+    ${CMAKE_CURRENT_SOURCE_DIR}/pmt.cc
+    ${CMAKE_CURRENT_SOURCE_DIR}/pmt_io.cc
+    ${CMAKE_CURRENT_SOURCE_DIR}/pmt_pool.cc
+    ${CMAKE_CURRENT_SOURCE_DIR}/pmt_serialize.cc
+)
+
+if(ENABLE_TESTING)
+  list(APPEND test_gnuradio_runtime_sources
+    ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.cc
+    ${CMAKE_CURRENT_SOURCE_DIR}/qa_pmt_prims.cc
+    ${CMAKE_CURRENT_SOURCE_DIR}/qa_pmt.cc
+    )
+endif(ENABLE_TESTING)
diff --git a/gnuradio-runtime/lib/pmt/gen-serial-tags.py b/gnuradio-runtime/lib/pmt/gen-serial-tags.py
new file mode 100644
index 0000000000..18e927beb5
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/gen-serial-tags.py
@@ -0,0 +1,53 @@
+"""
+//
+// Copyright 2011 Free Software Foundation, Inc.
+//
+// This file is part of GNU Radio
+//
+// GNU Radio is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GNU Radio is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+//
+// THIS FILE IS MACHINE GENERATED FROM %s. DO NOT EDIT BY HAND.
+// See %s for additional commentary.
+//
+
+#ifndef INCLUDED_PMT_SERIAL_TAGS_H
+#define INCLUDED_PMT_SERIAL_TAGS_H
+
+enum pst_tags {
+%s
+};
+#endif /* INCLUDED_PMT_SERIAL_TAGS_H */
+"""
+
+import sys, os, re
+
+if __name__ == '__main__':
+    if len(sys.argv) != 3:
+        print "Usage %s <input_scm_file> <output_hdr_file>"%__file__
+        exit()
+    input_scm_file, output_hdr_file = sys.argv[1:]
+    enums = list()
+    for line in open(input_scm_file).readlines():
+        match = re.match('^\s*\(define\s+([\w|-]+)\s+#x([0-9a-fA-F]+)\)', line)
+        if not match: continue
+        name, value = match.groups()
+        name = name.upper().replace('-', '_')
+        enums.append('    %s = 0x%s'%(name, value))
+    open(output_hdr_file, 'w').write(__doc__%(
+        os.path.basename(__file__),
+        os.path.basename(input_scm_file),
+        ',\n'.join(enums),
+    ))
diff --git a/gnuradio-runtime/lib/pmt/generate_unv.py b/gnuradio-runtime/lib/pmt/generate_unv.py
new file mode 100755
index 0000000000..7562df46f8
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/generate_unv.py
@@ -0,0 +1,190 @@
+#!/usr/bin/env python
+#
+# Copyright 2006,2009 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+"""
+Generate code for uniform numeric vectors
+"""
+
+import re, os, os.path
+
+
+unv_types = (
+    ('u8', 'uint8_t'),
+    ('s8', 'int8_t'),
+    ('u16', 'uint16_t'),
+    ('s16', 'int16_t'),
+    ('u32', 'uint32_t'),
+    ('s32', 'int32_t'),
+    ('u64', 'uint64_t'),
+    ('s64', 'int64_t'),
+    ('f32', 'float'),
+    ('f64', 'double'),
+    ('c32', 'std::complex<float>'),
+    ('c64', 'std::complex<double>')
+    )
+
+header = """\
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+"""
+
+guard_tail = """
+#endif
+"""
+
+includes = """
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <vector>
+#include <pmt/pmt.h>
+#include "pmt_int.h"
+"""
+
+qa_includes = """
+#include <qa_pmt_unv.h>
+#include <cppunit/TestAssert.h>
+#include <pmt/pmt.h>
+#include <stdio.h>
+
+using namespace pmt;
+"""
+
+
+# set srcdir to the directory that contains Makefile.am
+try:
+    srcdir = os.environ['srcdir']
+except KeyError, e:
+    srcdir = "."
+srcdir = srcdir + '/'
+
+
+def open_src (name, mode):
+    global srcdir
+    return open(os.path.join (srcdir, name), mode)
+
+
+def guard_name(filename):
+    return 'INCLUDED_' + re.sub('\.', '_', filename.upper())
+
+def guard_head(filename):
+    guard = guard_name(filename)
+    return """
+#ifndef %s
+#define %s
+""" % (guard, guard)
+
+
+def do_substitution (d, input, out_file):
+    def repl (match_obj):
+        key = match_obj.group (1)
+        # print key
+        return d[key]
+
+    out = re.sub (r"@([a-zA-Z0-9_]+)@", repl, input)
+    out_file.write (out)
+
+
+def generate_h():
+    template = open_src('unv_template.h.t', 'r').read()
+    output_filename = 'pmt_unv_int.h'
+    output = open(output_filename, 'w')
+    output.write(header)
+    output.write(guard_head(output_filename))
+    for tag, typ in unv_types:
+        d = { 'TAG' : tag, 'TYPE' : typ }
+        do_substitution(d, template, output)
+    output.write(guard_tail)
+
+def generate_cc():
+    template = open_src('unv_template.cc.t', 'r').read()
+    output = open('pmt_unv.cc', 'w')
+    output.write(header)
+    output.write(includes)
+    for tag, typ in unv_types:
+        d = { 'TAG' : tag, 'TYPE' : typ }
+        do_substitution(d, template, output)
+
+
+def generate_qa_h():
+    output_filename = 'qa_pmt_unv.h'
+    output = open(output_filename, 'w')
+    output.write(header)
+    output.write(guard_head(output_filename))
+
+    output.write('''
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestCase.h>
+
+class qa_pmt_unv : public CppUnit::TestCase {
+
+  CPPUNIT_TEST_SUITE(qa_pmt_unv);
+''')
+    for tag, typ in unv_types:
+        output.write('  CPPUNIT_TEST(test_%svector);\n' % (tag,))
+    output.write('''\
+  CPPUNIT_TEST_SUITE_END();
+
+ private:
+''')
+    for tag, typ in unv_types:
+        output.write('  void test_%svector();\n' % (tag,))
+    output.write('};\n')
+    output.write(guard_tail)
+
+def generate_qa_cc():
+    template = open_src('unv_qa_template.cc.t', 'r').read()
+    output = open('qa_pmt_unv.cc', 'w')
+    output.write(header)
+    output.write(qa_includes)
+    for tag, typ in unv_types:
+        d = { 'TAG' : tag, 'TYPE' : typ }
+        do_substitution(d, template, output)
+
+
+def main():
+    generate_h()
+    generate_cc()
+    generate_qa_h()
+    generate_qa_cc()
+
+if __name__ == '__main__':
+    main()
diff --git a/gnuradio-runtime/lib/pmt/pmt-serial-tags.scm b/gnuradio-runtime/lib/pmt/pmt-serial-tags.scm
new file mode 100644
index 0000000000..4f06bf75f8
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/pmt-serial-tags.scm
@@ -0,0 +1,77 @@
+;;; -*-scheme-*-
+;;;
+;;; Copyright 2007 Free Software Foundation, Inc.
+;;;
+;;; This file is part of GNU Radio
+;;;
+;;; GNU Radio is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3, or (define at your option)
+;;; any later version.
+;;;
+;;; GNU Radio is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License along
+;;; with this program; if not, write to the Free Software Foundation, Inc.,
+;;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+;;;
+
+;;; definitions of tag values used for marshalling pmt data
+
+(define pst-true		#x00)
+(define pst-false		#x01)
+(define pst-symbol		#x02)   ; untagged-int16 n; followed by n bytes of symbol name
+(define pst-int32		#x03)
+(define pst-double		#x04)
+(define pst-complex		#x05)   ; complex<double>: real, imag
+(define pst-null		#x06)
+(define pst-pair		#x07)   ; followed by two objects
+(define pst-vector		#x08)   ; untagged-int32 n; followed by n objects
+(define pst-dict		#x09)   ; untagged-int32 n; followed by n key/value tuples
+
+(define pst-uniform-vector	#x0a)
+(define pst-uint64	#x0b)
+(define pst-tuple	#x0c)
+
+;; u8, s8, u16, s16, u32, s32, u64, s64, f32, f64, c32, c64
+;;
+;;   untagged-uint8  tag
+;;   untagged-uint8  uvi (define uniform vector info, see below)
+;;   untagged-int32  n-items
+;;   untagged-uint8  npad
+;;   npad bytes of zeros to align binary data
+;;   n-items binary numeric items
+;;
+;; uvi:
+;; +-+-+-+-+-+-+-+-+
+;; |B|   subtype   |
+;; +-+-+-+-+-+-+-+-+
+;;
+;; B == 0, numeric data is little-endian.
+;; B == 1, numeric data is big-endian.
+
+    (define uvi-endian-mask     #x80)
+    (define uvi-subtype-mask    #x7f)
+
+    (define uvi-little-endian   #x00)
+    (define uvi-big-endian      #x80)
+
+    (define uvi-u8		#x00)
+    (define uvi-s8		#x01)
+    (define uvi-u16		#x02)
+    (define uvi-s16		#x03)
+    (define uvi-u32		#x04)
+    (define uvi-s32		#x05)
+    (define uvi-u64		#x06)
+    (define uvi-s64		#x07)
+    (define uvi-f32		#x08)
+    (define uvi-f64		#x09)
+    (define uvi-c32		#x0a)
+    (define uvi-c64		#x0b)
+
+
+(define pst-comment		#x3b)	; ascii ';'
+(define pst-comment-end		#x0a)	; ascii '\n'
diff --git a/gnuradio-runtime/lib/pmt/pmt.cc b/gnuradio-runtime/lib/pmt/pmt.cc
new file mode 100644
index 0000000000..b6b3004331
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/pmt.cc
@@ -0,0 +1,1436 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009,2010 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <vector>
+#include <pmt/pmt.h>
+#include "pmt_int.h"
+#include <messages/msg_accepter.h>
+#include <pmt/pmt_pool.h>
+#include <stdio.h>
+#include <string.h>
+
+namespace pmt {
+
+static const int CACHE_LINE_SIZE = 64;		// good guess
+
+# if (PMT_LOCAL_ALLOCATOR)
+
+static pmt_pool global_pmt_pool(sizeof(pmt_pair), CACHE_LINE_SIZE);
+
+void *
+pmt_base::operator new(size_t size)
+{
+  void *p = global_pmt_pool.malloc();
+
+  // fprintf(stderr, "pmt_base::new p = %p\n", p);
+  assert((reinterpret_cast<intptr_t>(p) & (CACHE_LINE_SIZE - 1)) == 0);
+  return p;
+}
+
+void
+pmt_base::operator delete(void *p, size_t size)
+{
+  global_pmt_pool.free(p);
+}
+
+#endif
+
+void intrusive_ptr_add_ref(pmt_base* p) { ++(p->count_); }
+void intrusive_ptr_release(pmt_base* p) { if (--(p->count_) == 0 ) delete p; }
+
+pmt_base::~pmt_base()
+{
+  // nop -- out of line virtual destructor
+}
+
+////////////////////////////////////////////////////////////////////////////
+//                         Exceptions
+////////////////////////////////////////////////////////////////////////////
+
+exception::exception(const std::string &msg, pmt_t obj)
+  : logic_error(msg + ": " + write_string(obj))
+{
+}
+
+wrong_type::wrong_type(const std::string &msg, pmt_t obj)
+  : exception(msg + ": wrong_type ", obj)
+{
+}
+
+out_of_range::out_of_range(const std::string &msg, pmt_t obj)
+  : exception(msg + ": out of range ", obj)
+{
+}
+
+notimplemented::notimplemented(const std::string &msg, pmt_t obj)
+  : exception(msg + ": notimplemented ", obj)
+{
+}
+
+////////////////////////////////////////////////////////////////////////////
+//                          Dynamic Casts
+////////////////////////////////////////////////////////////////////////////
+
+static pmt_symbol *
+_symbol(pmt_t x)
+{
+  return dynamic_cast<pmt_symbol*>(x.get());
+}
+
+static pmt_integer *
+_integer(pmt_t x)
+{
+  return dynamic_cast<pmt_integer*>(x.get());
+}
+
+static pmt_uint64 *
+_uint64(pmt_t x)
+{
+  return dynamic_cast<pmt_uint64*>(x.get());
+}
+
+static pmt_real *
+_real(pmt_t x)
+{
+  return dynamic_cast<pmt_real*>(x.get());
+}
+
+static pmt_complex *
+_complex(pmt_t x)
+{
+  return dynamic_cast<pmt_complex*>(x.get());
+}
+
+static pmt_pair *
+_pair(pmt_t x)
+{
+  return dynamic_cast<pmt_pair*>(x.get());
+}
+
+static pmt_vector *
+_vector(pmt_t x)
+{
+  return dynamic_cast<pmt_vector*>(x.get());
+}
+
+static pmt_tuple *
+_tuple(pmt_t x)
+{
+  return dynamic_cast<pmt_tuple*>(x.get());
+}
+
+static pmt_uniform_vector *
+_uniform_vector(pmt_t x)
+{
+  return dynamic_cast<pmt_uniform_vector*>(x.get());
+}
+
+static pmt_any *
+_any(pmt_t x)
+{
+  return dynamic_cast<pmt_any*>(x.get());
+}
+
+////////////////////////////////////////////////////////////////////////////
+//                           Globals
+////////////////////////////////////////////////////////////////////////////
+
+const pmt_t PMT_T = pmt_t(new pmt_bool());	// singleton
+const pmt_t PMT_F = pmt_t(new pmt_bool());	// singleton
+const pmt_t PMT_NIL = pmt_t(new pmt_null());	// singleton
+const pmt_t PMT_EOF = cons(PMT_NIL, PMT_NIL);           // singleton
+
+////////////////////////////////////////////////////////////////////////////
+//                           Booleans
+////////////////////////////////////////////////////////////////////////////
+
+pmt_bool::pmt_bool(){}
+
+bool
+is_true(pmt_t obj)
+{
+  return obj != PMT_F;
+}
+
+bool
+is_false(pmt_t obj)
+{
+  return obj == PMT_F;
+}
+
+bool
+is_bool(pmt_t obj)
+{
+  return obj->is_bool();
+}
+
+pmt_t
+from_bool(bool val)
+{
+  return val ? PMT_T : PMT_F;
+}
+
+bool
+to_bool(pmt_t val)
+{
+  if (val == PMT_T)
+    return true;
+  if (val == PMT_F)
+    return false;
+  throw wrong_type("pmt_to_bool", val);
+}
+
+////////////////////////////////////////////////////////////////////////////
+//                             Symbols
+////////////////////////////////////////////////////////////////////////////
+
+static const unsigned int SYMBOL_HASH_TABLE_SIZE = 701;
+static std::vector<pmt_t> s_symbol_hash_table(SYMBOL_HASH_TABLE_SIZE);
+
+pmt_symbol::pmt_symbol(const std::string &name) : d_name(name){}
+
+
+static unsigned int
+hash_string(const std::string &s)
+{
+  unsigned int h = 0;
+  unsigned int g = 0;
+
+  for (std::string::const_iterator p = s.begin(); p != s.end(); ++p){
+    h = (h << 4) + (*p & 0xff);
+    g = h & 0xf0000000;
+    if (g){
+      h = h ^ (g >> 24);
+      h = h ^ g;
+    }
+  }
+  return h;
+}
+
+bool
+is_symbol(const pmt_t& obj)
+{
+  return obj->is_symbol();
+}
+
+pmt_t
+string_to_symbol(const std::string &name)
+{
+  unsigned hash = hash_string(name) % SYMBOL_HASH_TABLE_SIZE;
+
+  // Does a symbol with this name already exist?
+  for (pmt_t sym = s_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(s_symbol_hash_table[hash]);
+  s_symbol_hash_table[hash] = sym;
+  return sym;
+}
+
+// alias...
+pmt_t
+intern(const std::string &name)
+{
+  return string_to_symbol(name);
+}
+
+const std::string
+symbol_to_string(const pmt_t& sym)
+{
+  if (!sym->is_symbol())
+    throw wrong_type("pmt_symbol_to_string", sym);
+
+  return _symbol(sym)->name();
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////
+//                             Number
+////////////////////////////////////////////////////////////////////////////
+
+bool
+is_number(pmt_t x)
+{
+  return x->is_number();
+}
+
+////////////////////////////////////////////////////////////////////////////
+//                             Integer
+////////////////////////////////////////////////////////////////////////////
+
+pmt_integer::pmt_integer(long value) : d_value(value) {}
+
+bool
+is_integer(pmt_t x)
+{
+  return x->is_integer();
+}
+
+
+pmt_t
+from_long(long x)
+{
+  return pmt_t(new pmt_integer(x));
+}
+
+long
+to_long(pmt_t x)
+{
+  pmt_integer* i = dynamic_cast<pmt_integer*>(x.get());
+  if ( i )
+    return i->value();
+
+  throw wrong_type("pmt_to_long", x);
+}
+
+////////////////////////////////////////////////////////////////////////////
+//                             Uint64
+////////////////////////////////////////////////////////////////////////////
+
+pmt_uint64::pmt_uint64(uint64_t value) : d_value(value) {}
+
+bool
+is_uint64(pmt_t x)
+{
+  return x->is_uint64();
+}
+
+
+pmt_t
+from_uint64(uint64_t x)
+{
+  return pmt_t(new pmt_uint64(x));
+}
+
+uint64_t
+to_uint64(pmt_t x)
+{
+  if(x->is_uint64())
+    return _uint64(x)->value();
+  if(x->is_integer())
+    {
+    long tmp = _integer(x)->value();
+    if(tmp >= 0)
+        return (uint64_t) tmp;
+    }
+
+  throw wrong_type("pmt_to_uint64", x);
+}
+
+////////////////////////////////////////////////////////////////////////////
+//                              Real
+////////////////////////////////////////////////////////////////////////////
+
+pmt_real::pmt_real(double value) : d_value(value) {}
+
+bool
+is_real(pmt_t x)
+{
+  return x->is_real();
+}
+
+pmt_t
+from_double(double x)
+{
+  return pmt_t(new pmt_real(x));
+}
+
+double
+to_double(pmt_t x)
+{
+  if (x->is_real())
+    return _real(x)->value();
+  if (x->is_integer())
+    return _integer(x)->value();
+
+  throw wrong_type("pmt_to_double", x);
+}
+
+////////////////////////////////////////////////////////////////////////////
+//                              Complex
+////////////////////////////////////////////////////////////////////////////
+
+pmt_complex::pmt_complex(std::complex<double> value) : d_value(value) {}
+
+bool
+is_complex(pmt_t x)
+{
+  return x->is_complex();
+}
+
+pmt_t
+make_rectangular(double re, double im)
+{
+  return from_complex(re, im);
+}
+
+pmt_t
+from_complex(double re, double im)
+{
+  return pmt_from_complex(re, im);
+}
+
+pmt_t pmt_from_complex(double re, double im)
+{
+  return pmt_t(new pmt_complex(std::complex<double>(re, im)));
+}
+
+pmt_t
+from_complex(const std::complex<double> &z)
+{
+  return pmt_t(new pmt_complex(z));
+}
+
+std::complex<double>
+to_complex(pmt_t x)
+{
+  if (x->is_complex())
+    return _complex(x)->value();
+  if (x->is_real())
+    return _real(x)->value();
+  if (x->is_integer())
+    return _integer(x)->value();
+
+  throw wrong_type("pmt_to_complex", x);
+}
+
+////////////////////////////////////////////////////////////////////////////
+//                              Pairs
+////////////////////////////////////////////////////////////////////////////
+
+pmt_null::pmt_null() {}
+pmt_pair::pmt_pair(const pmt_t& car, const pmt_t& cdr) : d_car(car), d_cdr(cdr) {}
+
+bool
+is_null(const pmt_t& x)
+{
+  return x == PMT_NIL;
+}
+
+bool
+is_pair(const pmt_t& obj)
+{
+  return obj->is_pair();
+}
+
+pmt_t
+cons(const pmt_t& x, const pmt_t& y)
+{
+  return pmt_t(new pmt_pair(x, y));
+}
+
+pmt_t
+car(const pmt_t& pair)
+{
+  pmt_pair* p = dynamic_cast<pmt_pair*>(pair.get());
+  if ( p )
+    return p->car();
+
+  throw wrong_type("pmt_car", pair);
+}
+
+pmt_t
+cdr(const pmt_t& pair)
+{
+  pmt_pair* p = dynamic_cast<pmt_pair*>(pair.get());
+  if ( p )
+    return p->cdr();
+
+  throw wrong_type("pmt_cdr", pair);
+}
+
+void
+set_car(pmt_t pair, pmt_t obj)
+{
+  if (pair->is_pair())
+    _pair(pair)->set_car(obj);
+  else
+    throw wrong_type("pmt_set_car", pair);
+}
+
+void
+set_cdr(pmt_t pair, pmt_t obj)
+{
+  if (pair->is_pair())
+    _pair(pair)->set_cdr(obj);
+  else
+    throw wrong_type("pmt_set_cdr", pair);
+}
+
+////////////////////////////////////////////////////////////////////////////
+//                             Vectors
+////////////////////////////////////////////////////////////////////////////
+
+pmt_vector::pmt_vector(size_t len, pmt_t fill)
+  : d_v(len)
+{
+  for (size_t i = 0; i < len; i++)
+    d_v[i] = fill;
+}
+
+pmt_t
+pmt_vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_vector::set(size_t k, pmt_t obj)
+{
+  if (k >= length())
+    throw out_of_range("pmt_vector_set", from_long(k));
+  d_v[k] = obj;
+}
+
+void
+pmt_vector::fill(pmt_t obj)
+{
+  for (size_t i = 0; i < length(); i++)
+    d_v[i] = obj;
+}
+
+bool
+is_vector(pmt_t obj)
+{
+  return obj->is_vector();
+}
+
+pmt_t
+make_vector(size_t k, pmt_t fill)
+{
+  return pmt_t(new pmt_vector(k, fill));
+}
+
+pmt_t
+vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_vector())
+    throw wrong_type("pmt_vector_ref", vector);
+  return _vector(vector)->ref(k);
+}
+
+void
+vector_set(pmt_t vector, size_t k, pmt_t obj)
+{
+  if (!vector->is_vector())
+    throw wrong_type("pmt_vector_set", vector);
+  _vector(vector)->set(k, obj);
+}
+
+void
+vector_fill(pmt_t vector, pmt_t obj)
+{
+  if (!vector->is_vector())
+    throw wrong_type("pmt_vector_set", vector);
+  _vector(vector)->fill(obj);
+}
+
+////////////////////////////////////////////////////////////////////////////
+//                             Tuples
+////////////////////////////////////////////////////////////////////////////
+
+pmt_tuple::pmt_tuple(size_t len)
+  : d_v(len)
+{
+}
+
+pmt_t
+pmt_tuple::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_tuple_ref", from_long(k));
+  return d_v[k];
+}
+
+bool
+is_tuple(pmt_t obj)
+{
+  return obj->is_tuple();
+}
+
+pmt_t
+tuple_ref(const pmt_t &tuple, size_t k)
+{
+  if (!tuple->is_tuple())
+    throw wrong_type("pmt_tuple_ref", tuple);
+  return _tuple(tuple)->ref(k);
+}
+
+// for (i=0; i < 10; i++)
+//   make_constructor()
+
+pmt_t
+make_tuple()
+{
+  return pmt_t(new pmt_tuple(0));
+}
+
+pmt_t
+make_tuple(const pmt_t &e0)
+{
+  pmt_tuple *t = new pmt_tuple(1);
+  t->_set(0, e0);
+  return pmt_t(t);
+}
+
+pmt_t
+make_tuple(const pmt_t &e0, const pmt_t &e1)
+{
+  pmt_tuple *t = new pmt_tuple(2);
+  t->_set(0, e0);
+  t->_set(1, e1);
+  return pmt_t(t);
+}
+
+pmt_t
+make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2)
+{
+  pmt_tuple *t = new pmt_tuple(3);
+  t->_set(0, e0);
+  t->_set(1, e1);
+  t->_set(2, e2);
+  return pmt_t(t);
+}
+
+pmt_t
+make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3)
+{
+  pmt_tuple *t = new pmt_tuple(4);
+  t->_set(0, e0);
+  t->_set(1, e1);
+  t->_set(2, e2);
+  t->_set(3, e3);
+  return pmt_t(t);
+}
+
+pmt_t
+make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4)
+{
+  pmt_tuple *t = new pmt_tuple(5);
+  t->_set(0, e0);
+  t->_set(1, e1);
+  t->_set(2, e2);
+  t->_set(3, e3);
+  t->_set(4, e4);
+  return pmt_t(t);
+}
+
+pmt_t
+make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5)
+{
+  pmt_tuple *t = new pmt_tuple(6);
+  t->_set(0, e0);
+  t->_set(1, e1);
+  t->_set(2, e2);
+  t->_set(3, e3);
+  t->_set(4, e4);
+  t->_set(5, e5);
+  return pmt_t(t);
+}
+
+pmt_t
+make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6)
+{
+  pmt_tuple *t = new pmt_tuple(7);
+  t->_set(0, e0);
+  t->_set(1, e1);
+  t->_set(2, e2);
+  t->_set(3, e3);
+  t->_set(4, e4);
+  t->_set(5, e5);
+  t->_set(6, e6);
+  return pmt_t(t);
+}
+
+pmt_t
+make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7)
+{
+  pmt_tuple *t = new pmt_tuple(8);
+  t->_set(0, e0);
+  t->_set(1, e1);
+  t->_set(2, e2);
+  t->_set(3, e3);
+  t->_set(4, e4);
+  t->_set(5, e5);
+  t->_set(6, e6);
+  t->_set(7, e7);
+  return pmt_t(t);
+}
+
+pmt_t
+make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8)
+{
+  pmt_tuple *t = new pmt_tuple(9);
+  t->_set(0, e0);
+  t->_set(1, e1);
+  t->_set(2, e2);
+  t->_set(3, e3);
+  t->_set(4, e4);
+  t->_set(5, e5);
+  t->_set(6, e6);
+  t->_set(7, e7);
+  t->_set(8, e8);
+  return pmt_t(t);
+}
+
+pmt_t
+make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8, const pmt_t &e9)
+{
+  pmt_tuple *t = new pmt_tuple(10);
+  t->_set(0, e0);
+  t->_set(1, e1);
+  t->_set(2, e2);
+  t->_set(3, e3);
+  t->_set(4, e4);
+  t->_set(5, e5);
+  t->_set(6, e6);
+  t->_set(7, e7);
+  t->_set(8, e8);
+  t->_set(9, e9);
+  return pmt_t(t);
+}
+
+pmt_t
+to_tuple(const pmt_t &x)
+{
+  if (x->is_tuple())		// already one
+    return x;
+
+  size_t len = length(x);
+  pmt_tuple *t = new pmt_tuple(len);
+  pmt_t r = pmt_t(t);
+
+  if (x->is_vector()){
+    for (size_t i = 0; i < len; i++)
+      t->_set(i, _vector(x)->ref(i));
+    return r;
+  }
+
+  if (x->is_pair()){
+    pmt_t y = x;
+    for (size_t i = 0; i < len; i++){
+      t->_set(i, car(y));
+      y = cdr(y);
+    }
+    return r;
+  }
+
+  throw wrong_type("pmt_to_tuple", x);
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////
+//                       Uniform Numeric Vectors
+////////////////////////////////////////////////////////////////////////////
+
+bool
+is_uniform_vector(pmt_t x)
+{
+  return x->is_uniform_vector();
+}
+
+const void *
+uniform_vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_uniform_vector())
+    throw wrong_type("pmt_uniform_vector_elements", vector);
+  return _uniform_vector(vector)->uniform_elements(len);
+}
+
+void *
+uniform_vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_uniform_vector())
+    throw wrong_type("pmt_uniform_vector_writable_elements", vector);
+  return _uniform_vector(vector)->uniform_writable_elements(len);
+}
+
+////////////////////////////////////////////////////////////////////////////
+//                            Dictionaries
+////////////////////////////////////////////////////////////////////////////
+
+/*
+ * This is an a-list implementation.
+ *
+ * When we need better performance for large dictionaries, consider implementing
+ * persistent Red-Black trees as described in "Purely Functional Data Structures",
+ * Chris Okasaki, 1998, section 3.3.
+ */
+
+bool
+is_dict(const pmt_t &obj)
+{
+  return is_null(obj) || is_pair(obj);
+}
+
+pmt_t
+make_dict()
+{
+  return PMT_NIL;
+}
+
+pmt_t
+dict_add(const pmt_t &dict, const pmt_t &key, const pmt_t &value)
+{
+  if (is_null(dict))
+    return acons(key, value, PMT_NIL);
+
+  if (dict_has_key(dict, key))
+    return acons(key, value, dict_delete(dict, key));
+
+  return acons(key, value, dict);
+}
+
+pmt_t
+dict_delete(const pmt_t &dict, const pmt_t &key)
+{
+  if (is_null(dict))
+    return dict;
+
+  if (eqv(caar(dict), key))
+    return cdr(dict);
+
+  return cons(car(dict), dict_delete(cdr(dict), key));
+}
+
+pmt_t
+dict_ref(const pmt_t &dict, const pmt_t &key, const pmt_t &not_found)
+{
+  pmt_t	p = assv(key, dict);	// look for (key . value) pair
+  if (is_pair(p))
+    return cdr(p);
+  else
+    return not_found;
+}
+
+bool
+dict_has_key(const pmt_t &dict, const pmt_t &key)
+{
+  return is_pair(assv(key, dict));
+}
+
+pmt_t
+dict_items(pmt_t dict)
+{
+  if (!is_dict(dict))
+    throw wrong_type("pmt_dict_values", dict);
+
+  return dict;		// equivalent to dict in the a-list case
+}
+
+pmt_t
+dict_keys(pmt_t dict)
+{
+  if (!is_dict(dict))
+    throw wrong_type("pmt_dict_keys", dict);
+
+  return map(car, dict);
+}
+
+pmt_t
+dict_values(pmt_t dict)
+{
+  if (!is_dict(dict))
+    throw wrong_type("pmt_dict_keys", dict);
+
+  return map(cdr, dict);
+}
+
+////////////////////////////////////////////////////////////////////////////
+//                                 Any
+////////////////////////////////////////////////////////////////////////////
+
+pmt_any::pmt_any(const boost::any &any) : d_any(any) {}
+
+bool
+is_any(pmt_t obj)
+{
+  return obj->is_any();
+}
+
+pmt_t
+make_any(const boost::any &any)
+{
+  return pmt_t(new pmt_any(any));
+}
+
+boost::any
+any_ref(pmt_t obj)
+{
+  if (!obj->is_any())
+    throw wrong_type("pmt_any_ref", obj);
+  return _any(obj)->ref();
+}
+
+void
+any_set(pmt_t obj, const boost::any &any)
+{
+  if (!obj->is_any())
+    throw wrong_type("pmt_any_set", obj);
+  _any(obj)->set(any);
+}
+
+////////////////////////////////////////////////////////////////////////////
+//               msg_accepter -- built from "any"
+////////////////////////////////////////////////////////////////////////////
+
+bool
+is_msg_accepter(const pmt_t &obj)
+{
+  if (!is_any(obj))
+    return false;
+
+  boost::any r = any_ref(obj);
+  return boost::any_cast<gr::messages::msg_accepter_sptr>(&r) != 0;
+}
+
+//! make a msg_accepter
+pmt_t
+make_msg_accepter(gr::messages::msg_accepter_sptr ma)
+{
+  return make_any(ma);
+}
+
+//! Return underlying msg_accepter
+gr::messages::msg_accepter_sptr
+msg_accepter_ref(const pmt_t &obj)
+{
+  try {
+    return boost::any_cast<gr::messages::msg_accepter_sptr>(any_ref(obj));
+  }
+  catch (boost::bad_any_cast &e){
+    throw wrong_type("pmt_msg_accepter_ref", obj);
+  }
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+//             Binary Large Object -- currently a u8vector
+////////////////////////////////////////////////////////////////////////////
+
+bool
+is_blob(pmt_t x)
+{
+  // return is_u8vector(x);
+  return is_uniform_vector(x);
+}
+
+pmt_t
+make_blob(const void *buf, size_t len_in_bytes)
+{
+  return init_u8vector(len_in_bytes, (const uint8_t *) buf);
+}
+
+const void *
+blob_data(pmt_t blob)
+{
+  size_t len;
+  return uniform_vector_elements(blob, len);
+}
+
+size_t
+blob_length(pmt_t blob)
+{
+  size_t len;
+  uniform_vector_elements(blob, len);
+  return len;
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+//                          General Functions
+////////////////////////////////////////////////////////////////////////////
+
+bool
+eq(const pmt_t& x, const pmt_t& y)
+{
+  return x == y;
+}
+
+bool
+eqv(const pmt_t& x, const pmt_t& y)
+{
+  if (x == y)
+    return true;
+
+  if (x->is_integer() && y->is_integer())
+    return _integer(x)->value() == _integer(y)->value();
+
+  if (x->is_uint64() && y->is_uint64())
+    return _uint64(x)->value() == _uint64(y)->value();
+
+  if (x->is_real() && y->is_real())
+    return _real(x)->value() == _real(y)->value();
+
+  if (x->is_complex() && y->is_complex())
+    return _complex(x)->value() == _complex(y)->value();
+
+  return false;
+}
+
+bool
+eqv_raw(pmt_base *x, pmt_base *y)
+{
+  if (x == y)
+    return true;
+
+  if (x->is_integer() && y->is_integer())
+    return _integer(x)->value() == _integer(y)->value();
+
+  if (x->is_uint64() && y->is_uint64())
+    return _uint64(x)->value() == _uint64(y)->value();
+
+  if (x->is_real() && y->is_real())
+    return _real(x)->value() == _real(y)->value();
+
+  if (x->is_complex() && y->is_complex())
+    return _complex(x)->value() == _complex(y)->value();
+
+  return false;
+}
+
+bool
+equal(const pmt_t& x, const pmt_t& y)
+{
+  if (eqv(x, y))
+    return true;
+
+  if (x->is_pair() && y->is_pair())
+    return equal(car(x), car(y)) && equal(cdr(x), cdr(y));
+
+  if (x->is_vector() && y->is_vector()){
+    pmt_vector *xv = _vector(x);
+    pmt_vector *yv = _vector(y);
+    if (xv->length() != yv->length())
+      return false;
+
+    for (unsigned i = 0; i < xv->length(); i++)
+      if (!equal(xv->_ref(i), yv->_ref(i)))
+	return false;
+
+    return true;
+  }
+
+  if (x->is_tuple() && y->is_tuple()){
+    pmt_tuple *xv = _tuple(x);
+    pmt_tuple *yv = _tuple(y);
+    if (xv->length() != yv->length())
+      return false;
+
+    for (unsigned i = 0; i < xv->length(); i++)
+      if (!equal(xv->_ref(i), yv->_ref(i)))
+	return false;
+
+    return true;
+  }
+
+  if (x->is_uniform_vector() && y->is_uniform_vector()){
+    pmt_uniform_vector *xv = _uniform_vector(x);
+    pmt_uniform_vector *yv = _uniform_vector(y);
+    if (xv->length() != yv->length())
+      return false;
+
+    size_t len_x, len_y;
+    if (memcmp(xv->uniform_elements(len_x),
+	       yv->uniform_elements(len_y),
+	       len_x) == 0)
+      return true;
+
+    return true;
+  }
+
+  // FIXME add other cases here...
+
+  return false;
+}
+
+size_t
+length(const pmt_t& x)
+{
+  if (x->is_vector())
+    return _vector(x)->length();
+
+  if (x->is_uniform_vector())
+    return _uniform_vector(x)->length();
+
+  if (x->is_tuple())
+    return _tuple(x)->length();
+
+  if (x->is_null())
+    return 0;
+
+  if (x->is_pair()) {
+    size_t length=1;
+    pmt_t it = cdr(x);
+    while (is_pair(it)){
+      length++;
+      it = cdr(it);
+    }
+    if (is_null(it))
+      return length;
+
+    // not a proper list
+    throw wrong_type("pmt_length", x);
+  }
+
+  // FIXME dictionary length (number of entries)
+
+  throw wrong_type("pmt_length", x);
+}
+
+pmt_t
+assq(pmt_t obj, pmt_t alist)
+{
+  while (is_pair(alist)){
+    pmt_t p = car(alist);
+    if (!is_pair(p))	// malformed alist
+      return PMT_F;
+
+    if (eq(obj, car(p)))
+      return p;
+
+    alist = cdr(alist);
+  }
+  return PMT_F;
+}
+
+/*
+ * This avoids a bunch of shared_pointer reference count manipulation.
+ */
+pmt_t
+assv_raw(pmt_base *obj, pmt_base *alist)
+{
+  while (alist->is_pair()){
+    pmt_base *p = ((pmt_pair *)alist)->d_car.get();
+    if (!p->is_pair())		// malformed alist
+      return PMT_F;
+
+    if (eqv_raw(obj, ((pmt_pair *)p)->d_car.get()))
+      return ((pmt_pair *)alist)->d_car;
+
+    alist = (((pmt_pair *)alist)->d_cdr).get();
+  }
+  return PMT_F;
+}
+
+#if 1
+
+pmt_t
+assv(pmt_t obj, pmt_t alist)
+{
+  return assv_raw(obj.get(), alist.get());
+}
+
+#else
+
+pmt_t
+assv(pmt_t obj, pmt_t alist)
+{
+  while (is_pair(alist)){
+    pmt_t p = car(alist);
+    if (!is_pair(p))	// malformed alist
+      return PMT_F;
+
+    if (eqv(obj, car(p)))
+      return p;
+
+    alist = cdr(alist);
+  }
+  return PMT_F;
+}
+
+#endif
+
+
+pmt_t
+assoc(pmt_t obj, pmt_t alist)
+{
+  while (is_pair(alist)){
+    pmt_t p = car(alist);
+    if (!is_pair(p))	// malformed alist
+      return PMT_F;
+
+    if (equal(obj, car(p)))
+      return p;
+
+    alist = cdr(alist);
+  }
+  return PMT_F;
+}
+
+pmt_t
+map(pmt_t proc(const pmt_t&), pmt_t list)
+{
+  pmt_t r = PMT_NIL;
+
+  while(is_pair(list)){
+    r = cons(proc(car(list)), r);
+    list = cdr(list);
+  }
+
+  return reverse_x(r);
+}
+
+pmt_t
+reverse(pmt_t listx)
+{
+  pmt_t list = listx;
+  pmt_t r = PMT_NIL;
+
+  while(is_pair(list)){
+    r = cons(car(list), r);
+    list = cdr(list);
+  }
+  if (is_null(list))
+    return r;
+  else
+    throw wrong_type("pmt_reverse", listx);
+}
+
+pmt_t
+reverse_x(pmt_t list)
+{
+  // FIXME do it destructively
+  return reverse(list);
+}
+
+pmt_t
+nth(size_t n, pmt_t list)
+{
+  pmt_t t = nthcdr(n, list);
+  if (is_pair(t))
+    return car(t);
+  else
+    return PMT_NIL;
+}
+
+pmt_t
+nthcdr(size_t n, pmt_t list)
+{
+  if (!(is_pair(list) || is_null(list)))
+    throw wrong_type("pmt_nthcdr", list);
+
+  while (n > 0){
+    if (is_pair(list)){
+      list = cdr(list);
+      n--;
+      continue;
+    }
+    if (is_null(list))
+      return PMT_NIL;
+    else
+      throw wrong_type("pmt_nthcdr: not a LIST", list);
+  }
+  return list;
+}
+
+pmt_t
+memq(pmt_t obj, pmt_t list)
+{
+  while (is_pair(list)){
+    if (eq(obj, car(list)))
+      return list;
+    list = cdr(list);
+  }
+  return PMT_F;
+}
+
+pmt_t
+memv(pmt_t obj, pmt_t list)
+{
+  while (is_pair(list)){
+    if (eqv(obj, car(list)))
+      return list;
+    list = cdr(list);
+  }
+  return PMT_F;
+}
+
+pmt_t
+member(pmt_t obj, pmt_t list)
+{
+  while (is_pair(list)){
+    if (equal(obj, car(list)))
+      return list;
+    list = cdr(list);
+  }
+  return PMT_F;
+}
+
+bool
+subsetp(pmt_t list1, pmt_t list2)
+{
+  while (is_pair(list1)){
+    pmt_t p = car(list1);
+    if (is_false(memv(p, list2)))
+      return false;
+    list1 = cdr(list1);
+  }
+  return true;
+}
+
+pmt_t
+list1(const pmt_t& x1)
+{
+  return cons(x1, PMT_NIL);
+}
+
+pmt_t
+list2(const pmt_t& x1, const pmt_t& x2)
+{
+  return cons(x1, cons(x2, PMT_NIL));
+}
+
+pmt_t
+list3(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3)
+{
+  return cons(x1, cons(x2, cons(x3, PMT_NIL)));
+}
+
+pmt_t
+list4(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4)
+{
+  return cons(x1, cons(x2, cons(x3, cons(x4, PMT_NIL))));
+}
+
+pmt_t
+list5(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4, const pmt_t& x5)
+{
+  return cons(x1, cons(x2, cons(x3, cons(x4, cons(x5, PMT_NIL)))));
+}
+
+pmt_t
+list6(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4, const pmt_t& x5, const pmt_t& x6)
+{
+  return cons(x1, cons(x2, cons(x3, cons(x4, cons(x5, cons(x6, PMT_NIL))))));
+}
+
+pmt_t
+list_add(pmt_t list, const pmt_t& item)
+{
+  return reverse(cons(item, reverse(list)));
+}
+
+pmt_t
+list_rm(pmt_t list, const pmt_t& item)
+{
+  if(is_pair(list)){
+    pmt_t left = car(list);
+    pmt_t right = cdr(list);
+    if(!equal(left, item)){
+        return cons(left, list_rm(right, item));
+        } else {
+        return list_rm(right, item);
+        }
+    } else {
+      return list;
+    }
+}
+
+bool
+list_has(pmt_t list, const pmt_t& item)
+{
+  if(is_pair(list)){
+    pmt_t left = car(list);
+    pmt_t right = cdr(list);
+    if(equal(left,item))
+        return true;
+    return list_has(right, item);   
+  } else {
+    if(is_null(list))
+        return false;
+    throw std::runtime_error("list contains invalid format!");
+  }
+}
+
+pmt_t
+caar(pmt_t pair)
+{
+  return (car(car(pair)));
+}
+
+pmt_t
+cadr(pmt_t pair)
+{
+  return car(cdr(pair));
+}
+
+pmt_t
+cdar(pmt_t pair)
+{
+  return cdr(car(pair));
+}
+
+pmt_t
+cddr(pmt_t pair)
+{
+  return cdr(cdr(pair));
+}
+
+pmt_t
+caddr(pmt_t pair)
+{
+  return car(cdr(cdr(pair)));
+}
+
+pmt_t
+cadddr(pmt_t pair)
+{
+  return car(cdr(cdr(cdr(pair))));
+}
+
+bool
+is_eof_object(pmt_t obj)
+{
+  return eq(obj, PMT_EOF);
+}
+
+void
+dump_sizeof()
+{
+  printf("sizeof(pmt_t)              = %3zd\n", sizeof(pmt_t));
+  printf("sizeof(pmt_base)           = %3zd\n", sizeof(pmt_base));
+  printf("sizeof(pmt_bool)           = %3zd\n", sizeof(pmt_bool));
+  printf("sizeof(pmt_symbol)         = %3zd\n", sizeof(pmt_symbol));
+  printf("sizeof(pmt_integer)        = %3zd\n", sizeof(pmt_integer));
+  printf("sizeof(pmt_uint64)         = %3zd\n", sizeof(pmt_uint64));
+  printf("sizeof(pmt_real)           = %3zd\n", sizeof(pmt_real));
+  printf("sizeof(pmt_complex)        = %3zd\n", sizeof(pmt_complex));
+  printf("sizeof(pmt_null)           = %3zd\n", sizeof(pmt_null));
+  printf("sizeof(pmt_pair)           = %3zd\n", sizeof(pmt_pair));
+  printf("sizeof(pmt_vector)         = %3zd\n", sizeof(pmt_vector));
+  printf("sizeof(pmt_uniform_vector) = %3zd\n", sizeof(pmt_uniform_vector));
+}
+
+} /* namespace pmt */
diff --git a/gnuradio-runtime/lib/pmt/pmt_int.h b/gnuradio-runtime/lib/pmt/pmt_int.h
new file mode 100644
index 0000000000..aceb7b74d9
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/pmt_int.h
@@ -0,0 +1,247 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009,2010 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+#ifndef INCLUDED_PMT_INT_H
+#define INCLUDED_PMT_INT_H
+
+#include <pmt/pmt.h>
+#include <boost/utility.hpp>
+#include <boost/detail/atomic_count.hpp>
+
+/*
+ * EVERYTHING IN THIS FILE IS PRIVATE TO THE IMPLEMENTATION!
+ *
+ * See pmt.h for the public interface
+ */
+
+#define PMT_LOCAL_ALLOCATOR 0		// define to 0 or 1
+namespace pmt {
+
+class PMT_API pmt_base : boost::noncopyable {
+  mutable boost::detail::atomic_count count_;
+
+protected:
+  pmt_base() : count_(0) {};
+  virtual ~pmt_base();
+
+public:
+  virtual bool is_bool()    const { return false; }
+  virtual bool is_symbol()  const { return false; }
+  virtual bool is_number()  const { return false; }
+  virtual bool is_integer() const { return false; }
+  virtual bool is_uint64()  const { return false; }
+  virtual bool is_real()    const { return false; }
+  virtual bool is_complex() const { return false; }
+  virtual bool is_null()    const { return false; }
+  virtual bool is_pair()    const { return false; }
+  virtual bool is_tuple()   const { return false; }
+  virtual bool is_vector()  const { return false; }
+  virtual bool is_dict()    const { return false; }
+  virtual bool is_any()     const { return false; }
+
+  virtual bool is_uniform_vector() const { return false; }
+  virtual bool is_u8vector()  const { return false; }
+  virtual bool is_s8vector()  const { return false; }
+  virtual bool is_u16vector() const { return false; }
+  virtual bool is_s16vector() const { return false; }
+  virtual bool is_u32vector() const { return false; }
+  virtual bool is_s32vector() const { return false; }
+  virtual bool is_u64vector() const { return false; }
+  virtual bool is_s64vector() const { return false; }
+  virtual bool is_f32vector() const { return false; }
+  virtual bool is_f64vector() const { return false; }
+  virtual bool is_c32vector() const { return false; }
+  virtual bool is_c64vector() const { return false; }
+
+  friend void intrusive_ptr_add_ref(pmt_base* p);
+  friend void intrusive_ptr_release(pmt_base* p);
+
+# if (PMT_LOCAL_ALLOCATOR)
+  void *operator new(size_t);
+  void operator delete(void *, size_t);
+#endif
+};
+
+class pmt_bool : public pmt_base
+{
+public:
+  pmt_bool();
+  //~pmt_bool(){}
+
+  bool is_bool() const { return true; }
+};
+
+
+class pmt_symbol : public pmt_base
+{
+  std::string	d_name;
+  pmt_t		d_next;
+
+public:
+  pmt_symbol(const std::string &name);
+  //~pmt_symbol(){}
+
+  bool is_symbol() const { return true; }
+  const std::string name() { return d_name; }
+
+  pmt_t next() { return d_next; }		// symbol table link
+  void set_next(pmt_t next) { d_next = next; }
+};
+
+class pmt_integer : public pmt_base
+{
+public:
+  long		d_value;
+
+  pmt_integer(long value);
+  //~pmt_integer(){}
+
+  bool is_number()  const { return true; }
+  bool is_integer() const { return true; }
+  long value() const { return d_value; }
+};
+
+class pmt_uint64 : public pmt_base
+{
+public:
+  uint64_t		d_value;
+
+  pmt_uint64(uint64_t value);
+  //~pmt_uint64(){}
+
+  bool is_number()  const { return true; }
+  bool is_uint64() const { return true; }
+  uint64_t value() const { return d_value; }
+};
+
+class pmt_real : public pmt_base
+{
+public:
+  double	d_value;
+
+  pmt_real(double value);
+  //~pmt_real(){}
+
+  bool is_number()  const { return true; }
+  bool is_real() const { return true; }
+  double value() const { return d_value; }
+};
+
+class pmt_complex : public pmt_base
+{
+public:
+  std::complex<double>	d_value;
+
+  pmt_complex(std::complex<double> value);
+  //~pmt_complex(){}
+
+  bool is_number()  const { return true; }
+  bool is_complex() const { return true; }
+  std::complex<double> value() const { return d_value; }
+};
+
+class pmt_null  : public pmt_base
+{
+public:
+  pmt_null();
+  //~pmt_null(){}
+
+  bool is_null() const { return true; }
+};
+
+class pmt_pair : public pmt_base
+{
+public:
+  pmt_t		d_car;
+  pmt_t		d_cdr;
+
+  pmt_pair(const pmt_t& car, const pmt_t& cdr);
+  //~pmt_pair(){};
+
+  bool is_pair() const { return true; }
+  pmt_t car() const { return d_car; }
+  pmt_t cdr() const { return d_cdr; }
+
+  void set_car(pmt_t car) { d_car = car; }
+  void set_cdr(pmt_t cdr) { d_cdr = cdr; }
+};
+
+class pmt_vector : public pmt_base
+{
+  std::vector<pmt_t>	d_v;
+
+public:
+  pmt_vector(size_t len, pmt_t fill);
+  //~pmt_vector();
+
+  bool is_vector() const { return true; }
+  pmt_t ref(size_t k) const;
+  void  set(size_t k, pmt_t obj);
+  void  fill(pmt_t fill);
+  size_t length() const { return d_v.size(); }
+
+  pmt_t _ref(size_t k) const { return d_v[k]; }
+};
+
+class pmt_tuple : public pmt_base
+{
+  std::vector<pmt_t>	d_v;
+
+public:
+  pmt_tuple(size_t len);
+  //~pmt_tuple();
+
+  bool is_tuple() const { return true; }
+  pmt_t ref(size_t k) const;
+  size_t length() const { return d_v.size(); }
+
+  pmt_t _ref(size_t k) const { return d_v[k]; }
+  void _set(size_t k, pmt_t v) { d_v[k] = v; }
+};
+
+class pmt_any : public pmt_base
+{
+  boost::any	d_any;
+
+public:
+  pmt_any(const boost::any &any);
+  //~pmt_any();
+
+  bool is_any() const { return true; }
+  const boost::any &ref() const { return d_any; }
+  void  set(const boost::any &any) { d_any = any; }
+};
+
+
+class pmt_uniform_vector : public pmt_base
+{
+public:
+  bool is_uniform_vector() const { return true; }
+  virtual const void *uniform_elements(size_t &len) = 0;
+  virtual void *uniform_writable_elements(size_t &len) = 0;
+  virtual size_t length() const = 0;
+};
+
+#include "pmt_unv_int.h"
+
+} /* namespace pmt */
+
+#endif /* INCLUDED_PMT_INT_H */
diff --git a/gnuradio-runtime/lib/pmt/pmt_io.cc b/gnuradio-runtime/lib/pmt/pmt_io.cc
new file mode 100644
index 0000000000..17bdee408f
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/pmt_io.cc
@@ -0,0 +1,169 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <vector>
+#include <pmt/pmt.h>
+#include "pmt_int.h"
+#include <sstream>
+#include <iostream>
+
+namespace pmt {
+
+static void
+write_list_tail(pmt_t obj, std::ostream &port)
+{
+  write(car(obj), port); // write the car
+  obj = cdr(obj);		 // step to cdr
+
+  if (is_null(obj))		 // ()
+    port << ")";
+
+  else if (is_pair(obj)){	 // normal list
+    port << " ";
+    write_list_tail(obj, port);
+  }
+  else {			 // dotted pair
+    port << " . ";
+    write(obj, port);
+    port << ")";
+  }
+}
+
+void
+write(pmt_t obj, std::ostream &port)
+{
+  if (is_bool(obj)){
+    if (is_true(obj))
+      port << "#t";
+    else
+      port << "#f";
+  }
+  else if (is_symbol(obj)){
+    port << symbol_to_string(obj);
+  }
+  else if (is_number(obj)){
+    if (is_integer(obj))
+      port << to_long(obj);
+    else if (is_uint64(obj))
+      port << to_uint64(obj);
+    else if (is_real(obj))
+      port << to_double(obj);
+    else if (is_complex(obj)){
+      std::complex<double> c = to_complex(obj);
+      port << c.real() << '+' << c.imag() << 'i';
+    }
+    else
+      goto error;
+  }
+  else if (is_null(obj)){
+    port << "()";
+  }
+  else if (is_pair(obj)){
+    port << "(";
+    write_list_tail(obj, port);
+  }
+  else if (is_tuple(obj)){
+    port << "{";
+    size_t len = length(obj);
+    if (len > 0){
+      port << tuple_ref(obj, 0);
+      for (size_t i = 1; i < len; i++)
+	port << " " << tuple_ref(obj, i);
+    }
+    port << "}";
+  }
+  else if (is_vector(obj)){
+    port << "#(";
+    size_t len = length(obj);
+    if (len > 0){
+      port << vector_ref(obj, 0);
+      for (size_t i = 1; i < len; i++)
+	port << " " << vector_ref(obj, i);
+    }
+    port << ")";
+  }
+  else if (is_dict(obj)){
+    // FIXME
+    // port << "#<dict " << obj << ">";
+    port << "#<dict>";
+  }
+  else if (is_uniform_vector(obj)){
+    // FIXME
+    // port << "#<uniform-vector " << obj << ">";
+    port << "#<uniform-vector>";
+  }
+  else {
+  error:
+    // FIXME
+    // port << "#<" << obj << ">";
+    port << "#<unknown>";
+  }
+}
+
+std::ostream& operator<<(std::ostream &os, pmt_t obj)
+{
+  write(obj, os);
+  return os;
+}
+
+std::string
+write_string(pmt_t obj)
+{
+  std::ostringstream s;
+  s << obj;
+  return s.str();
+}
+
+pmt_t
+read(std::istream &port)
+{
+  throw notimplemented("notimplemented: pmt::read", PMT_NIL);
+}
+
+void
+serialize(pmt_t obj, std::ostream &sink)
+{
+  throw notimplemented("notimplemented: pmt::serialize", obj);
+}
+
+/*!
+ * \brief Create obj from portable byte-serial representation
+ */
+pmt_t
+deserialize(std::istream &source)
+{
+  throw notimplemented("notimplemented: pmt::deserialize", PMT_NIL);
+}
+
+} /* namespace pmt */
+
+
+void
+pmt::print(pmt_t v)
+{
+  std::cout << write_string(v) << std::endl;
+}
+
+
diff --git a/gnuradio-runtime/lib/pmt/pmt_pool.cc b/gnuradio-runtime/lib/pmt/pmt_pool.cc
new file mode 100644
index 0000000000..8864f79dc2
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/pmt_pool.cc
@@ -0,0 +1,113 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2009 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pmt/pmt_pool.h>
+#include <algorithm>
+#include <stdint.h>
+
+namespace pmt {
+
+static inline size_t
+ROUNDUP(size_t x, size_t stride)
+{
+  return ((((x) + (stride) - 1)/(stride)) * (stride));
+}
+
+pmt_pool::pmt_pool(size_t itemsize, size_t alignment,
+		   size_t allocation_size, size_t max_items)
+  : d_itemsize(ROUNDUP(itemsize, alignment)),
+    d_alignment(alignment),
+    d_allocation_size(std::max(allocation_size, 16 * itemsize)),
+    d_max_items(max_items), d_n_items(0),
+    d_freelist(0)
+{
+}
+
+pmt_pool::~pmt_pool()
+{
+  for (unsigned int i = 0; i < d_allocations.size(); i++){
+    delete [] d_allocations[i];
+  }
+}
+
+void *
+pmt_pool::malloc()
+{
+  scoped_lock guard(d_mutex);
+  item *p;
+
+  if (d_max_items != 0){
+    while (d_n_items >= d_max_items)
+      d_cond.wait(guard);
+  }
+
+  if (d_freelist){	// got something?
+    p = d_freelist;
+    d_freelist = p->d_next;
+    d_n_items++;
+    return p;
+  }
+
+  // allocate a new chunk
+  char *alloc = new char[d_allocation_size + d_alignment - 1];
+  d_allocations.push_back(alloc);
+
+  // get the alignment we require
+  char *start = (char *)(((uintptr_t)alloc + d_alignment-1) & -d_alignment);
+  char *end = alloc + d_allocation_size + d_alignment - 1;
+  size_t n = (end - start) / d_itemsize;
+
+  // link the new items onto the free list.
+  p = (item *) start;
+  for (size_t i = 0; i < n; i++){
+    p->d_next = d_freelist;
+    d_freelist = p;
+    p = (item *)((char *) p + d_itemsize);
+  }
+
+  // now return the first one
+  p = d_freelist;
+  d_freelist = p->d_next;
+  d_n_items++;
+  return p;
+}
+
+void
+pmt_pool::free(void *foo)
+{
+  if (!foo)
+    return;
+
+  scoped_lock guard(d_mutex);
+
+  item *p = (item *) foo;
+  p->d_next = d_freelist;
+  d_freelist = p;
+  d_n_items--;
+  if (d_max_items != 0)
+    d_cond.notify_one();
+}
+
+} /* namespace pmt */
diff --git a/gnuradio-runtime/lib/pmt/pmt_serialize.cc b/gnuradio-runtime/lib/pmt/pmt_serialize.cc
new file mode 100644
index 0000000000..4036b8d8bd
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/pmt_serialize.cc
@@ -0,0 +1,835 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2009 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <vector>
+#include <pmt/pmt.h>
+#include "pmt_int.h"
+#include "pmt/pmt_serial_tags.h"
+
+namespace pmt {
+
+static pmt_t parse_pair(std::streambuf &sb);
+
+// ----------------------------------------------------------------
+// output primitives
+// ----------------------------------------------------------------
+
+static bool
+serialize_untagged_u8(unsigned int i, std::streambuf &sb)
+{
+  return sb.sputc((i >> 0) & 0xff) != std::streambuf::traits_type::eof();
+}
+
+// always writes big-endian
+static bool
+serialize_untagged_u16(unsigned int i, std::streambuf &sb)
+{
+  sb.sputc((i >> 8) & 0xff);
+  return sb.sputc((i >> 0) & 0xff) != std::streambuf::traits_type::eof();
+}
+
+// always writes big-endian
+static bool
+serialize_untagged_u32(unsigned int i, std::streambuf &sb)
+{
+  sb.sputc((i >> 24) & 0xff);
+  sb.sputc((i >> 16) & 0xff);
+  sb.sputc((i >>  8) & 0xff);
+  return sb.sputc((i >> 0) & 0xff) != std::streambuf::traits_type::eof();
+}
+
+static bool
+serialize_untagged_f64(double i, std::streambuf &sb)
+{
+ typedef union {
+	double id;
+	uint64_t ii;
+	} iu_t;
+  iu_t iu;
+  iu.id = i;
+  sb.sputc((iu.ii >> 56) & 0xff);
+  sb.sputc((iu.ii >> 48) & 0xff);
+  sb.sputc((iu.ii >> 40) & 0xff);
+  sb.sputc((iu.ii >> 32) & 0xff);
+  sb.sputc((iu.ii >> 24) & 0xff);
+  sb.sputc((iu.ii >> 16) & 0xff);
+  sb.sputc((iu.ii >>  8) & 0xff);
+  return sb.sputc((iu.ii >>  0) & 0xff) != std::streambuf::traits_type::eof();
+}
+
+
+// always writes big-endian
+static bool
+serialize_untagged_u64(uint64_t i, std::streambuf &sb)
+{
+  sb.sputc((i >> 56) & 0xff);
+  sb.sputc((i >> 48) & 0xff);
+  sb.sputc((i >> 40) & 0xff);
+  sb.sputc((i >> 32) & 0xff);
+  sb.sputc((i >> 24) & 0xff);
+  sb.sputc((i >> 16) & 0xff);
+  sb.sputc((i >>  8) & 0xff);
+  return sb.sputc((i >> 0) & 0xff) != std::streambuf::traits_type::eof();
+}
+
+// ----------------------------------------------------------------
+// input primitives
+// ----------------------------------------------------------------
+
+
+// always reads big-endian
+static bool
+deserialize_untagged_u8(uint8_t *ip, std::streambuf &sb)
+{
+  std::streambuf::traits_type::int_type  t;
+  int i;
+
+  t = sb.sbumpc();
+  i = t & 0xff;
+
+  *ip = i;
+  return t != std::streambuf::traits_type::eof();
+}
+
+// always reads big-endian
+static bool
+deserialize_untagged_u16(uint16_t *ip, std::streambuf &sb)
+{
+  std::streambuf::traits_type::int_type  t;
+  int i;
+
+  t = sb.sbumpc();
+  i = t & 0xff;
+
+  t = sb.sbumpc();
+  i = (i << 8) | (t & 0xff);
+
+  *ip = i;
+  return t != std::streambuf::traits_type::eof();
+}
+
+// always reads big-endian
+static bool
+deserialize_untagged_u32(uint32_t *ip, std::streambuf &sb)
+{
+  std::streambuf::traits_type::int_type  t;
+  int i;
+
+  t = sb.sbumpc();
+  i = t & 0xff;
+
+  t = sb.sbumpc();
+  i = (i << 8) | (t & 0xff);
+  t = sb.sbumpc();
+  i = (i << 8) | (t & 0xff);
+  t = sb.sbumpc();
+  i = (i << 8) | (t & 0xff);
+
+  *ip = i;
+  return t != std::streambuf::traits_type::eof();
+}
+
+// always reads big-endian
+static bool
+deserialize_untagged_u64(uint64_t *ip, std::streambuf &sb)
+{
+  std::streambuf::traits_type::int_type  t;
+  uint64_t i;
+
+  t = sb.sbumpc();
+  i = t & 0xff;
+
+  t = sb.sbumpc();
+  i = (i << 8) | (t & 0xff);
+  t = sb.sbumpc();
+  i = (i << 8) | (t & 0xff);
+  t = sb.sbumpc();
+  i = (i << 8) | (t & 0xff);
+  t = sb.sbumpc();
+  i = (i << 8) | (t & 0xff);
+  t = sb.sbumpc();
+  i = (i << 8) | (t & 0xff);
+  t = sb.sbumpc();
+  i = (i << 8) | (t & 0xff);
+  t = sb.sbumpc();
+  i = (i << 8) | (t & 0xff);
+
+  *ip = i;
+  return t != std::streambuf::traits_type::eof();
+}
+
+static bool
+deserialize_untagged_f64(double *ip, std::streambuf &sb)
+{
+  std::streambuf::traits_type::int_type t;
+
+  typedef union {
+    double id;
+    uint64_t ii;
+  } iu_t;
+
+  iu_t iu;
+
+  t = sb.sbumpc();
+  iu.ii = t & 0xff;
+
+  t = sb.sbumpc();
+  iu.ii = (iu.ii<<8) | (t & 0xff);
+  t = sb.sbumpc();
+  iu.ii = (iu.ii<<8) | (t & 0xff);
+  t = sb.sbumpc();
+  iu.ii = (iu.ii<<8) | (t & 0xff);
+  t = sb.sbumpc();
+  iu.ii = (iu.ii<<8) | (t & 0xff);
+  t = sb.sbumpc();
+  iu.ii = (iu.ii<<8) | (t & 0xff);
+  t = sb.sbumpc();
+  iu.ii = (iu.ii<<8) | (t & 0xff);
+  t = sb.sbumpc();
+  iu.ii = (iu.ii<<8) | (t & 0xff);
+
+  *ip = iu.id;
+  return t != std::streambuf::traits_type::eof();
+}
+
+static bool
+deserialize_tuple(pmt_t *tuple, std::streambuf &sb)
+{
+    uint32_t nitems;
+    bool ok = deserialize_untagged_u32(&nitems, sb);
+    pmt_t list(PMT_NIL);
+    for(uint32_t i=0; i<nitems; i++) {
+      pmt_t item = deserialize(sb);
+      if(eq(list, PMT_NIL)) {
+	list = list1(item);
+      }
+      else {
+	list = list_add(list, item);
+      }
+    }
+    (*tuple) = to_tuple(list);
+    return ok;
+}
+
+
+/*
+ * Write portable byte-serial representation of \p obj to \p sb
+ *
+ * N.B., Circular structures cause infinite recursion.
+ */
+bool
+serialize(pmt_t obj, std::streambuf &sb)
+{
+  bool ok = true;
+
+ tail_recursion:
+
+  if(is_bool(obj)) {
+    if(eq(obj, PMT_T))
+      return serialize_untagged_u8(PST_TRUE, sb);
+    else
+      return serialize_untagged_u8(PST_FALSE, sb);
+  }
+
+  if(is_null(obj))
+    return serialize_untagged_u8(PST_NULL, sb);
+
+  if(is_symbol(obj)) {
+    const std::string s = symbol_to_string(obj);
+    size_t len = s.size();
+    ok = serialize_untagged_u8(PST_SYMBOL, sb);
+    ok &= serialize_untagged_u16(len, sb);
+    for(size_t i = 0; i < len; i++)
+      ok &= serialize_untagged_u8(s[i], sb);
+    return ok;
+  }
+
+  if(is_pair(obj)) {
+    ok = serialize_untagged_u8(PST_PAIR, sb);
+    ok &= serialize(car(obj), sb);
+    if(!ok)
+      return false;
+    obj = cdr(obj);
+    goto tail_recursion;
+  }
+
+  if(is_number(obj)) {
+    
+    if(is_uint64(obj)) {
+        uint64_t i = to_uint64(obj);
+        ok = serialize_untagged_u8(PST_UINT64, sb);
+        ok &= serialize_untagged_u64(i, sb);
+        return ok;
+    }
+    else { 
+      if(is_integer(obj)) {
+	long i = to_long(obj);
+	if(sizeof(long) > 4) {
+	  if(i < -2147483647 || i > 2147483647)
+	    throw notimplemented("pmt::serialize (64-bit integers)", obj);
+	}
+	ok = serialize_untagged_u8(PST_INT32, sb);
+	ok &= serialize_untagged_u32(i, sb);
+	return ok;
+      }
+    }
+
+    if(is_real(obj)) {
+      float i = to_double(obj);
+      ok = serialize_untagged_u8(PST_DOUBLE, sb);
+      ok &= serialize_untagged_f64(i, sb);
+      return ok;
+    }
+
+    if(is_complex(obj)) {
+      std::complex<double> i = to_complex(obj);
+      ok = serialize_untagged_u8(PST_COMPLEX, sb);
+      ok &= serialize_untagged_f64(i.real(), sb);
+      ok &= serialize_untagged_f64(i.imag(), sb);
+      return ok;
+    }
+  }
+
+  if(is_vector(obj)) {
+    size_t vec_len = pmt::length(obj);
+    ok = serialize_untagged_u8(PST_VECTOR, sb);
+    ok &= serialize_untagged_u32(vec_len, sb);
+    for(size_t i=0; i<vec_len; i++) {
+      ok &= serialize(vector_ref(obj, i), sb);
+    }
+    return ok;
+  }
+
+  if(is_uniform_vector(obj)) {
+    size_t npad = 1;
+    size_t vec_len = pmt::length(obj);
+
+    if(is_u8vector(obj)) {
+      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
+      ok &= serialize_untagged_u8(UVI_U8, sb);
+      ok &= serialize_untagged_u32(vec_len, sb);
+      ok &= serialize_untagged_u8(npad, sb);
+      for(size_t i=0; i<npad; i++) {
+	ok &= serialize_untagged_u8(0, sb);
+      }
+      for(size_t i=0; i<vec_len; i++) {
+	ok &= serialize_untagged_u8(u8vector_ref(obj, i), sb);
+      }
+      return ok;
+    }
+
+    if(is_s8vector(obj)) {
+      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
+      ok &= serialize_untagged_u8(UVI_S8, sb);
+      ok &= serialize_untagged_u32(vec_len, sb);
+      ok &= serialize_untagged_u8(npad, sb);
+      for(size_t i=0; i<npad; i++) {
+	ok &= serialize_untagged_u8(0, sb);
+      }
+      for(size_t i=0; i<vec_len; i++) {
+	ok &= serialize_untagged_u8(s8vector_ref(obj, i), sb);
+      }
+      return ok;
+    }
+
+    if(is_u16vector(obj)) {
+      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
+      ok &= serialize_untagged_u8(UVI_U16, sb);
+      ok &= serialize_untagged_u32(vec_len, sb);
+      ok &= serialize_untagged_u8(npad, sb);
+      for(size_t i=0; i<npad; i++) {
+	ok &= serialize_untagged_u8(0, sb);
+      }
+      for(size_t i=0; i<vec_len; i++) {
+	ok &= serialize_untagged_u16(u16vector_ref(obj, i), sb);
+      }
+      return ok;
+    }
+
+    if(is_s16vector(obj)) {
+      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
+      ok &= serialize_untagged_u8(UVI_S16, sb);
+      ok &= serialize_untagged_u32(vec_len, sb);
+      ok &= serialize_untagged_u8(npad, sb);
+      for(size_t i=0; i<npad; i++) {
+	ok &= serialize_untagged_u8(0, sb);
+      }
+      for(size_t i=0; i<vec_len; i++) {
+	ok &= serialize_untagged_u16(s16vector_ref(obj, i), sb);
+      }
+      return ok;
+    }
+
+    if(is_u32vector(obj)) {
+      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
+      ok &= serialize_untagged_u8(UVI_U32, sb);
+      ok &= serialize_untagged_u32(vec_len, sb);
+      ok &= serialize_untagged_u8(npad, sb);
+      for(size_t i=0; i<npad; i++) {
+	ok &= serialize_untagged_u8(0, sb);
+      }
+      for(size_t i=0; i<vec_len; i++) {
+	ok &= serialize_untagged_u32(u32vector_ref(obj, i), sb);
+      }
+      return ok;
+    }
+
+    if(is_s32vector(obj)) {
+      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
+      ok &= serialize_untagged_u8(UVI_S32, sb);
+      ok &= serialize_untagged_u32(vec_len, sb);
+      ok &= serialize_untagged_u8(npad, sb);
+      for(size_t i=0; i<npad; i++) {
+	ok &= serialize_untagged_u8(0, sb);
+      }
+      for(size_t i=0; i<vec_len; i++) {
+	ok &= serialize_untagged_u32(s32vector_ref(obj, i), sb);
+      }
+      return ok;
+    }
+
+    if(is_u64vector(obj)) {
+      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
+      ok &= serialize_untagged_u8(UVI_U64, sb);
+      ok &= serialize_untagged_u32(vec_len, sb);
+      ok &= serialize_untagged_u8(npad, sb);
+      for(size_t i=0; i<npad; i++) {
+	ok &= serialize_untagged_u8(0, sb);
+      }
+      for(size_t i=0; i<vec_len; i++) {
+	ok &= serialize_untagged_u64(u64vector_ref(obj, i), sb);
+      }
+      return ok;
+    }
+
+    if(is_s64vector(obj)) {
+      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
+      ok &= serialize_untagged_u8(UVI_S64, sb);
+      ok &= serialize_untagged_u32(vec_len, sb);
+      ok &= serialize_untagged_u8(npad, sb);
+      for(size_t i=0; i<npad; i++) {
+	ok &= serialize_untagged_u8(0, sb);
+      }
+      for(size_t i=0; i<vec_len; i++) {
+	ok &= serialize_untagged_u64(s64vector_ref(obj, i), sb);
+      }
+      return ok;
+    }
+
+    if(is_f32vector(obj)) {
+      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
+      ok &= serialize_untagged_u8(UVI_F32, sb);
+      ok &= serialize_untagged_u32(vec_len, sb);
+      ok &= serialize_untagged_u8(npad, sb);
+      for(size_t i=0; i<npad; i++) {
+	ok &= serialize_untagged_u8(0, sb);
+      }
+      for(size_t i=0; i<vec_len; i++) {
+	ok &= serialize_untagged_f64(f32vector_ref(obj, i), sb);
+      }
+      return ok;
+    }
+
+    if(is_f64vector(obj)) {
+      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
+      ok &= serialize_untagged_u8(UVI_F64, sb);
+      ok &= serialize_untagged_u32(vec_len, sb);
+      ok &= serialize_untagged_u8(npad, sb);
+      for(size_t i=0; i<npad; i++) {
+	ok &= serialize_untagged_u8(0, sb);
+      }
+      for(size_t i=0; i<vec_len; i++) {
+	ok &= serialize_untagged_f64(f64vector_ref(obj, i), sb);
+      }
+      return ok;
+    }
+
+    if(is_c32vector(obj)) {
+      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
+      ok &= serialize_untagged_u8(UVI_C32, sb);
+      ok &= serialize_untagged_u32(vec_len, sb);
+      ok &= serialize_untagged_u8(npad, sb);
+      for(size_t i=0; i<npad; i++) {
+	ok &= serialize_untagged_u8(0, sb);
+      }
+      for(size_t i=0; i<vec_len; i++) {
+	std::complex<float> c = c32vector_ref(obj, i);
+	ok &= serialize_untagged_f64(c.real(), sb);
+	ok &= serialize_untagged_f64(c.imag(), sb);
+      }
+      return ok;
+    }
+
+    if(is_c64vector(obj)) {
+      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
+      ok &= serialize_untagged_u8(UVI_C64, sb);
+      ok &= serialize_untagged_u32(vec_len, sb);
+      ok &= serialize_untagged_u8(npad, sb);
+      for(size_t i=0; i<npad; i++) {
+	ok &= serialize_untagged_u8(0, sb);
+      }
+      for(size_t i=0; i<vec_len; i++) {
+	std::complex<double> c = c64vector_ref(obj, i);
+	ok &= serialize_untagged_f64(c.real(), sb);
+	ok &= serialize_untagged_f64(c.imag(), sb);
+      }
+      return ok;
+    }
+  }
+
+  if (is_dict(obj))
+    throw notimplemented("pmt::serialize (dict)", obj);
+
+  if (is_tuple(obj)){
+    size_t tuple_len = pmt::length(obj);
+    ok = serialize_untagged_u8(PST_TUPLE, sb);
+    ok &= serialize_untagged_u32(tuple_len, sb);
+    for(size_t i=0; i<tuple_len; i++){
+        ok &= serialize(tuple_ref(obj, i), sb);
+    }
+    return ok;
+  }
+  //throw pmt_notimplemented("pmt::serialize (tuple)", obj);
+
+  throw notimplemented("pmt::serialize (?)", obj);
+}
+
+/*
+ * Create obj from portable byte-serial representation
+ *
+ * Returns next obj from streambuf, or PMT_EOF at end of file.
+ * Throws exception on malformed input.
+ */
+pmt_t
+deserialize(std::streambuf &sb)
+{
+  uint8_t	tag;
+  uint8_t	u8;
+  uint16_t	u16;
+  uint32_t	u32;
+  uint64_t	u64;
+  double	f64;
+  static char   tmpbuf[1024];
+
+  if (!deserialize_untagged_u8(&tag, sb))
+    return PMT_EOF;
+
+  switch (tag){
+  case PST_TRUE:
+    return PMT_T;
+
+  case PST_FALSE:
+    return PMT_F;
+
+  case PST_NULL:
+    return PMT_NIL;
+
+  case PST_SYMBOL:
+    if (!deserialize_untagged_u16(&u16, sb))
+      goto error;
+    if (u16 > sizeof(tmpbuf))
+      throw notimplemented("pmt::deserialize: very long symbol",
+			   PMT_F);
+    if (sb.sgetn(tmpbuf, u16) != u16)
+      goto error;
+    return intern(std::string(tmpbuf, u16));
+
+  case PST_INT32:
+    if (!deserialize_untagged_u32(&u32, sb))
+      goto error;
+    return from_long((int32_t) u32);
+
+  case PST_UINT64:
+    if(!deserialize_untagged_u64(&u64, sb))
+        goto error;
+    return from_uint64(u64);
+
+  case PST_PAIR:
+    return parse_pair(sb);
+
+  case PST_DOUBLE:
+    if(!deserialize_untagged_f64(&f64, sb))
+      goto error;
+    return from_double( f64 );
+
+  case PST_COMPLEX:
+    {
+    double r,i;
+    if(!deserialize_untagged_f64(&r, sb) && !deserialize_untagged_f64(&i, sb))
+      goto error;
+    return make_rectangular( r,i );
+    }
+    
+  case PST_TUPLE:
+    {
+    pmt_t tuple;
+    if(!deserialize_tuple(&tuple, sb)){
+      goto error;
+    }
+    return tuple;
+    }
+
+  case PST_VECTOR:
+    {
+    uint32_t nitems;
+    if(!deserialize_untagged_u32(&nitems, sb))
+      goto error;
+    pmt_t vec = make_vector(nitems, PMT_NIL);
+    for(uint32_t i=0; i<nitems; i++) {
+      pmt_t item = deserialize(sb);
+      vector_set(vec, i, item);
+    }
+    return vec;
+    }
+
+  case PST_UNIFORM_VECTOR:
+    {
+      uint8_t utag, npad;
+      uint32_t nitems;
+
+      if(!deserialize_untagged_u8(&utag, sb))
+	return PMT_EOF;
+
+      if(!deserialize_untagged_u32(&nitems, sb))
+	goto error;
+      
+      deserialize_untagged_u8(&npad, sb);
+      for(size_t i; i < npad; i++)
+	deserialize_untagged_u8(&u8, sb);
+
+      switch(utag) {
+      case(UVI_U8):
+	{
+	  pmt_t vec = make_u8vector(nitems, 0);
+	  for(uint32_t i=0; i<nitems; i++) {
+	    deserialize_untagged_u8(&u8, sb);
+	    u8vector_set(vec, i, u8);
+	  }
+	  return vec;
+	}
+      case(UVI_S8):
+	{
+	  pmt_t vec = make_s8vector(nitems, 0);
+	  for(uint32_t i=0; i<nitems; i++) {
+	    deserialize_untagged_u8(&u8, sb);
+	    s8vector_set(vec, i, u8);
+	  }
+	  return vec;
+	}
+      case(UVI_U16):
+	{
+	  pmt_t vec = make_u16vector(nitems, 0);
+	  for(uint32_t i=0; i<nitems; i++) {
+	    deserialize_untagged_u16(&u16, sb);
+	    u16vector_set(vec, i, u16);
+	  }
+	  return vec;
+	}
+      case(UVI_S16):
+	{
+	  pmt_t vec = make_s16vector(nitems, 0);
+	  for(uint32_t i=0; i<nitems; i++) {
+	    deserialize_untagged_u16(&u16, sb);
+	    s16vector_set(vec, i, u16);
+	  }
+	  return vec;
+	}
+      case(UVI_U32):
+	{
+	  pmt_t vec = make_u32vector(nitems, 0);
+	  for(uint32_t i=0; i<nitems; i++) {
+	    deserialize_untagged_u32(&u32, sb);
+	    u32vector_set(vec, i, u32);
+	  }
+	  return vec;
+	}
+      case(UVI_S32):
+	{
+	  pmt_t vec = make_s32vector(nitems, 0);
+	  for(uint32_t i=0; i<nitems; i++) {
+	    deserialize_untagged_u32(&u32, sb);
+	    s32vector_set(vec, i, u32);
+	  }
+	  return vec;
+	}
+      case(UVI_U64):
+	{
+	  pmt_t vec = make_u64vector(nitems, 0);
+	  for(uint32_t i=0; i<nitems; i++) {
+	    deserialize_untagged_u64(&u64, sb);
+	    u64vector_set(vec, i, u64);
+	  }
+	  return vec;
+	}
+      case(UVI_S64):
+	{
+	  pmt_t vec = make_s64vector(nitems, 0);
+	  for(uint32_t i=0; i<nitems; i++) {
+	    deserialize_untagged_u64(&u64, sb);
+	    s64vector_set(vec, i, u64);
+	  }
+	  return vec;
+	}
+      case(UVI_F32):
+	{
+	  pmt_t vec = make_f32vector(nitems, 0);
+	  for(uint32_t i=0; i<nitems; i++) {
+	    deserialize_untagged_f64(&f64, sb);
+	    f32vector_set(vec, i, static_cast<float>(f64));
+	  }
+	  return vec;
+	}
+      case(UVI_F64):
+	{
+	  pmt_t vec = make_f64vector(nitems, 0);
+	  for(uint32_t i=0; i<nitems; i++) {
+	    deserialize_untagged_f64(&f64, sb);
+	    f64vector_set(vec, i, f64);
+	  }
+	  return vec;
+	}
+      case(UVI_C32):
+	{
+	  pmt_t vec = make_c32vector(nitems, 0);
+	  for(uint32_t i=0; i<nitems; i++) {
+	    float re, im;
+	    deserialize_untagged_f64(&f64, sb);
+	    re = static_cast<float>(f64);
+	    deserialize_untagged_f64(&f64, sb);
+	    im = static_cast<float>(f64);
+	    c32vector_set(vec, i, std::complex<float>(re, im));
+	  }
+	  return vec;
+	}
+
+      case(UVI_C64):
+	{
+	  pmt_t vec = make_c64vector(nitems, 0);
+	  for(uint32_t i=0; i<nitems; i++) {
+	    double re, im;
+	    deserialize_untagged_f64(&f64, sb);
+	    re = f64;
+	    deserialize_untagged_f64(&f64, sb);
+	    im = f64;
+	    c64vector_set(vec, i, std::complex<double>(re, im));
+	  }
+	  return vec;
+	}
+
+      default:
+	throw exception("pmt::deserialize: malformed input stream, tag value = ",
+			from_long(tag));
+      }
+    }
+
+  case PST_DICT:
+  case PST_COMMENT:
+    throw notimplemented("pmt::deserialize: tag value = ",
+			 from_long(tag));
+
+  default:
+    throw exception("pmt::deserialize: malformed input stream, tag value = ",
+		    from_long(tag));
+  }
+
+ error:
+  throw exception("pmt::deserialize: malformed input stream", PMT_F);
+}
+
+
+/*
+ * provide a simple string accessor to the serialized pmt form
+ */
+std::string
+serialize_str(pmt_t obj){
+  std::stringbuf sb;
+  serialize(obj, sb);
+  return sb.str();
+}
+
+
+/*
+ * provide a simple string accessor to the deserialized pmt form
+ */
+pmt_t
+deserialize_str(std::string s){
+  std::stringbuf sb(s);
+  return deserialize(sb);
+}
+
+
+/*
+ * This is a mostly non-recursive implementation that allows us to
+ * deserialize very long lists w/o exhausting the evaluation stack.
+ *
+ * On entry we've already eaten the PST_PAIR tag.
+ */
+pmt_t
+parse_pair(std::streambuf &sb)
+{
+  uint8_t tag;
+  pmt_t	val, expr, lastnptr, nptr;
+
+  //
+  // Keep appending nodes until we get a non-PAIR cdr.
+  //
+  lastnptr = PMT_NIL;
+  while (1){
+    expr = deserialize(sb);		// read the car
+
+    nptr = cons(expr, PMT_NIL);	// build new cell
+    if (is_null(lastnptr))
+      val = nptr;
+    else
+      set_cdr(lastnptr, nptr);
+    lastnptr = nptr;
+
+    if (!deserialize_untagged_u8(&tag, sb))  // get tag of cdr
+      throw exception("pmt::deserialize: malformed input stream", PMT_F);
+
+    if (tag == PST_PAIR)
+      continue;			// keep on looping...
+
+    if (tag == PST_NULL){
+      expr = PMT_NIL;
+      break;
+    }
+
+    //
+    // default: push tag back and use pmt_deserialize to get the cdr
+    //
+    sb.sungetc();
+    expr = deserialize(sb);
+    break;
+  }
+
+  //
+  // At this point, expr contains the value of the final cdr in the list.
+  //
+  set_cdr(lastnptr, expr);
+  return val;
+}
+
+} /* namespace pmt */
diff --git a/gnuradio-runtime/lib/pmt/qa_pmt.cc b/gnuradio-runtime/lib/pmt/qa_pmt.cc
new file mode 100644
index 0000000000..27c617e747
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/qa_pmt.cc
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/*
+ * This class gathers together all the test cases for pmt into
+ * a single test suite.  As you create new test cases, add them here.
+ */
+
+#include <qa_pmt.h>
+#include <qa_pmt_prims.h>
+#include <qa_pmt_unv.h>
+
+CppUnit::TestSuite *
+qa_pmt::suite ()
+{
+  CppUnit::TestSuite	*s = new CppUnit::TestSuite ("pmt");
+
+  s->addTest (qa_pmt_prims::suite ());
+  s->addTest (qa_pmt_unv::suite ());
+
+  return s;
+}
diff --git a/gnuradio-runtime/lib/pmt/qa_pmt.h b/gnuradio-runtime/lib/pmt/qa_pmt.h
new file mode 100644
index 0000000000..3e0c91abac
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/qa_pmt.h
@@ -0,0 +1,37 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QA_PMT_H
+#define INCLUDED_QA_PMT_H
+
+#include <attributes.h>
+#include <cppunit/TestSuite.h>
+
+//! collect all the tests for pmt
+
+class __GR_ATTR_EXPORT qa_pmt {
+ public:
+  //! return suite of tests for all of pmt
+  static CppUnit::TestSuite *suite ();
+};
+
+#endif /* INCLUDED_QA_PMT_H */
diff --git a/gnuradio-runtime/lib/pmt/qa_pmt_prims.cc b/gnuradio-runtime/lib/pmt/qa_pmt_prims.cc
new file mode 100644
index 0000000000..e9a897deac
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/qa_pmt_prims.cc
@@ -0,0 +1,603 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009,2010 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <qa_pmt_prims.h>
+#include <cppunit/TestAssert.h>
+#include <messages/msg_passing.h>
+#include <boost/format.hpp>
+#include <cstdio>
+#include <cstring>
+#include <sstream>
+
+void
+qa_pmt_prims::test_symbols()
+{
+  CPPUNIT_ASSERT(!pmt::is_symbol(pmt::PMT_T));
+  CPPUNIT_ASSERT(!pmt::is_symbol(pmt::PMT_F));
+  CPPUNIT_ASSERT_THROW(pmt::symbol_to_string(pmt::PMT_F), pmt::wrong_type);
+
+  pmt::pmt_t sym1 = pmt::mp("test");
+  CPPUNIT_ASSERT(pmt::is_symbol(sym1));
+  CPPUNIT_ASSERT_EQUAL(std::string("test"), pmt::symbol_to_string(sym1));
+  CPPUNIT_ASSERT(pmt::is_true(sym1));
+  CPPUNIT_ASSERT(!pmt::is_false(sym1));
+
+  pmt::pmt_t sym2 = pmt::mp("foo");
+  pmt::pmt_t sym3 = pmt::mp("test");
+  CPPUNIT_ASSERT_EQUAL(sym1, sym3);
+  CPPUNIT_ASSERT(sym1 != sym2);
+  CPPUNIT_ASSERT(sym1 == sym3);
+
+  static const int N = 2048;
+  std::vector<pmt::pmt_t> v1(N);
+  std::vector<pmt::pmt_t> v2(N);
+
+  // generate a bunch of symbols
+  for (int i = 0; i < N; i++){
+    std::string buf = str(boost::format("test-%d") % i);
+    v1[i] = pmt::mp(buf.c_str());
+  }
+
+  // confirm that they are all unique
+  for (int i = 0; i < N; i++)
+    for (int j = i + 1; j < N; j++)
+      CPPUNIT_ASSERT(v1[i] != v1[j]);
+
+  // generate the same symbols again
+  for (int i = 0; i < N; i++){
+    std::string buf = str(boost::format("test-%d") % i);
+    v2[i] = pmt::mp(buf.c_str());
+  }
+
+  // confirm that we get the same ones back
+  for (int i = 0; i < N; i++)
+    CPPUNIT_ASSERT(v1[i] == v2[i]);
+}
+
+void
+qa_pmt_prims::test_booleans()
+{
+  pmt::pmt_t sym = pmt::mp("test");
+  CPPUNIT_ASSERT(pmt::is_bool(pmt::PMT_T));
+  CPPUNIT_ASSERT(pmt::is_bool(pmt::PMT_F));
+  CPPUNIT_ASSERT(!pmt::is_bool(sym));
+  CPPUNIT_ASSERT_EQUAL(pmt::from_bool(false), pmt::PMT_F);
+  CPPUNIT_ASSERT_EQUAL(pmt::from_bool(true), pmt::PMT_T);
+  CPPUNIT_ASSERT_EQUAL(false, pmt::to_bool(pmt::PMT_F));
+  CPPUNIT_ASSERT_EQUAL(true, pmt::to_bool(pmt::PMT_T));
+  CPPUNIT_ASSERT_THROW(pmt::to_bool(sym), pmt::wrong_type);
+}
+
+void
+qa_pmt_prims::test_integers()
+{
+  pmt::pmt_t p1 = pmt::from_long(1);
+  pmt::pmt_t m1 = pmt::from_long(-1);
+  CPPUNIT_ASSERT(!pmt::is_integer(pmt::PMT_T));
+  CPPUNIT_ASSERT(pmt::is_integer(p1));
+  CPPUNIT_ASSERT(pmt::is_integer(m1));
+  CPPUNIT_ASSERT_THROW(pmt::to_long(pmt::PMT_T), pmt::wrong_type);
+  CPPUNIT_ASSERT_EQUAL(-1L, pmt::to_long(m1));
+  CPPUNIT_ASSERT_EQUAL(1L, pmt::to_long(p1));
+}
+
+void
+qa_pmt_prims::test_uint64s()
+{
+  pmt::pmt_t p1 = pmt::from_uint64((uint64_t)1);
+  pmt::pmt_t m1 = pmt::from_uint64((uint64_t)8589934592ULL);
+  CPPUNIT_ASSERT(!pmt::is_uint64(pmt::PMT_T));
+  CPPUNIT_ASSERT(pmt::is_uint64(p1));
+  CPPUNIT_ASSERT(pmt::is_uint64(m1));
+  CPPUNIT_ASSERT_THROW(pmt::to_uint64(pmt::PMT_T), pmt::wrong_type);
+  CPPUNIT_ASSERT_EQUAL((uint64_t)8589934592ULL, (uint64_t)pmt::to_uint64(m1));
+  CPPUNIT_ASSERT_EQUAL((uint64_t)1ULL, (uint64_t)pmt::to_uint64(p1));
+}
+
+void
+qa_pmt_prims::test_reals()
+{
+  pmt::pmt_t p1 = pmt::from_double(1);
+  pmt::pmt_t m1 = pmt::from_double(-1);
+  CPPUNIT_ASSERT(!pmt::is_real(pmt::PMT_T));
+  CPPUNIT_ASSERT(pmt::is_real(p1));
+  CPPUNIT_ASSERT(pmt::is_real(m1));
+  CPPUNIT_ASSERT_THROW(pmt::to_double(pmt::PMT_T), pmt::wrong_type);
+  CPPUNIT_ASSERT_EQUAL(-1.0, pmt::to_double(m1));
+  CPPUNIT_ASSERT_EQUAL(1.0, pmt::to_double(p1));
+  CPPUNIT_ASSERT_EQUAL(1.0, pmt::to_double(pmt::from_long(1)));
+}
+
+void
+qa_pmt_prims::test_complexes()
+{
+  pmt::pmt_t p1 = pmt::make_rectangular(2, -3);
+  pmt::pmt_t m1 = pmt::make_rectangular(-3, 2);
+  pmt::pmt_t p2 = pmt::from_complex(2, -3);
+  pmt::pmt_t m2 = pmt::from_complex(-3, 2);
+  pmt::pmt_t p3 = pmt::from_complex(std::complex<double>(2, -3));
+  pmt::pmt_t m3 = pmt::from_complex(std::complex<double>(-3, 2));
+  CPPUNIT_ASSERT(!pmt::is_complex(pmt::PMT_T));
+  CPPUNIT_ASSERT(pmt::is_complex(p1));
+  CPPUNIT_ASSERT(pmt::is_complex(m1));
+  CPPUNIT_ASSERT(pmt::is_complex(p2));
+  CPPUNIT_ASSERT(pmt::is_complex(m2));
+  CPPUNIT_ASSERT(pmt::is_complex(p3));
+  CPPUNIT_ASSERT(pmt::is_complex(m3));
+  CPPUNIT_ASSERT_THROW(pmt::to_complex(pmt::PMT_T), pmt::wrong_type);
+  CPPUNIT_ASSERT_EQUAL(std::complex<double>(2, -3), pmt::to_complex(p1));
+  CPPUNIT_ASSERT_EQUAL(std::complex<double>(-3, 2), pmt::to_complex(m1));
+  CPPUNIT_ASSERT_EQUAL(std::complex<double>(2, -3), pmt::to_complex(p2));
+  CPPUNIT_ASSERT_EQUAL(std::complex<double>(-3, 2), pmt::to_complex(m2));
+  CPPUNIT_ASSERT_EQUAL(std::complex<double>(2, -3), pmt::to_complex(p3));
+  CPPUNIT_ASSERT_EQUAL(std::complex<double>(-3, 2), pmt::to_complex(m3));
+  CPPUNIT_ASSERT_EQUAL(std::complex<double>(1.0, 0), pmt::to_complex(pmt::from_long(1)));
+  CPPUNIT_ASSERT_EQUAL(std::complex<double>(1.0, 0), pmt::to_complex(pmt::from_double(1.0)));
+}
+
+void
+qa_pmt_prims::test_pairs()
+{
+  CPPUNIT_ASSERT(pmt::is_null(pmt::PMT_NIL));
+  CPPUNIT_ASSERT(!pmt::is_pair(pmt::PMT_NIL));
+  pmt::pmt_t s1 = pmt::mp("s1");
+  pmt::pmt_t s2 = pmt::mp("s2");
+  pmt::pmt_t s3 = pmt::mp("s3");
+
+
+  CPPUNIT_ASSERT_EQUAL((size_t)0, pmt::length(pmt::PMT_NIL));
+  CPPUNIT_ASSERT_THROW(pmt::length(s1), pmt::wrong_type);
+  CPPUNIT_ASSERT_THROW(pmt::length(pmt::from_double(42)), pmt::wrong_type);
+
+  pmt::pmt_t c1 = pmt::cons(s1, pmt::PMT_NIL);
+  CPPUNIT_ASSERT(pmt::is_pair(c1));
+  CPPUNIT_ASSERT(!pmt::is_pair(s1));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::car(c1));
+  CPPUNIT_ASSERT_EQUAL(pmt::PMT_NIL, pmt::cdr(c1));
+  CPPUNIT_ASSERT_EQUAL((size_t) 1, pmt::length(c1));
+
+  pmt::pmt_t c3 = pmt::cons(s3, pmt::PMT_NIL);
+  pmt::pmt_t c2 = pmt::cons(s2, c3);
+  pmt::set_cdr(c1, c2);
+  CPPUNIT_ASSERT_EQUAL(c2, pmt::cdr(c1));
+  pmt::set_car(c1, s3);
+  CPPUNIT_ASSERT_EQUAL(s3, pmt::car(c1));
+  CPPUNIT_ASSERT_EQUAL((size_t)1, pmt::length(c3));
+  CPPUNIT_ASSERT_EQUAL((size_t)2, pmt::length(c2));
+
+  CPPUNIT_ASSERT_THROW(pmt::cdr(pmt::PMT_NIL), pmt::wrong_type);
+  CPPUNIT_ASSERT_THROW(pmt::car(pmt::PMT_NIL), pmt::wrong_type);
+  CPPUNIT_ASSERT_THROW(pmt::set_car(s1, pmt::PMT_NIL), pmt::wrong_type);
+  CPPUNIT_ASSERT_THROW(pmt::set_cdr(s1, pmt::PMT_NIL), pmt::wrong_type);
+}
+
+void
+qa_pmt_prims::test_vectors()
+{
+  static const size_t N = 3;
+  pmt::pmt_t v1 = pmt::make_vector(N, pmt::PMT_NIL);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  pmt::pmt_t s0 = pmt::mp("s0");
+  pmt::pmt_t s1 = pmt::mp("s1");
+  pmt::pmt_t s2 = pmt::mp("s2");
+
+  pmt::vector_set(v1, 0, s0);
+  pmt::vector_set(v1, 1, s1);
+  pmt::vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::vector_set(v1, N, pmt::PMT_NIL), pmt::out_of_range);
+
+  pmt::vector_fill(v1, s0);
+  for (size_t i = 0; i < N; i++)
+    CPPUNIT_ASSERT_EQUAL(s0, pmt::vector_ref(v1, i));
+}
+
+static void
+check_tuple(size_t len, const std::vector<pmt::pmt_t> &s, pmt::pmt_t t)
+{
+  CPPUNIT_ASSERT_EQUAL(true, pmt::is_tuple(t));
+  CPPUNIT_ASSERT_EQUAL(len, pmt::length(t));
+
+  for (size_t i = 0; i < len; i++)
+    CPPUNIT_ASSERT_EQUAL(s[i], pmt::tuple_ref(t, i));
+
+}
+
+void
+qa_pmt_prims::test_tuples()
+{
+  pmt::pmt_t v = pmt::make_vector(10, pmt::PMT_NIL);
+  std::vector<pmt::pmt_t> s(10);
+  for (size_t i = 0; i < 10; i++){
+    std::ostringstream os;
+    os << "s" << i;
+    s[i] = pmt::mp(os.str());
+    pmt::vector_set(v, i, s[i]);
+  }
+
+
+  pmt::pmt_t t;
+
+  t = pmt::make_tuple();
+  check_tuple(0, s, t);
+
+  t = pmt::make_tuple(s[0]);
+  check_tuple(1, s, t);
+
+  CPPUNIT_ASSERT(pmt::is_vector(v));
+  CPPUNIT_ASSERT(!pmt::is_tuple(v));
+  CPPUNIT_ASSERT(pmt::is_tuple(t));
+  CPPUNIT_ASSERT(!pmt::is_vector(t));
+
+  t = pmt::make_tuple(s[0], s[1]);
+  check_tuple(2, s, t);
+
+  t = pmt::make_tuple(s[0], s[1], s[2]);
+  check_tuple(3, s, t);
+
+  t = pmt::make_tuple(s[0], s[1], s[2], s[3]);
+  check_tuple(4, s, t);
+
+  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4]);
+  check_tuple(5, s, t);
+
+  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4], s[5]);
+  check_tuple(6, s, t);
+
+  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4], s[5], s[6]);
+  check_tuple(7, s, t);
+
+  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7]);
+  check_tuple(8, s, t);
+
+  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[8]);
+  check_tuple(9, s, t);
+
+  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[8], s[9]);
+  check_tuple(10, s, t);
+
+  t = pmt::make_tuple(s[0], s[1], s[2]);
+  CPPUNIT_ASSERT_THROW(pmt::tuple_ref(t, 3), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::vector_ref(t, 0), pmt::wrong_type);
+  CPPUNIT_ASSERT_THROW(pmt::tuple_ref(v, 0), pmt::wrong_type);
+
+  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[8], s[9]);
+  pmt::pmt_t t2 = pmt::to_tuple(v);
+  CPPUNIT_ASSERT_EQUAL(size_t(10), pmt::length(v));
+  CPPUNIT_ASSERT(pmt::equal(t, t2));
+  //std::cout << v << std::endl;
+  //std::cout << t2 << std::endl;
+
+
+  t = pmt::make_tuple(s[0], s[1], s[2]);
+  pmt::pmt_t list0 = pmt::list3(s[0], s[1], s[2]);
+  CPPUNIT_ASSERT_EQUAL(size_t(3), pmt::length(list0));
+  t2 = pmt::to_tuple(list0);
+  CPPUNIT_ASSERT_EQUAL(size_t(3), pmt::length(t2));
+  CPPUNIT_ASSERT(pmt::equal(t, t2));
+}
+
+void
+qa_pmt_prims::test_equivalence()
+{
+  pmt::pmt_t s0 = pmt::mp("s0");
+  pmt::pmt_t s1 = pmt::mp("s1");
+  pmt::pmt_t s2 = pmt::mp("s2");
+  pmt::pmt_t list0 = pmt::cons(s0, pmt::cons(s1, pmt::cons(s2, pmt::PMT_NIL)));
+  pmt::pmt_t list1 = pmt::cons(s0, pmt::cons(s1, pmt::cons(s2, pmt::PMT_NIL)));
+  pmt::pmt_t i0 = pmt::from_long(42);
+  pmt::pmt_t i1 = pmt::from_long(42);
+  pmt::pmt_t r0 = pmt::from_double(42);
+  pmt::pmt_t r1 = pmt::from_double(42);
+  pmt::pmt_t r2 = pmt::from_double(43);
+
+  CPPUNIT_ASSERT(pmt::eq(s0, s0));
+  CPPUNIT_ASSERT(!pmt::eq(s0, s1));
+  CPPUNIT_ASSERT(pmt::eqv(s0, s0));
+  CPPUNIT_ASSERT(!pmt::eqv(s0, s1));
+
+  CPPUNIT_ASSERT(pmt::eqv(i0, i1));
+  CPPUNIT_ASSERT(pmt::eqv(r0, r1));
+  CPPUNIT_ASSERT(!pmt::eqv(r0, r2));
+  CPPUNIT_ASSERT(!pmt::eqv(i0, r0));
+
+  CPPUNIT_ASSERT(!pmt::eq(list0, list1));
+  CPPUNIT_ASSERT(!pmt::eqv(list0, list1));
+  CPPUNIT_ASSERT(pmt::equal(list0, list1));
+
+  pmt::pmt_t v0 = pmt::make_vector(3, s0);
+  pmt::pmt_t v1 = pmt::make_vector(3, s0);
+  pmt::pmt_t v2 = pmt::make_vector(4, s0);
+  CPPUNIT_ASSERT(!pmt::eqv(v0, v1));
+  CPPUNIT_ASSERT(pmt::equal(v0, v1));
+  CPPUNIT_ASSERT(!pmt::equal(v0, v2));
+
+  pmt::vector_set(v0, 0, list0);
+  pmt::vector_set(v0, 1, list0);
+  pmt::vector_set(v1, 0, list1);
+  pmt::vector_set(v1, 1, list1);
+  CPPUNIT_ASSERT(pmt::equal(v0, v1));
+}
+
+void
+qa_pmt_prims::test_misc()
+{
+  pmt::pmt_t k0 = pmt::mp("k0");
+  pmt::pmt_t k1 = pmt::mp("k1");
+  pmt::pmt_t k2 = pmt::mp("k2");
+  pmt::pmt_t k3 = pmt::mp("k3");
+  pmt::pmt_t v0 = pmt::mp("v0");
+  pmt::pmt_t v1 = pmt::mp("v1");
+  pmt::pmt_t v2 = pmt::mp("v2");
+  pmt::pmt_t p0 = pmt::cons(k0, v0);
+  pmt::pmt_t p1 = pmt::cons(k1, v1);
+  pmt::pmt_t p2 = pmt::cons(k2, v2);
+
+  pmt::pmt_t alist = pmt::cons(p0, pmt::cons(p1, pmt::cons(p2, pmt::PMT_NIL)));
+  CPPUNIT_ASSERT(pmt::eq(p1, pmt::assv(k1, alist)));
+  CPPUNIT_ASSERT(pmt::eq(pmt::PMT_F, pmt::assv(k3, alist)));
+
+  pmt::pmt_t keys = pmt::cons(k0, pmt::cons(k1, pmt::cons(k2, pmt::PMT_NIL)));
+  pmt::pmt_t vals = pmt::cons(v0, pmt::cons(v1, pmt::cons(v2, pmt::PMT_NIL)));
+  CPPUNIT_ASSERT(pmt::equal(keys, pmt::map(pmt::car, alist)));
+  CPPUNIT_ASSERT(pmt::equal(vals, pmt::map(pmt::cdr, alist)));
+}
+
+void
+qa_pmt_prims::test_dict()
+{
+  pmt::pmt_t dict = pmt::make_dict();
+  CPPUNIT_ASSERT(pmt::is_dict(dict));
+
+  pmt::pmt_t k0 = pmt::mp("k0");
+  pmt::pmt_t k1 = pmt::mp("k1");
+  pmt::pmt_t k2 = pmt::mp("k2");
+  pmt::pmt_t k3 = pmt::mp("k3");
+  pmt::pmt_t v0 = pmt::mp("v0");
+  pmt::pmt_t v1 = pmt::mp("v1");
+  pmt::pmt_t v2 = pmt::mp("v2");
+  pmt::pmt_t v3 = pmt::mp("v3");
+  pmt::pmt_t not_found = pmt::cons(pmt::PMT_NIL, pmt::PMT_NIL);
+
+  CPPUNIT_ASSERT(!pmt::dict_has_key(dict, k0));
+  dict = pmt::dict_add(dict, k0, v0);
+  CPPUNIT_ASSERT(pmt::dict_has_key(dict, k0));
+  CPPUNIT_ASSERT(pmt::eqv(pmt::dict_ref(dict, k0, not_found), v0));
+  CPPUNIT_ASSERT(pmt::eqv(pmt::dict_ref(dict, k1, not_found), not_found));
+  dict = pmt::dict_add(dict, k1, v1);
+  dict = pmt::dict_add(dict, k2, v2);
+  CPPUNIT_ASSERT(pmt::eqv(pmt::dict_ref(dict, k1, not_found), v1));
+  dict = pmt::dict_add(dict, k1, v3);
+  CPPUNIT_ASSERT(pmt::eqv(pmt::dict_ref(dict, k1, not_found), v3));
+
+  pmt::pmt_t keys = pmt::list3(k1, k2, k0);
+  pmt::pmt_t vals = pmt::list3(v3, v2, v0);
+  //std::cout << "pmt::dict_keys:   " << pmt::dict_keys(dict) << std::endl;
+  //std::cout << "pmt::dict_values: " << pmt::dict_values(dict) << std::endl;
+  CPPUNIT_ASSERT(pmt::equal(keys, pmt::dict_keys(dict)));
+  CPPUNIT_ASSERT(pmt::equal(vals, pmt::dict_values(dict)));
+}
+
+void
+qa_pmt_prims::test_io()
+{
+  pmt::pmt_t k0 = pmt::mp("k0");
+  pmt::pmt_t k1 = pmt::mp("k1");
+  pmt::pmt_t k2 = pmt::mp("k2");
+  pmt::pmt_t k3 = pmt::mp("k3");
+
+  CPPUNIT_ASSERT_EQUAL(std::string("k0"), pmt::write_string(k0));
+}
+
+void
+qa_pmt_prims::test_lists()
+{
+  pmt::pmt_t s0 = pmt::mp("s0");
+  pmt::pmt_t s1 = pmt::mp("s1");
+  pmt::pmt_t s2 = pmt::mp("s2");
+  pmt::pmt_t s3 = pmt::mp("s3");
+
+  pmt::pmt_t l1 = pmt::list4(s0, s1, s2, s3);
+  pmt::pmt_t l2 = pmt::list3(s0, s1, s2);
+  pmt::pmt_t l3 = pmt::list_add(l2, s3);
+  CPPUNIT_ASSERT(pmt::equal(l1, l3));
+}
+
+// ------------------------------------------------------------------------
+
+// class foo is used in test_any below.
+// It can't be declared in the scope of test_any because of template
+// namespace problems.
+
+class foo {
+public:
+  double	d_double;
+  int		d_int;
+  foo(double d=0, int i=0) : d_double(d), d_int(i) {}
+};
+
+bool operator==(const foo &a, const foo &b)
+{
+  return a.d_double == b.d_double && a.d_int == b.d_int;
+}
+
+std::ostream& operator<<(std::ostream &os, const foo obj)
+{
+  os << "<foo: " << obj.d_double << ", " << obj.d_int << ">";
+  return os;
+}
+
+void
+qa_pmt_prims::test_any()
+{
+  boost::any a0;
+  boost::any a1;
+  boost::any a2;
+
+  a0 = std::string("Hello!");
+  a1 = 42;
+  a2 = foo(3.250, 21);
+
+  pmt::pmt_t p0 = pmt::make_any(a0);
+  pmt::pmt_t p1 = pmt::make_any(a1);
+  pmt::pmt_t p2 = pmt::make_any(a2);
+
+  CPPUNIT_ASSERT_EQUAL(std::string("Hello!"),
+		       boost::any_cast<std::string>(pmt::any_ref(p0)));
+
+  CPPUNIT_ASSERT_EQUAL(42,
+		       boost::any_cast<int>(pmt::any_ref(p1)));
+
+  CPPUNIT_ASSERT_EQUAL(foo(3.250, 21),
+		       boost::any_cast<foo>(pmt::any_ref(p2)));
+}
+
+// ------------------------------------------------------------------------
+
+class qa_pmt_msg_accepter_nop : public gr::messages::msg_accepter 
+{
+public:
+  qa_pmt_msg_accepter_nop(){};
+  ~qa_pmt_msg_accepter_nop();
+  void post(pmt::pmt_t,pmt::pmt_t){};
+};
+
+qa_pmt_msg_accepter_nop::~qa_pmt_msg_accepter_nop(){}
+
+void
+qa_pmt_prims::test_msg_accepter()
+{
+  pmt::pmt_t sym = pmt::mp("my-symbol");
+
+  boost::any a0;
+  a0 = std::string("Hello!");
+  pmt::pmt_t p0 = pmt::make_any(a0);
+  
+  gr::messages::msg_accepter_sptr ma0 =                                 \
+    gr::messages::msg_accepter_sptr(new qa_pmt_msg_accepter_nop());
+  pmt::pmt_t p1 = pmt::make_msg_accepter(ma0);
+
+  CPPUNIT_ASSERT_EQUAL(ma0.get(), pmt::msg_accepter_ref(p1).get());
+
+  CPPUNIT_ASSERT_THROW(pmt::msg_accepter_ref(sym), pmt::wrong_type);
+  CPPUNIT_ASSERT_THROW(pmt::msg_accepter_ref(p0),  pmt::wrong_type);
+
+  // just confirm interfaces on send are OK
+  pmt::pmt_t port(pmt::intern("port"));
+  gr::messages::send(ma0.get(), port, sym);
+  gr::messages::send(ma0, port, sym);
+  gr::messages::send(p1, port, sym);
+
+}
+
+// ------------------------------------------------------------------------
+
+void
+qa_pmt_prims::test_serialize()
+{
+  std::stringbuf sb;		// fake channel
+  pmt::pmt_t a = pmt::mp("a");
+  pmt::pmt_t b = pmt::mp("b");
+  pmt::pmt_t c = pmt::mp("c");
+
+  sb.str("");			// reset channel to empty
+
+  // write stuff to channel
+
+  pmt::serialize(pmt::PMT_NIL, sb);
+  pmt::serialize(pmt::mp("foobarvia"), sb);
+  pmt::serialize(pmt::from_long(123456789), sb);
+  pmt::serialize(pmt::from_long(-123456789), sb);
+  pmt::serialize(pmt::cons(pmt::PMT_NIL, pmt::PMT_NIL), sb);
+  pmt::serialize(pmt::cons(a, b), sb);
+  pmt::serialize(pmt::list1(a), sb);
+  pmt::serialize(pmt::list2(a, b), sb);
+  pmt::serialize(pmt::list3(a, b, c), sb);
+  pmt::serialize(pmt::list3(a, pmt::list3(c, b, a), c), sb);
+  pmt::serialize(pmt::PMT_T, sb);
+  pmt::serialize(pmt::PMT_F, sb);
+
+  // read it back
+
+  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::PMT_NIL));
+  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::mp("foobarvia")));
+  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::from_long(123456789)));
+  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::from_long(-123456789)));
+  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::cons(pmt::PMT_NIL, pmt::PMT_NIL)));
+  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::cons(a, b)));
+  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::list1(a)));
+  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::list2(a, b)));
+  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::list3(a, b, c)));
+  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::list3(a, pmt::list3(c, b, a), c)));
+  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::PMT_T));
+  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::PMT_F));
+
+  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::PMT_EOF));	// last item
+
+
+  // FIXME add tests for real, complex, vector, uniform-vector, dict
+  // FIXME add tests for malformed input too.
+
+}
+
+void
+qa_pmt_prims::test_sets()
+{
+  pmt::pmt_t s1 = pmt::mp("s1");
+  pmt::pmt_t s2 = pmt::mp("s2");
+  pmt::pmt_t s3 = pmt::mp("s3");
+
+  pmt::pmt_t l1 = pmt::list1(s1);
+  pmt::pmt_t l2 = pmt::list2(s2,s3);
+  pmt::pmt_t l3 = pmt::list3(s1,s2,s3);
+
+  CPPUNIT_ASSERT(pmt::is_pair(pmt::memq(s1,l1)));
+  CPPUNIT_ASSERT(pmt::is_false(pmt::memq(s3,l1)));
+
+  CPPUNIT_ASSERT(pmt::subsetp(l1,l3));
+  CPPUNIT_ASSERT(pmt::subsetp(l2,l3));
+  CPPUNIT_ASSERT(!pmt::subsetp(l1,l2));
+  CPPUNIT_ASSERT(!pmt::subsetp(l2,l1));
+  CPPUNIT_ASSERT(!pmt::subsetp(l3,l2));
+}
+
+void
+qa_pmt_prims::test_sugar()
+{
+  CPPUNIT_ASSERT(pmt::is_symbol(pmt::mp("my-symbol")));
+  CPPUNIT_ASSERT_EQUAL((long) 10, pmt::to_long(pmt::mp(10)));
+  CPPUNIT_ASSERT_EQUAL((double) 1e6, pmt::to_double(pmt::mp(1e6)));
+  CPPUNIT_ASSERT_EQUAL(std::complex<double>(2, 3),
+		       pmt::to_complex(pmt::mp(std::complex<double>(2, 3))));
+
+  int buf[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+  pmt::pmt_t blob = pmt::mp(buf, sizeof(buf));
+  const void *data = pmt::blob_data(blob);
+  size_t nbytes = pmt::blob_length(blob);
+  CPPUNIT_ASSERT_EQUAL(sizeof(buf), nbytes);
+  CPPUNIT_ASSERT(memcmp(buf, data, nbytes) == 0);
+}
diff --git a/gnuradio-runtime/lib/pmt/qa_pmt_prims.h b/gnuradio-runtime/lib/pmt/qa_pmt_prims.h
new file mode 100644
index 0000000000..8c3f5c6220
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/qa_pmt_prims.h
@@ -0,0 +1,77 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+#ifndef INCLUDED_QA_PMT_PRIMS_H
+#define INCLUDED_QA_PMT_PRIMS_H
+
+#include <attributes.h>
+#include <pmt/api.h> //reason: suppress warnings
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestCase.h>
+
+class __GR_ATTR_EXPORT qa_pmt_prims : public CppUnit::TestCase {
+
+  CPPUNIT_TEST_SUITE(qa_pmt_prims);
+  CPPUNIT_TEST(test_symbols);
+  CPPUNIT_TEST(test_booleans);
+  CPPUNIT_TEST(test_integers);
+  CPPUNIT_TEST(test_uint64s);
+  CPPUNIT_TEST(test_reals);
+  CPPUNIT_TEST(test_complexes);
+  CPPUNIT_TEST(test_pairs);
+  CPPUNIT_TEST(test_vectors);
+  CPPUNIT_TEST(test_tuples);
+  CPPUNIT_TEST(test_equivalence);
+  CPPUNIT_TEST(test_misc);
+  CPPUNIT_TEST(test_dict);
+  CPPUNIT_TEST(test_any);
+  CPPUNIT_TEST(test_msg_accepter);
+  CPPUNIT_TEST(test_io);
+  CPPUNIT_TEST(test_lists);
+  CPPUNIT_TEST(test_serialize);
+  CPPUNIT_TEST(test_sets);
+  CPPUNIT_TEST(test_sugar);
+  CPPUNIT_TEST_SUITE_END();
+
+ private:
+  void test_symbols();
+  void test_booleans();
+  void test_integers();
+  void test_uint64s();
+  void test_reals();
+  void test_complexes();
+  void test_pairs();
+  void test_vectors();
+  void test_tuples();
+  void test_equivalence();
+  void test_misc();
+  void test_dict();
+  void test_any();
+  void test_msg_accepter();
+  void test_io();
+  void test_lists();
+  void test_serialize();
+  void test_sets();
+  void test_sugar();
+};
+
+#endif /* INCLUDED_QA_PMT_PRIMS_H */
+
diff --git a/gnuradio-runtime/lib/pmt/unv_qa_template.cc.t b/gnuradio-runtime/lib/pmt/unv_qa_template.cc.t
new file mode 100644
index 0000000000..a04d532b4e
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/unv_qa_template.cc.t
@@ -0,0 +1,35 @@
+void
+qa_pmt_unv::test_@TAG@vector()
+{
+  static const size_t N = 3;
+  pmt_t v1 = pmt::make_@TAG@vector(N, 0);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  @TYPE@ s0 = @TYPE@(10);
+  @TYPE@ s1 = @TYPE@(20);
+  @TYPE@ s2 = @TYPE@(30);
+
+  pmt::@TAG@vector_set(v1, 0, s0);
+  pmt::@TAG@vector_set(v1, 1, s1);
+  pmt::@TAG@vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::@TAG@vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::@TAG@vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::@TAG@vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::@TAG@vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::@TAG@vector_set(v1, N, @TYPE@(0)), pmt::out_of_range);
+
+  size_t	len;
+  const @TYPE@ *rd = pmt::@TAG@vector_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
+
+  @TYPE@ *wr = pmt::@TAG@vector_writable_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  wr[0] = @TYPE@(0);
+  CPPUNIT_ASSERT_EQUAL(@TYPE@(0), wr[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
+}
diff --git a/gnuradio-runtime/lib/pmt/unv_template.cc.t b/gnuradio-runtime/lib/pmt/unv_template.cc.t
new file mode 100644
index 0000000000..8678894973
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/unv_template.cc.t
@@ -0,0 +1,141 @@
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_@TAG@vector
+////////////////////////////////////////////////////////////////////////////
+
+namespace pmt {
+
+static pmt_@TAG@vector *
+_@TAG@vector(pmt_t x)
+{
+  return dynamic_cast<pmt_@TAG@vector*>(x.get());
+}
+
+
+pmt_@TAG@vector::pmt_@TAG@vector(size_t k, @TYPE@ fill)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = fill;
+}
+
+pmt_@TAG@vector::pmt_@TAG@vector(size_t k, const @TYPE@ *data)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = data[i];
+}
+
+@TYPE@
+pmt_@TAG@vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_@TAG@vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_@TAG@vector::set(size_t k, @TYPE@ x)
+{
+  if (k >= length())
+    throw out_of_range("pmt_@TAG@vector_set", from_long(k));
+  d_v[k] = x;
+}
+
+const @TYPE@ *
+pmt_@TAG@vector::elements(size_t &len)
+{
+  len = length();
+  return &d_v[0];
+}
+
+@TYPE@ *
+pmt_@TAG@vector::writable_elements(size_t &len)
+{
+  len = length();
+  return &d_v[0];
+}
+
+const void*
+pmt_@TAG@vector::uniform_elements(size_t &len)
+{
+  len = length() * sizeof(@TYPE@);
+  return &d_v[0];
+}
+
+void*
+pmt_@TAG@vector::uniform_writable_elements(size_t &len)
+{
+  len = length() * sizeof(@TYPE@);
+  return &d_v[0];
+}
+
+bool
+is_@TAG@vector(pmt_t obj)
+{
+  return obj->is_@TAG@vector();
+}
+
+pmt_t
+make_@TAG@vector(size_t k, @TYPE@ fill)
+{
+  return pmt_t(new pmt_@TAG@vector(k, fill));
+}
+
+pmt_t
+init_@TAG@vector(size_t k, const @TYPE@ *data)
+{
+  return pmt_t(new pmt_@TAG@vector(k, data));
+}
+
+pmt_t
+init_@TAG@vector(size_t k, const std::vector< @TYPE@ > &data)
+{
+  
+  return pmt_t(new pmt_@TAG@vector(k, &data[0]));
+}
+
+@TYPE@
+@TAG@vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_@TAG@vector())
+    throw wrong_type("pmt_@TAG@vector_ref", vector);
+  return _@TAG@vector(vector)->ref(k);
+}
+
+void
+@TAG@vector_set(pmt_t vector, size_t k, @TYPE@ obj)
+{
+  if (!vector->is_@TAG@vector())
+    throw wrong_type("pmt_@TAG@vector_set", vector);
+  _@TAG@vector(vector)->set(k, obj);
+}
+
+const @TYPE@ *
+@TAG@vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_@TAG@vector())
+    throw wrong_type("pmt_@TAG@vector_elements", vector);
+  return _@TAG@vector(vector)->elements(len);
+}
+
+const std::vector< @TYPE@ >
+@TAG@vector_elements(pmt_t vector)
+{
+  if (!vector->is_@TAG@vector())
+    throw wrong_type("pmt_@TAG@vector_elements", vector);
+  size_t len;
+  const @TYPE@ *array = _@TAG@vector(vector)->elements(len);
+  const std::vector< @TYPE@ > vec(array, array+len);
+  return vec;
+}
+
+
+@TYPE@ *
+@TAG@vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_@TAG@vector())
+    throw wrong_type("pmt_@TAG@vector_writable_elements", vector);
+  return _@TAG@vector(vector)->writable_elements(len);
+}
+
+} /* namespace pmt */
diff --git a/gnuradio-runtime/lib/pmt/unv_template.h.t b/gnuradio-runtime/lib/pmt/unv_template.h.t
new file mode 100644
index 0000000000..83ba0be0f4
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/unv_template.h.t
@@ -0,0 +1,23 @@
+
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_@TAG@vector
+////////////////////////////////////////////////////////////////////////////
+
+class pmt_@TAG@vector : public pmt_uniform_vector
+{
+  std::vector< @TYPE@ >	d_v;
+
+public:
+  pmt_@TAG@vector(size_t k, @TYPE@ fill);
+  pmt_@TAG@vector(size_t k, const @TYPE@ *data);
+  // ~pmt_@TAG@vector();
+
+  bool is_@TAG@vector() const { return true; }
+  size_t length() const { return d_v.size(); }
+  @TYPE@ ref(size_t k) const;
+  void set(size_t k, @TYPE@ x);
+  const @TYPE@ *elements(size_t &len);
+  @TYPE@ *writable_elements(size_t &len);
+  const void *uniform_elements(size_t &len);
+  void *uniform_writable_elements(size_t &len);
+};
diff --git a/gnuradio-runtime/lib/qa_runtime.h b/gnuradio-runtime/lib/qa_runtime.h
index da71cbd0f4..b03e3db721 100644
--- a/gnuradio-runtime/lib/qa_runtime.h
+++ b/gnuradio-runtime/lib/qa_runtime.h
@@ -23,7 +23,7 @@
 #ifndef _QA_RUNTIME_H_
 #define _QA_RUNTIME_H_
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 #include <cppunit/TestSuite.h>
 
 //! collect all the tests for the runtime directory
diff --git a/gnuradio-runtime/lib/qa_sincos.cc b/gnuradio-runtime/lib/qa_sincos.cc
index 54be957546..be163117de 100644
--- a/gnuradio-runtime/lib/qa_sincos.cc
+++ b/gnuradio-runtime/lib/qa_sincos.cc
@@ -26,7 +26,7 @@
 
 #include <qa_sincos.h>
 #include <gr_sincos.h>
-#include <gruel/attributes.h>
+#include <attributes.h>
 #include <cppunit/TestAssert.h>
 #include <cmath>
 
diff --git a/gnuradio-runtime/lib/realtime.cc b/gnuradio-runtime/lib/realtime.cc
new file mode 100644
index 0000000000..5dadc26bbd
--- /dev/null
+++ b/gnuradio-runtime/lib/realtime.cc
@@ -0,0 +1,178 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2007,2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <realtime.h>
+
+#ifdef HAVE_SCHED_H
+#include <sched.h>
+#endif
+
+#include <algorithm>
+#include <math.h>
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
+
+#if defined(HAVE_PTHREAD_SETSCHEDPARAM) || defined(HAVE_SCHED_SETSCHEDULER)
+#include <pthread.h>
+
+namespace gr {
+
+  /*!
+   * Rescale our virtual priority so that it maps to the middle 1/2 of
+   * the priorities given by min_real_pri and max_real_pri.
+   */
+  static int
+  rescale_virtual_pri(int virtual_pri, int min_real_pri, int max_real_pri)
+  {
+    float rmin = min_real_pri + (0.25 * (max_real_pri - min_real_pri));
+    float rmax = min_real_pri + (0.75 * (max_real_pri - min_real_pri));
+    float m = (rmax - rmin) / (rt_priority_max() - rt_priority_min());
+    float y = m * (virtual_pri - rt_priority_min()) + rmin;
+    int   y_int = static_cast<int>(rint(y));
+    return std::max(min_real_pri, std::min(max_real_pri, y_int));
+  }
+
+}  // namespace gr
+
+#endif
+
+
+#if defined(HAVE_PTHREAD_SETSCHEDPARAM)
+
+namespace gr {
+
+  rt_status_t
+  enable_realtime_scheduling(rt_sched_param p)
+  {
+    int policy = p.policy == RT_SCHED_FIFO ? SCHED_FIFO : SCHED_RR;
+    int min_real_pri = sched_get_priority_min(policy);
+    int max_real_pri = sched_get_priority_max(policy);
+    int pri = rescale_virtual_pri(p.priority, min_real_pri, max_real_pri);
+
+    // FIXME check hard and soft limits with getrlimit, and limit the value we ask for.
+    // fprintf(stderr, "pthread_setschedparam: policy = %d, pri = %d\n", policy, pri);
+
+    struct sched_param param;
+    memset (&param, 0, sizeof (param));
+    param.sched_priority = pri;
+    int result = pthread_setschedparam (pthread_self(), policy, &param);
+    if (result != 0) {
+      if (result == EPERM)	// N.B., return value, not errno
+        return RT_NO_PRIVS;
+      else {
+	fprintf(stderr,
+		"pthread_setschedparam: failed to set real time priority: %s\n",
+		strerror(result));
+        return RT_OTHER_ERROR;
+      }
+    }
+
+    //printf("SCHED_FIFO enabled with priority = %d\n", pri);
+    return RT_OK;
+  }
+} // namespace gr
+
+
+#elif defined(HAVE_SCHED_SETSCHEDULER)
+
+namespace gr {
+
+  rt_status_t
+  enable_realtime_scheduling(rt_sched_param p)
+  {
+    int policy = p.policy == RT_SCHED_FIFO ? SCHED_FIFO : SCHED_RR;
+    int min_real_pri = sched_get_priority_min(policy);
+    int max_real_pri = sched_get_priority_max(policy);
+    int pri = rescale_virtual_pri(p.priority, min_real_pri, max_real_pri);
+
+    // FIXME check hard and soft limits with getrlimit, and limit the value we ask for.
+    // fprintf(stderr, "sched_setscheduler: policy = %d, pri = %d\n", policy, pri);
+
+    int pid = 0;  // this process
+    struct sched_param param;
+    memset(&param, 0, sizeof(param));
+    param.sched_priority = pri;
+    int result = sched_setscheduler(pid, policy, &param);
+    if (result != 0){
+      if (errno == EPERM)
+        return RT_NO_PRIVS;
+      else {
+        perror ("sched_setscheduler: failed to set real time priority");
+        return RT_OTHER_ERROR;
+      }
+    }
+
+    //printf("SCHED_FIFO enabled with priority = %d\n", pri);
+    return RT_OK;
+  }
+
+} // namespace gr
+
+#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+
+#include <windows.h>
+
+namespace gr {
+
+    rt_status_t enable_realtime_scheduling(rt_sched_param p){
+
+        //set the priority class on the process
+        int pri_class = (true)? REALTIME_PRIORITY_CLASS : NORMAL_PRIORITY_CLASS;
+        if (SetPriorityClass(GetCurrentProcess(), pri_class) == 0)
+            return RT_OTHER_ERROR;
+
+        //scale the priority value to the constants
+        int priorities[] = {
+            THREAD_PRIORITY_IDLE, THREAD_PRIORITY_LOWEST, THREAD_PRIORITY_BELOW_NORMAL, THREAD_PRIORITY_NORMAL,
+            THREAD_PRIORITY_ABOVE_NORMAL, THREAD_PRIORITY_HIGHEST, THREAD_PRIORITY_TIME_CRITICAL
+        };
+        const double priority = double(p.priority)/(rt_priority_max() - rt_priority_min());
+        size_t pri_index = size_t((priority+1.0)*6/2.0); // -1 -> 0, +1 -> 6
+        pri_index %= sizeof(priorities)/sizeof(*priorities); //range check
+
+        //set the thread priority on the thread
+        if (SetThreadPriority(GetCurrentThread(), priorities[pri_index]) == 0)
+            return RT_OTHER_ERROR;
+
+        //printf("SetPriorityClass + SetThreadPriority\n");
+        return RT_OK;
+    }
+
+} // namespace gr
+
+#else
+
+namespace gr {
+
+  rt_status_t
+  enable_realtime_scheduling(rt_sched_param p)
+  {
+    return RT_NOT_IMPLEMENTED;
+  }
+} // namespace gr
+
+#endif
diff --git a/gnuradio-runtime/lib/rpcserver_ice.cc b/gnuradio-runtime/lib/rpcserver_ice.cc
index 12229a0688..2454bf2580 100644
--- a/gnuradio-runtime/lib/rpcserver_ice.cc
+++ b/gnuradio-runtime/lib/rpcserver_ice.cc
@@ -26,7 +26,7 @@
 #include <iostream>
 #include <sstream>
 #include <stdexcept>
-#include <gruel/pmt.h>
+#include <pmt/pmt.h>
 
 #define DEBUG 0
 
diff --git a/gnuradio-runtime/lib/sys_pri.cc b/gnuradio-runtime/lib/sys_pri.cc
new file mode 100644
index 0000000000..aa005ecd75
--- /dev/null
+++ b/gnuradio-runtime/lib/sys_pri.cc
@@ -0,0 +1,63 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys_pri.h>
+
+namespace gr {
+
+  /*
+   * These may need per-OS tweaking.
+   *
+   * Under linux virtual_pri ->	system_pri
+   *   0 ->   0
+   *   1 ->   5
+   *   2 ->  10
+   *   3 ->  15
+   *   4 ->  20		// typically used by jack and pulse audio
+   *   5 ->  25
+   *   6 ->  30
+   *   7 ->  35
+   *   8 ->  40
+   *   9 ->  45
+   *  10 ->  50
+   *  11 ->  54
+   *  12 ->  59
+   *  13 ->  64
+   *  14 ->  69
+   *  15 ->  74
+   */
+  rt_sched_param
+  sys_pri::python()		{ return rt_sched_param(0, RT_SCHED_RR); }
+
+  rt_sched_param
+  sys_pri::normal()		{ return rt_sched_param(2, RT_SCHED_RR); }
+
+  rt_sched_param
+  sys_pri::gcell_event_handler(){ return rt_sched_param(5, RT_SCHED_FIFO); }
+
+  rt_sched_param
+  sys_pri::usrp2_backend()	{ return rt_sched_param(6, RT_SCHED_FIFO); }
+
+} /* namespace gr */
diff --git a/gnuradio-runtime/lib/thread/CMakeLists.txt b/gnuradio-runtime/lib/thread/CMakeLists.txt
new file mode 100644
index 0000000000..de46dd8932
--- /dev/null
+++ b/gnuradio-runtime/lib/thread/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Copyright 2010,2013 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+########################################################################
+# This file included, use CMake directory variables
+########################################################################
+
+list(APPEND gnuradio_runtime_sources
+  ${CMAKE_CURRENT_SOURCE_DIR}/thread.cc
+  ${CMAKE_CURRENT_SOURCE_DIR}/thread_body_wrapper.cc
+  ${CMAKE_CURRENT_SOURCE_DIR}/thread_group.cc
+)
diff --git a/gnuradio-runtime/lib/thread/thread.cc b/gnuradio-runtime/lib/thread/thread.cc
new file mode 100644
index 0000000000..af0822445d
--- /dev/null
+++ b/gnuradio-runtime/lib/thread/thread.cc
@@ -0,0 +1,238 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012-2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <thread/thread.h>
+
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+
+#include <Windows.h>
+
+namespace gr {
+  namespace thread {
+
+    gr_thread_t
+    get_current_thread_id()
+    {
+      return GetCurrentThread();
+    }
+
+    void
+    thread_bind_to_processor(int n)
+    {
+      std::vector<int> mask(1, n);
+      thread_bind_to_processor(get_current_thread_id(), mask);
+    }
+
+    void
+    thread_bind_to_processor(const std::vector<int> &mask)
+    {
+      thread_bind_to_processor(get_current_thread_id(), mask);
+    }
+
+    void
+    thread_bind_to_processor(gr_thread_t thread, int n)
+    {
+      std::vector<int> mask(1, n);
+      thread_bind_to_processor(thread, mask);
+    }
+
+    void
+    thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask)
+    {
+      //DWORD_PTR mask = (1 << n);
+      DWORD_PTR dword_mask = 0;
+
+      std::vector<int> _mask = mask;
+      std::vector<int>::iterator itr;
+      for(itr = _mask.begin(); itr != _mask.end(); itr++)
+        dword_mask |= (1 << (*itr));
+
+      DWORD_PTR ret = SetThreadAffinityMask(thread, dword_mask);
+      if(ret == 0) {
+        std::stringstream s;
+        s << "thread_bind_to_processor failed with error: " 
+          << GetLastError() << std::endl;
+        throw std::runtime_error(s.str());
+      }
+    }
+
+    void
+    thread_unbind()
+    {
+      thread_unbind(get_current_thread_id());
+    }
+
+    void
+    thread_unbind(gr_thread_t thread)
+    {
+      DWORD_PTR dword_mask = sizeof(DWORD_PTR) - 1;
+      DWORD_PTR ret = SetThreadAffinityMask(thread, dword_mask);
+      if(ret == 0) {
+        std::stringstream s;
+        s << "thread_unbind failed with error: "
+          << GetLastError() << std::endl;
+        throw std::runtime_error(s.str());
+      }
+    }
+
+  } /* namespace thread */
+} /* namespace gr */
+
+
+#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
+
+namespace gr {
+  namespace thread {
+
+    gr_thread_t
+    get_current_thread_id()
+    {
+      // Not implemented on OSX
+    }
+
+    void
+    thread_bind_to_processor(int n)
+    {
+      // Not implemented on OSX
+    }
+
+    void
+    thread_bind_to_processor(gr_thread_t thread, int n)
+    {
+      // Not implemented on OSX
+    }
+
+    void
+    thread_bind_to_processor(const std::vector<int> &mask)
+    {
+      // Not implemented on OSX
+    }
+
+    void
+    thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask)
+    {
+      // Not implemented on OSX
+    }
+
+    void
+    thread_unbind()
+    {
+      // Not implemented on OSX
+    }
+
+    void
+    thread_unbind(gr_thread_t thread)
+    {
+      // Not implemented on OSX
+    }
+
+  } /* namespace thread */
+} /* namespace gr */
+
+#else
+
+#include <sstream>
+#include <stdexcept>
+#include <pthread.h>
+
+namespace gr {
+  namespace thread {
+
+    gr_thread_t
+    get_current_thread_id()
+    {
+      return pthread_self();
+    }
+
+    void
+    thread_bind_to_processor(int n)
+    {
+      std::vector<int> mask(1, n);
+      thread_bind_to_processor(get_current_thread_id(), mask);
+    }
+
+    void
+    thread_bind_to_processor(const std::vector<int> &mask)
+    {
+      thread_bind_to_processor(get_current_thread_id(), mask);
+    }
+
+    void
+    thread_bind_to_processor(gr_thread_t thread, int n)
+    {
+      std::vector<int> mask(1, n);
+      thread_bind_to_processor(thread, mask);
+    }
+
+    void
+    thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask)
+    {
+      cpu_set_t set;
+      size_t len = sizeof(cpu_set_t);
+      std::vector<int> _mask = mask;
+      std::vector<int>::iterator itr;
+
+      CPU_ZERO(&set);
+      for(itr = _mask.begin(); itr != _mask.end(); itr++)
+        CPU_SET(*itr, &set);
+
+      int ret = pthread_setaffinity_np(thread, len, &set);
+      if(ret != 0) {
+        std::stringstream s;
+        s << "thread_bind_to_processor failed with error: " << ret << std::endl;
+        throw std::runtime_error(s.str());
+      }
+    }
+
+    void
+    thread_unbind()
+    {
+      thread_unbind(get_current_thread_id());
+    }
+
+    void
+    thread_unbind(gr_thread_t thread)
+    {
+      cpu_set_t set;
+      size_t len = sizeof(cpu_set_t);
+
+      CPU_ZERO(&set);
+      long ncpus = sysconf(_SC_NPROCESSORS_ONLN);
+      for(long n = 0; n < ncpus; n++) {
+        CPU_SET(n, &set);
+      }
+
+      int ret = pthread_setaffinity_np(thread, len, &set);
+      if(ret != 0) {
+        std::stringstream s;
+        s << "thread_unbind failed with error: " << ret << std::endl;
+        throw std::runtime_error(s.str());
+      }
+    }
+
+  } /* namespace thread */
+} /* namespace gr */
+
+#endif
diff --git a/gnuradio-runtime/lib/thread/thread_body_wrapper.cc b/gnuradio-runtime/lib/thread/thread_body_wrapper.cc
new file mode 100644
index 0000000000..47feafdd42
--- /dev/null
+++ b/gnuradio-runtime/lib/thread/thread_body_wrapper.cc
@@ -0,0 +1,91 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <thread/thread_body_wrapper.h>
+
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+
+#include <stdio.h>
+
+namespace gr {
+  namespace thread {
+
+#if defined(HAVE_PTHREAD_SIGMASK) && defined(HAVE_SIGNAL_H)
+
+    void mask_signals()
+    {
+      sigset_t	new_set;
+      int r;
+
+      sigemptyset(&new_set);
+      sigaddset(&new_set, SIGHUP);	// block these...
+      sigaddset(&new_set, SIGINT);
+      sigaddset(&new_set, SIGPIPE);
+      sigaddset(&new_set, SIGALRM);
+      sigaddset(&new_set, SIGTERM);
+      sigaddset(&new_set, SIGUSR1);
+      sigaddset(&new_set, SIGCHLD);
+#ifdef SIGPOLL
+      sigaddset(&new_set, SIGPOLL);
+#endif
+#ifdef SIGPROF
+      sigaddset(&new_set, SIGPROF);
+#endif
+#ifdef SIGSYS
+      sigaddset(&new_set, SIGSYS);
+#endif
+#ifdef SIGTRAP
+      sigaddset(&new_set, SIGTRAP);
+#endif
+#ifdef SIGURG
+      sigaddset(&new_set, SIGURG);
+#endif
+#ifdef SIGVTALRM
+      sigaddset(&new_set, SIGVTALRM);
+#endif
+#ifdef SIGXCPU
+      sigaddset(&new_set, SIGXCPU);
+#endif
+#ifdef SIGXFSZ
+      sigaddset(&new_set, SIGXFSZ);
+#endif
+      r = pthread_sigmask(SIG_BLOCK, &new_set, 0);
+      if(r != 0)
+        perror("pthread_sigmask");
+    }
+
+#else
+
+    void mask_signals()
+    {
+    }
+
+#endif
+
+  } /* namespace thread */
+} /* namespace gr */
+
diff --git a/gnuradio-runtime/lib/thread/thread_group.cc b/gnuradio-runtime/lib/thread/thread_group.cc
new file mode 100644
index 0000000000..034fe82e75
--- /dev/null
+++ b/gnuradio-runtime/lib/thread/thread_group.cc
@@ -0,0 +1,98 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2001-2003 William E. Kempf
+ * Copyright (C) 2007 Anthony Williams
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+/*
+ * This was extracted from Boost 1.35.0 and fixed.
+ */
+
+#include <thread/thread_group.h>
+
+namespace gr {
+  namespace thread {
+
+    thread_group::thread_group()
+    {
+    }
+
+    thread_group::~thread_group()
+    {
+      // We shouldn't have to scoped_lock here, since referencing this
+      // object from another thread while we're deleting it in the
+      // current thread is going to lead to undefined behavior any
+      // way.
+      for(std::list<boost::thread*>::iterator it = m_threads.begin();
+          it != m_threads.end(); ++it) {
+        delete (*it);
+      }
+    }
+
+    boost::thread* thread_group::create_thread(const boost::function0<void>& threadfunc)
+    {
+      // No scoped_lock required here since the only "shared data" that's
+      // modified here occurs inside add_thread which does scoped_lock.
+      std::auto_ptr<boost::thread> thrd(new boost::thread(threadfunc));
+      add_thread(thrd.get());
+      return thrd.release();
+    }
+
+    void thread_group::add_thread(boost::thread* thrd)
+    {
+      boost::lock_guard<boost::shared_mutex> guard(m_mutex);
+
+      // For now we'll simply ignore requests to add a thread object
+      // multiple times. Should we consider this an error and either
+      // throw or return an error value?
+      std::list<boost::thread*>::iterator it = std::find(m_threads.begin(),
+                                                         m_threads.end(), thrd);
+      BOOST_ASSERT(it == m_threads.end());
+      if(it == m_threads.end())
+        m_threads.push_back(thrd);
+    }
+
+    void thread_group::remove_thread(boost::thread* thrd)
+    {
+      boost::lock_guard<boost::shared_mutex> guard(m_mutex);
+
+      // For now we'll simply ignore requests to remove a thread
+      // object that's not in the group. Should we consider this an
+      // error and either throw or return an error value?
+      std::list<boost::thread*>::iterator it = std::find(m_threads.begin(),
+                                                         m_threads.end(), thrd);
+      BOOST_ASSERT(it != m_threads.end());
+      if(it != m_threads.end())
+        m_threads.erase(it);
+    }
+
+    void thread_group::join_all()
+    {
+      boost::shared_lock<boost::shared_mutex> guard(m_mutex);
+      for(std::list<boost::thread*>::iterator it = m_threads.begin();
+           it != m_threads.end(); ++it) {
+	(*it)->join();
+      }
+    }
+
+    void thread_group::interrupt_all()
+    {
+      boost::shared_lock<boost::shared_mutex> guard(m_mutex);
+      for(std::list<boost::thread*>::iterator it=m_threads.begin(),end=m_threads.end();
+          it!=end; ++it) {
+	(*it)->interrupt();
+      }
+    }
+
+    size_t thread_group::size() const
+    {
+      boost::shared_lock<boost::shared_mutex> guard(m_mutex);
+      return m_threads.size();
+    }
+
+  } /* namespace thread */
+} /* namespace gr */
diff --git a/gnuradio-runtime/python/CMakeLists.txt b/gnuradio-runtime/python/CMakeLists.txt
index 74adec3f11..fc19721778 100644
--- a/gnuradio-runtime/python/CMakeLists.txt
+++ b/gnuradio-runtime/python/CMakeLists.txt
@@ -21,3 +21,4 @@
 include(GrPython)
 
 add_subdirectory(gnuradio)
+add_subdirectory(pmt)
diff --git a/gnuradio-runtime/python/gnuradio/gr/hier_block2.py b/gnuradio-runtime/python/gnuradio/gr/hier_block2.py
index 31e4065a25..a254a58c72 100644
--- a/gnuradio-runtime/python/gnuradio/gr/hier_block2.py
+++ b/gnuradio-runtime/python/gnuradio/gr/hier_block2.py
@@ -20,11 +20,7 @@
 #
 
 from runtime_swig import hier_block2_swig
-
-try:
-    import pmt
-except ImportError:
-    from gruel import pmt
+import pmt
 
 #
 # This hack forces a 'has-a' relationship to look like an 'is-a' one.
diff --git a/gnuradio-runtime/python/gnuradio/gr/tag_utils.py b/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
index 1c9594d6d0..8de7110e3f 100644
--- a/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
+++ b/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
@@ -20,8 +20,7 @@
 #
 """ Conversion tools between stream tags and Python objects """
 
-try: import pmt
-except: from gruel import pmt
+import pmt
 
 try:
     from gnuradio import gr
diff --git a/gnuradio-runtime/python/pmt/CMakeLists.txt b/gnuradio-runtime/python/pmt/CMakeLists.txt
new file mode 100644
index 0000000000..a9bf85a622
--- /dev/null
+++ b/gnuradio-runtime/python/pmt/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Copyright 2011,2013 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+include(GrPython)
+
+########################################################################
+# Install python files
+########################################################################
+GR_PYTHON_INSTALL(FILES
+    __init__.py
+    pmt_to_python.py
+    DESTINATION ${GR_PYTHON_DIR}/pmt
+    COMPONENT "runtime_python"
+)
+
+########################################################################
+# Setup unit tests
+########################################################################
+if(ENABLE_TESTING)
+include(GrTest)
+file(GLOB py_qa_test_files "qa_*.py")
+foreach(py_qa_test_file ${py_qa_test_files})
+    get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
+    set(GR_TEST_PYTHON_DIRS
+        ${CMAKE_BINARY_DIR}/gnuradio-runtime/python
+        ${CMAKE_BINARY_DIR}/gnuradio-runtime/swig
+    )
+    set(GR_TEST_TARGET_DEPS gnuradio-runtime)
+    GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+endforeach(py_qa_test_file)
+endif(ENABLE_TESTING)
diff --git a/gnuradio-runtime/python/pmt/__init__.py b/gnuradio-runtime/python/pmt/__init__.py
new file mode 100644
index 0000000000..bc933e80a5
--- /dev/null
+++ b/gnuradio-runtime/python/pmt/__init__.py
@@ -0,0 +1,31 @@
+#
+# Copyright 2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+# The presence of this file turns this directory into a Python package
+
+'''
+The GNU Radio Utility Etcetera Library's Polymorphic Types for Python.
+'''
+
+from pmt_swig import *
+from pmt_to_python import pmt_to_python as to_python
+from pmt_to_python import python_to_pmt as to_pmt
+
diff --git a/gnuradio-runtime/python/pmt/pmt_to_python.py b/gnuradio-runtime/python/pmt/pmt_to_python.py
new file mode 100644
index 0000000000..e551f4e983
--- /dev/null
+++ b/gnuradio-runtime/python/pmt/pmt_to_python.py
@@ -0,0 +1,97 @@
+# Copyright 2012,2013 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+try: import pmt_swig as pmt
+except: import pmt
+import numpy
+
+#define missing
+def pmt_to_tuple(p):
+    elems = list()
+    for i in range(pmt.length(p)):
+        elem = pmt.tuple_ref(p, i)
+        elems.append(pmt_to_python(elem))
+    return tuple(elems)
+
+def pmt_from_tuple(p):
+    args = map(python_to_pmt, p)
+    return pmt.make_tuple(*args)
+
+def pmt_to_vector(p):
+    v = list()
+    for i in range(pmt.length(p)):
+        elem = pmt.vector_ref(p, i)
+        v.append(pmt_to_python(elem))
+    return v
+
+def pmt_from_vector(p):
+    v = pmt.make_vector(len(p), pmt.PMT_NIL)
+    for i, elem in enumerate(p):
+        pmt.vector_set(v, i, python_to_pmt(elem))
+    return v
+
+def pmt_to_dict(p):
+    d = dict()
+    items = pmt.dict_items(p)
+    for i in range(pmt.length(items)):
+        pair = pmt.nth(i, items)
+        k = pmt.car(pair)
+        v = pmt.cdr(pair)
+        d[pmt_to_python(k)] = pmt_to_python(v)
+    return d
+
+def pmt_from_dict(p):
+    d = pmt.make_dict()
+    for k, v in p.iteritems():
+        #dict is immutable -> therefore pmt_dict_add returns the new dict
+        d = pmt.dict_add(d, python_to_pmt(k), python_to_pmt(v))
+    return d
+
+def numpy_to_blob(p):
+    p = p.view(numpy.uint8)
+    b = pmt.make_blob(len(p))
+    pmt.blob_data(b)[:] = p
+    return b
+
+THE_TABLE = ( #python type, check pmt type, to python, from python
+    (None, pmt.is_null, lambda x: None, lambda x: pmt.PMT_NIL),
+    (bool, pmt.is_bool, pmt.to_bool, pmt.from_bool),
+    (str, pmt.is_symbol, pmt.symbol_to_string, pmt.string_to_symbol),
+    (int, pmt.is_integer, pmt.to_long, pmt.from_long),
+    (long, pmt.is_uint64, lambda x: long(pmt.to_uint64(x)), pmt.from_uint64),
+    (float, pmt.is_real, pmt.to_double, pmt.from_double),
+    (complex, pmt.is_complex, pmt.to_complex, pmt.from_complex),
+    (tuple, pmt.is_tuple, pmt_to_tuple, pmt_from_tuple),
+    (list, pmt.is_vector, pmt_to_vector, pmt_from_vector),
+    (dict, pmt.is_dict, pmt_to_dict, pmt_from_dict),
+    (numpy.ndarray, pmt.is_blob, pmt.blob_data, numpy_to_blob),
+)
+
+def pmt_to_python(p):
+    for python_type, pmt_check, to_python, from_python in THE_TABLE:
+        if pmt_check(p): return to_python(p)
+    return p #give up, we return the same
+
+def python_to_pmt(p):
+    for python_type, pmt_check, to_python, from_python in THE_TABLE:
+        if python_type is None:
+            if p == None: return from_python(p)
+        elif isinstance(p, python_type): return from_python(p)
+    return p #give up, we return the same
+
diff --git a/gnuradio-runtime/python/pmt/qa_pmt.py b/gnuradio-runtime/python/pmt/qa_pmt.py
new file mode 100755
index 0000000000..75e112678b
--- /dev/null
+++ b/gnuradio-runtime/python/pmt/qa_pmt.py
@@ -0,0 +1,102 @@
+#!/usr/bin/env python
+#
+# Copyright 2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+import unittest
+import pmt_swig as pmt
+
+class test_pmt(unittest.TestCase):
+
+    def test01(self):
+        a = pmt.intern("a")
+        b = pmt.from_double(123765)
+        d1 = pmt.make_dict()
+        d2 = pmt.dict_add(d1, a, b)
+        print d2
+
+    def test02(self):
+        const = 123765
+        x_pmt = pmt.from_double(const)
+        x_int = pmt.to_double(x_pmt)
+        self.assertEqual(x_int, const)
+
+    def test03(self):
+        v = pmt.init_f32vector(3, [11, -22, 33])
+        s = pmt.serialize_str(v)
+        d = pmt.deserialize_str(s)
+        self.assertTrue(pmt.equal(v, d))
+
+    def test04(self):
+        v = pmt.init_f64vector(3, [11, -22, 33])
+        s = pmt.serialize_str(v)
+        d = pmt.deserialize_str(s)
+        self.assertTrue(pmt.equal(v, d))
+
+    def test05(self):
+        v = pmt.init_u8vector(3, [11, 22, 33])
+        s = pmt.serialize_str(v)
+        d = pmt.deserialize_str(s)
+        self.assertTrue(pmt.equal(v, d))
+
+    def test06(self):
+        v = pmt.init_s8vector(3, [11, -22, 33])
+        s = pmt.serialize_str(v)
+        d = pmt.deserialize_str(s)
+        self.assertTrue(pmt.equal(v, d))
+
+    def test07(self):
+        v = pmt.init_u16vector(3, [11, 22, 33])
+        s = pmt.serialize_str(v)
+        d = pmt.deserialize_str(s)
+        self.assertTrue(pmt.equal(v, d))
+
+    def test08(self):
+        v = pmt.init_s16vector(3, [11, -22, 33])
+        s = pmt.serialize_str(v)
+        d = pmt.deserialize_str(s)
+        self.assertTrue(pmt.equal(v, d))
+
+    def test09(self):
+        v = pmt.init_u32vector(3, [11, 22, 33])
+        s = pmt.serialize_str(v)
+        d = pmt.deserialize_str(s)
+        self.assertTrue(pmt.equal(v, d))
+
+    def test10(self):
+        v = pmt.init_s32vector(3, [11, -22, 33])
+        s = pmt.serialize_str(v)
+        d = pmt.deserialize_str(s)
+        self.assertTrue(pmt.equal(v, d))
+
+    def test11(self):
+        v = pmt.init_c32vector(3, [11 + -101j, -22 + 202j, 33 + -303j])
+        s = pmt.serialize_str(v)
+        d = pmt.deserialize_str(s)
+        self.assertTrue(pmt.equal(v, d))
+
+    def test12(self):
+        v = pmt.init_c64vector(3, [11 + -101j, -22 + 202j, 33 + -303j])
+        s = pmt.serialize_str(v)
+        d = pmt.deserialize_str(s)
+        self.assertTrue(pmt.equal(v, d))
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/gnuradio-runtime/python/pmt/qa_pmt_to_python.py b/gnuradio-runtime/python/pmt/qa_pmt_to_python.py
new file mode 100755
index 0000000000..ae86fc6d53
--- /dev/null
+++ b/gnuradio-runtime/python/pmt/qa_pmt_to_python.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python
+#
+# Copyright 2013 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+import unittest
+import pmt
+
+class test_pmt_to_python(unittest.TestCase):
+
+    def test01 (self):
+        b = pmt.from_double(123765)
+        self.assertEqual(pmt.to_python(b), 123765)
+        t = pmt.to_pmt(range(5))
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/gnuradio-runtime/swig/CMakeLists.txt b/gnuradio-runtime/swig/CMakeLists.txt
index 7e3312bbf5..79f093f4f0 100644
--- a/gnuradio-runtime/swig/CMakeLists.txt
+++ b/gnuradio-runtime/swig/CMakeLists.txt
@@ -24,7 +24,6 @@ include(GrPython)
 include(GrSwig)
 
 set(GR_SWIG_INCLUDE_DIRS
-    ${GRUEL_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
     ${CMAKE_CURRENT_BINARY_DIR}
@@ -39,6 +38,28 @@ set(GR_SWIG_LIBRARIES
     ${LOG4CPP_LIBRARIES}
 )
 
+###############################################################
+#    Build pmt swig 
+###############################################################
+
+set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/pmt_swig_doc.i)
+set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include/pmt 
+  ${CMAKE_CURRENT_BINARY_DIR}/../include/pmt)
+
+GR_SWIG_MAKE(pmt_swig pmt_swig.i)
+
+GR_SWIG_INSTALL(
+    TARGETS pmt_swig
+    DESTINATION ${GR_PYTHON_DIR}/pmt
+    COMPONENT "runtime_python"
+)
+
+add_custom_target(pmt_swig DEPENDS ${SWIG_MODULE_pmt_swig_REAL_NAME})
+
+###############################################################
+#    Build gnuradio-runtime swig 
+###############################################################
+
 # Only use if log4cpp is installed
 # Define ENABLE_GR_LOG for the .i file to ignore it.
 if(ENABLE_GR_LOG)
@@ -96,7 +117,15 @@ install(
     gr_top_block.i
     runtime_block_gateway.i
     runtime_swig.i
+    pmt_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/runtime_swig_doc.i
+    ${CMAKE_CURRENT_BINARY_DIR}/pmt_swig_doc.i
+    DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+    COMPONENT "runtime_swig"
+)
+
+install(
+    FILES gr_intrusive_ptr.i  gruel_common.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
     COMPONENT "runtime_swig"
 )
diff --git a/gnuradio-runtime/swig/gr_basic_block.i b/gnuradio-runtime/swig/gr_basic_block.i
index 62f16462d6..2e703278c5 100644
--- a/gnuradio-runtime/swig/gr_basic_block.i
+++ b/gnuradio-runtime/swig/gr_basic_block.i
@@ -23,6 +23,7 @@
 class gr_basic_block;
 typedef boost::shared_ptr<gr_basic_block> gr_basic_block_sptr;
 %template(gr_basic_block_sptr) boost::shared_ptr<gr_basic_block>;
+
 %include "pmt_swig.i"
 using namespace pmt;
 
diff --git a/gnuradio-runtime/swig/gr_feval.i b/gnuradio-runtime/swig/gr_feval.i
index bcf4f1e646..e3b8696fa6 100644
--- a/gnuradio-runtime/swig/gr_feval.i
+++ b/gnuradio-runtime/swig/gr_feval.i
@@ -160,7 +160,7 @@ public:
  */
 
 %inline %{
-#include <gruel/pmt.h>
+#include <pmt/pmt.h>
 
 class gr_py_feval_dd : public gr_feval_dd
 {
diff --git a/gnuradio-runtime/swig/gr_intrusive_ptr.i b/gnuradio-runtime/swig/gr_intrusive_ptr.i
new file mode 100644
index 0000000000..40c438d004
--- /dev/null
+++ b/gnuradio-runtime/swig/gr_intrusive_ptr.i
@@ -0,0 +1,102 @@
+// This file was borrowed from the SWIG project to allow use to
+// wrap PMTs that use intrusive pointers. This is only necessary
+// to support backwards compatability with older distributions of
+// Linux that do not natively support a new enough version of SWIG.
+// We do this to prevent having to update our dependency on a new
+// SWIG. Eventually, the need for this should go away.
+
+// Allow for different namespaces for shared_ptr / intrusive_ptr - they could be boost or std or std::tr1
+// For example for std::tr1, use:
+// #define SWIG_SHARED_PTR_NAMESPACE std
+// #define SWIG_SHARED_PTR_SUBNAMESPACE tr1
+// #define SWIG_INTRUSIVE_PTR_NAMESPACE boost
+// #define SWIG_INTRUSIVE_PTR_SUBNAMESPACE
+
+#if !defined(SWIG_INTRUSIVE_PTR_NAMESPACE)
+# define SWIG_INTRUSIVE_PTR_NAMESPACE boost
+#endif
+
+#if defined(SWIG_INTRUSIVE_PTR_SUBNAMESPACE)
+# define SWIG_INTRUSIVE_PTR_QNAMESPACE SWIG_INTRUSIVE_PTR_NAMESPACE::SWIG_INTRUSIVE_PTR_SUBNAMESPACE
+#else
+# define SWIG_INTRUSIVE_PTR_QNAMESPACE SWIG_INTRUSIVE_PTR_NAMESPACE
+#endif
+
+namespace SWIG_INTRUSIVE_PTR_NAMESPACE {
+#if defined(SWIG_INTRUSIVE_PTR_SUBNAMESPACE)
+  namespace SWIG_INTRUSIVE_PTR_SUBNAMESPACE {
+#endif
+    template <class T> class intrusive_ptr {
+    };
+#if defined(SWIG_INTRUSIVE_PTR_SUBNAMESPACE)
+  }
+#endif
+}
+
+%fragment("SWIG_intrusive_deleter", "header") {
+template<class T> struct SWIG_intrusive_deleter {
+    void operator()(T *p) {
+        if (p)
+          intrusive_ptr_release(p);
+    }
+};
+}
+
+%fragment("SWIG_null_deleter", "header") {
+struct SWIG_null_deleter {
+  void operator() (void const *) const {
+  }
+};
+%#define SWIG_NO_NULL_DELETER_0 , SWIG_null_deleter()
+%#define SWIG_NO_NULL_DELETER_1
+}
+
+// Main user macro for defining intrusive_ptr typemaps for both const and non-const pointer types
+// For plain classes, do not use for derived classes
+%define SWIG_INTRUSIVE_PTR(PROXYCLASS, TYPE...)
+SWIG_INTRUSIVE_PTR_TYPEMAPS(PROXYCLASS, , TYPE)
+SWIG_INTRUSIVE_PTR_TYPEMAPS(PROXYCLASS, const, TYPE)
+%enddef
+
+// Main user macro for defining intrusive_ptr typemaps for both const and non-const pointer types
+// For derived classes
+%define SWIG_INTRUSIVE_PTR_DERIVED(PROXYCLASS, BASECLASSTYPE, TYPE...)
+SWIG_INTRUSIVE_PTR_TYPEMAPS(PROXYCLASS, , TYPE)
+SWIG_INTRUSIVE_PTR_TYPEMAPS(PROXYCLASS, const, TYPE)
+%types(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > = SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< BASECLASSTYPE >) %{
+  *newmemory = SWIG_CAST_NEW_MEMORY;
+  return (void *) new SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< BASECLASSTYPE >(*(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > *)$from);
+  %}
+%extend TYPE {
+  static SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< BASECLASSTYPE > SWIGSharedPtrUpcast(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > swigSharedPtrUpcast) {
+    return swigSharedPtrUpcast;
+  }
+}
+%enddef
+
+// Extra user macro for including classes in intrusive_ptr typemaps for both const and non-const pointer types
+// This caters for classes which cannot be wrapped by intrusive_ptrs but are still part of the class hierarchy
+// For plain classes, do not use for derived classes
+%define SWIG_INTRUSIVE_PTR_NO_WRAP(PROXYCLASS, TYPE...)
+SWIG_INTRUSIVE_PTR_TYPEMAPS_NO_WRAP(PROXYCLASS, , TYPE)
+SWIG_INTRUSIVE_PTR_TYPEMAPS_NO_WRAP(PROXYCLASS, const, TYPE)
+%enddef
+
+// Extra user macro for including classes in intrusive_ptr typemaps for both const and non-const pointer types
+// This caters for classes which cannot be wrapped by intrusive_ptrs but are still part of the class hierarchy
+// For derived classes
+%define SWIG_INTRUSIVE_PTR_DERIVED_NO_WRAP(PROXYCLASS, BASECLASSTYPE, TYPE...)
+SWIG_INTRUSIVE_PTR_TYPEMAPS_NO_WRAP(PROXYCLASS, , TYPE)
+SWIG_INTRUSIVE_PTR_TYPEMAPS_NO_WRAP(PROXYCLASS, const, TYPE)
+%types(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > = SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< BASECLASSTYPE >) %{
+  *newmemory = SWIG_CAST_NEW_MEMORY;
+  return (void *) new SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< BASECLASSTYPE >(*(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > *)$from);
+%}
+%extend TYPE {
+  static SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< BASECLASSTYPE > SWIGSharedPtrUpcast(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > swigSharedPtrUpcast) {
+    return swigSharedPtrUpcast;
+  }
+}
+%enddef
+
+
diff --git a/gnuradio-runtime/swig/gr_realtime.i b/gnuradio-runtime/swig/gr_realtime.i
index 1051d3e2b3..4d5c2b856f 100644
--- a/gnuradio-runtime/swig/gr_realtime.i
+++ b/gnuradio-runtime/swig/gr_realtime.i
@@ -22,14 +22,14 @@
 
 %rename(enable_realtime_scheduling) gr_enable_realtime_scheduling;
 
-// NOTE: This is duplicated from gruel/src/include/gruel/gr_realtime.h,
+// NOTE: This is duplicated from gnuradio-runtime/include/gr_realtime.h,
 //       and must be kept in sync with it.  This is the least evil workaround
 //       for allowing 3rd party code builds to work when GNU Radio is
 //       installed from binary packages into the standard system directories.
-//       Otherwise, they can't find #include <gruel/gr_realtime.h>, since
+//       Otherwise, they can't find #include <gr_realtime.h>, since
 //       pkg-config strips -I/usr/include from the --cflags path.
 
-namespace gruel {
+namespace gr {
 
   typedef enum {
     RT_OK = 0,
@@ -40,5 +40,5 @@ namespace gruel {
 
 }
 
-typedef gruel::rt_status_t gr_rt_status_t;
+typedef gr::rt_status_t gr_rt_status_t;
 gr_rt_status_t gr_enable_realtime_scheduling();
diff --git a/gnuradio-runtime/swig/gruel_common.i b/gnuradio-runtime/swig/gruel_common.i
new file mode 100644
index 0000000000..3a4d841d61
--- /dev/null
+++ b/gnuradio-runtime/swig/gruel_common.i
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2011 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef GRUEL_COMMON_I
+#define GRUEL_COMMON_I
+
+////////////////////////////////////////////////////////////////////////
+// Language independent exception handler
+////////////////////////////////////////////////////////////////////////
+%include exception.i
+
+%exception {
+    try {
+        $action
+    }
+    catch(std::exception &e) {
+        SWIG_exception(SWIG_RuntimeError, e.what());
+    }
+    catch(...) {
+        SWIG_exception(SWIG_RuntimeError, "Unknown exception");
+    }
+
+}
+
+////////////////////////////////////////////////////////////////////////
+// Wrapper for python calls that may block
+////////////////////////////////////////////////////////////////////////
+
+/*!
+ * Use GR_PYTHON_BLOCKING_CODE when calling code that blocks.
+ *
+ * The try/catch is to save us from boost::thread::interrupt:
+ * If a thread from the scheduler (or any other boost thread)
+ * is blocking the routine and throws an interrupt exception.
+ */
+%{
+
+#define GR_PYTHON_BLOCKING_CODE(code) {                                 \
+    PyThreadState *_save;                                               \
+    _save = PyEval_SaveThread();                                        \
+    try{code}                                                           \
+    catch(...){PyEval_RestoreThread(_save); throw;}                     \
+    PyEval_RestoreThread(_save);                                        \
+}
+
+%}
+
+#endif /*GRUEL_COMMON_I*/
diff --git a/gnuradio-runtime/swig/pmt_swig.i b/gnuradio-runtime/swig/pmt_swig.i
new file mode 100644
index 0000000000..c75c022ea6
--- /dev/null
+++ b/gnuradio-runtime/swig/pmt_swig.i
@@ -0,0 +1,297 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2011-2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+%include "std_string.i"
+%include "stdint.i"
+
+%{
+#include <boost/intrusive_ptr.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/any.hpp>
+#include <complex>
+#include <string>
+#include <stdint.h>
+#include <iosfwd>
+#include <stdexcept>
+#include <pmt/pmt.h>
+%}
+
+%include "gnuradio.i"
+
+//load generated python docstrings
+%include "pmt_swig_doc.i"
+
+%include <std_complex.i>
+%include <std_vector.i>
+%include <stl.i>
+
+namespace std {
+  %template()	  vector<unsigned char>;
+  %template()	  vector<uint8_t>;
+  %template()	  vector<char>;
+  %template()	  vector<int8_t>;
+  %template()	  vector<short>;
+  %template()	  vector<uint16_t>;
+  %template()	  vector<int16_t>;
+  %template()	  vector<int>;
+  %template()	  vector<int32_t>;
+  %template()	  vector<uint32_t>;
+  %template()	  vector<float>;
+  %template()	  vector<double>;
+  %template()	  vector< std::complex<float> >;
+  %template()	  vector< std::complex<double> >;
+};
+
+////////////////////////////////////////////////////////////////////////
+// Language independent exception handler
+////////////////////////////////////////////////////////////////////////
+
+// Template intrusive_ptr for Swig to avoid dereferencing issues
+namespace pmt{
+    class pmt_base;
+}
+//%import <intrusive_ptr.i>
+%import <gr_intrusive_ptr.i>
+%template(swig_int_ptr) boost::intrusive_ptr<pmt::pmt_base>;
+
+namespace pmt{
+
+  typedef boost::intrusive_ptr<pmt_base> pmt_t;
+
+  // Allows Python to directly print a PMT object
+  %pythoncode
+  %{
+    swig_int_ptr.__repr__ = lambda self: write_string(self)
+  %}
+
+
+  extern const pmt_t PMT_T;
+  extern const pmt_t PMT_F;
+  extern const pmt_t PMT_NIL;
+  extern const pmt_t PMT_EOF;
+
+  bool is_bool(pmt_t obj);
+  bool is_true(pmt_t obj);
+  bool is_false(pmt_t obj);
+  pmt_t from_bool(bool val);
+  bool to_bool(pmt_t val);
+
+  bool is_symbol(const pmt_t& obj);
+  pmt_t string_to_symbol(const std::string &s);
+  pmt_t intern(const std::string &s);
+  const std::string symbol_to_string(const pmt_t& sym);
+
+  bool is_number(pmt_t obj);
+  bool is_integer(pmt_t x);
+  pmt_t from_long(long x);
+  long to_long(pmt_t x);
+
+  bool is_uint64(pmt_t x);
+  pmt_t from_uint64(uint64_t x);
+  uint64_t to_uint64(pmt_t x);
+
+  bool is_real(pmt_t obj);
+  pmt_t from_double(double x);
+  double to_double(pmt_t x);
+
+  bool is_complex(pmt_t obj);
+  pmt_t make_rectangular(double re, double im);
+  pmt_t from_complex(const std::complex<double> &z);
+  std::complex<double> to_complex(pmt_t z);
+
+  bool is_null(const pmt_t& x);
+  bool is_pair(const pmt_t& obj);
+  pmt_t cons(const pmt_t& x, const pmt_t& y);
+  pmt_t car(const pmt_t& pair);
+  pmt_t cdr(const pmt_t& pair);
+  void set_car(pmt_t pair, pmt_t value);
+  void set_cdr(pmt_t pair, pmt_t value);
+
+  pmt_t caar(pmt_t pair);
+  pmt_t cadr(pmt_t pair);
+  pmt_t cdar(pmt_t pair);
+  pmt_t cddr(pmt_t pair);
+  pmt_t caddr(pmt_t pair);
+  pmt_t cadddr(pmt_t pair);
+
+  bool is_tuple(pmt_t x);
+  pmt_t make_tuple();
+  pmt_t make_tuple(const pmt_t &e0);
+  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1);
+  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2);
+  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3);
+  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4);
+  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5);
+  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6);
+  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7);
+  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8);
+  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8, const pmt_t &e9);
+
+  pmt_t to_tuple(const pmt_t &x);
+  pmt_t tuple_ref(const pmt_t &tuple, size_t k);
+
+  bool is_vector(pmt_t x);
+  pmt_t make_vector(size_t k, pmt_t fill);
+  pmt_t vector_ref(pmt_t vector, size_t k);
+  void vector_set(pmt_t vector, size_t k, pmt_t obj);
+  void vector_fill(pmt_t vector, pmt_t fill);
+
+  bool is_blob(pmt_t x);
+  pmt_t make_blob(const void *buf, size_t len);
+  const void *blob_data(pmt_t blob);
+  size_t blob_length(pmt_t blob);
+
+  bool is_uniform_vector(pmt_t x);
+  bool is_u8vector(pmt_t x);
+  bool is_s8vector(pmt_t x);
+  bool is_u16vector(pmt_t x);
+  bool is_s16vector(pmt_t x);
+  bool is_u32vector(pmt_t x);
+  bool is_s32vector(pmt_t x);
+  bool is_u64vector(pmt_t x);
+  bool is_s64vector(pmt_t x);
+  bool is_f32vector(pmt_t x);
+  bool is_f64vector(pmt_t x);
+  bool is_c32vector(pmt_t x);
+  bool is_c64vector(pmt_t x);
+  pmt_t make_u8vector(size_t k, uint8_t fill);
+  pmt_t make_s8vector(size_t k, int8_t fill);
+  pmt_t make_u16vector(size_t k, uint16_t fill);
+  pmt_t make_s16vector(size_t k, int16_t fill);
+  pmt_t make_u32vector(size_t k, uint32_t fill);
+  pmt_t make_s32vector(size_t k, int32_t fill);
+  pmt_t make_u64vector(size_t k, uint64_t fill);
+  pmt_t make_s64vector(size_t k, int64_t fill);
+  pmt_t make_f32vector(size_t k, float fill);
+  pmt_t make_f64vector(size_t k, double fill);
+  pmt_t make_c32vector(size_t k, std::complex<float> fill);
+  pmt_t make_c64vector(size_t k, std::complex<double> fill);
+  pmt_t init_u8vector(size_t k, const std::vector<uint8_t> &data);
+  pmt_t init_s8vector(size_t k, const std::vector<int8_t> &data);
+  pmt_t init_u16vector(size_t k, const std::vector<uint16_t> &data);
+  pmt_t init_s16vector(size_t k, const std::vector<int16_t> &data);
+  pmt_t init_u32vector(size_t k, const std::vector<uint32_t> &data);
+  pmt_t init_s32vector(size_t k, const std::vector<int32_t> &data);
+  pmt_t init_f32vector(size_t k, const std::vector<float> &data);
+  pmt_t init_f64vector(size_t k, const std::vector<double> &data);
+  pmt_t init_c32vector(size_t k, const std::vector<std::complex<float> > &data);
+  pmt_t init_c64vector(size_t k, const std::vector<std::complex<double> > &data);
+  uint8_t  u8vector_ref(pmt_t v, size_t k);
+  int8_t   s8vector_ref(pmt_t v, size_t k);
+  uint16_t u16vector_ref(pmt_t v, size_t k);
+  int16_t  s16vector_ref(pmt_t v, size_t k);
+  uint32_t u32vector_ref(pmt_t v, size_t k);
+  int32_t  s32vector_ref(pmt_t v, size_t k);
+  uint64_t u64vector_ref(pmt_t v, size_t k);
+  int64_t  s64vector_ref(pmt_t v, size_t k);
+  float    f32vector_ref(pmt_t v, size_t k);
+  double   f64vector_ref(pmt_t v, size_t k);
+  std::complex<float>  c32vector_ref(pmt_t v, size_t k);
+  std::complex<double> c64vector_ref(pmt_t v, size_t k);
+  void u8vector_set(pmt_t v, size_t k, uint8_t x);  //< v[k] = x
+  void s8vector_set(pmt_t v, size_t k, int8_t x);
+  void u16vector_set(pmt_t v, size_t k, uint16_t x);
+  void s16vector_set(pmt_t v, size_t k, int16_t x);
+  void u32vector_set(pmt_t v, size_t k, uint32_t x);
+  void s32vector_set(pmt_t v, size_t k, int32_t x);
+  void u64vector_set(pmt_t v, size_t k, uint64_t x);
+  void s64vector_set(pmt_t v, size_t k, int64_t x);
+  void f32vector_set(pmt_t v, size_t k, float x);
+  void f64vector_set(pmt_t v, size_t k, double x);
+  void c32vector_set(pmt_t v, size_t k, std::complex<float> x);
+  void c64vector_set(pmt_t v, size_t k, std::complex<double> x);
+
+  %apply size_t & INOUT { size_t &len };
+  const void *uniform_vector_elements(pmt_t v, size_t &len);  
+
+  const std::vector<uint8_t>  u8vector_elements(pmt_t v);
+  const std::vector<int8_t>   s8vector_elements(pmt_t v);
+  const std::vector<uint16_t> u16vector_elements(pmt_t v);
+  const std::vector<int16_t>  s16vector_elements(pmt_t v);
+  const std::vector<uint32_t> u32vector_elements(pmt_t v);
+  const std::vector<int32_t>  s32vector_elements(pmt_t v);
+  const std::vector<float>    f32vector_elements(pmt_t v);
+  const std::vector<double>   f64vector_elements(pmt_t v);
+  const std::vector<std::complex<float> > c32vector_elements(pmt_t v);
+  const std::vector<std::complex<double> > c64vector_elements(pmt_t v);
+
+  bool is_dict(const pmt_t &obj);
+  pmt_t make_dict();
+  pmt_t dict_add(const pmt_t &dict, const pmt_t &key, const pmt_t &value);
+  pmt_t dict_delete(const pmt_t &dict, const pmt_t &key);
+  bool  dict_has_key(const pmt_t &dict, const pmt_t &key);
+  pmt_t dict_ref(const pmt_t &dict, const pmt_t &key, const pmt_t &not_found);
+  pmt_t dict_items(pmt_t dict);
+  pmt_t dict_keys(pmt_t dict);
+  pmt_t dict_values(pmt_t dict);
+
+  bool is_any(pmt_t obj);
+  pmt_t make_any(const boost::any &any);
+  boost::any any_ref(pmt_t obj);
+  void any_set(pmt_t obj, const boost::any &any);
+
+  bool is_msg_accepter(const pmt_t &obj);
+  pmt_t make_msg_accepter(boost::shared_ptr<gr::messages::msg_accepter> ma);
+  boost::shared_ptr<gr::messages::msg_accepter> msg_accepter_ref(const pmt_t &obj);
+
+  bool eq(const pmt_t& x, const pmt_t& y);
+  bool eqv(const pmt_t& x, const pmt_t& y);
+  bool equal(const pmt_t& x, const pmt_t& y);
+  size_t length(const pmt_t& v);
+  pmt_t assq(pmt_t obj, pmt_t alist);
+  pmt_t assv(pmt_t obj, pmt_t alist);
+  pmt_t assoc(pmt_t obj, pmt_t alist);
+  pmt_t map(pmt_t proc(const pmt_t&), pmt_t list);
+  pmt_t reverse(pmt_t list);
+  pmt_t reverse_x(pmt_t list);
+  inline static pmt_t acons(pmt_t x, pmt_t y, pmt_t a);
+  pmt_t nth(size_t n, pmt_t list);
+  pmt_t nthcdr(size_t n, pmt_t list);
+  pmt_t memq(pmt_t obj, pmt_t list);
+  pmt_t memv(pmt_t obj, pmt_t list);
+  pmt_t member(pmt_t obj, pmt_t list);
+  bool subsetp(pmt_t list1, pmt_t list2);
+
+  pmt_t list1(const pmt_t& x1);
+  pmt_t list2(const pmt_t& x1, const pmt_t& x2);
+  pmt_t list3(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3);
+  pmt_t list4(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4);
+  pmt_t list5(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4, const pmt_t& x5);
+  pmt_t list6(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4, const pmt_t& x5, const pmt_t& x6);
+  pmt_t list_add(pmt_t list, const pmt_t& item);
+  pmt_t list_rm(pmt_t list, const pmt_t& item);
+  bool list_has(pmt_t list, const pmt_t& item);
+
+  bool is_eof_object(pmt_t obj);
+  pmt_t read(std::istream &port);
+  void write(pmt_t obj, std::ostream &port);
+  std::string write_string(pmt_t obj);
+
+  //void pmt_print(pmt_t v);
+
+  bool serialize(pmt_t obj, std::streambuf &sink);
+  pmt_t deserialize(std::streambuf &source);
+  void dump_sizeof();
+  std::string serialize_str(pmt_t obj);
+  pmt_t deserialize_str(std::string str);
+
+} //namespace pmt
diff --git a/gr-analog/include/analog/api.h b/gr-analog/include/analog/api.h
index b7dee46933..2459ace614 100644
--- a/gr-analog/include/analog/api.h
+++ b/gr-analog/include/analog/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_ANALOG_API_H
 #define INCLUDED_ANALOG_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_analog_EXPORTS
 #  define ANALOG_API __GR_ATTR_EXPORT
diff --git a/gr-analog/lib/CMakeLists.txt b/gr-analog/lib/CMakeLists.txt
index 5cb00e9f94..5719eac7a5 100644
--- a/gr-analog/lib/CMakeLists.txt
+++ b/gr-analog/lib/CMakeLists.txt
@@ -30,7 +30,6 @@ include_directories(
     ${GR_BLOCKS_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
     ${VOLK_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-analog/lib/fastnoise_source_X_impl.cc.t b/gr-analog/lib/fastnoise_source_X_impl.cc.t
index 25ad8073aa..706ddbbf84 100644
--- a/gr-analog/lib/fastnoise_source_X_impl.cc.t
+++ b/gr-analog/lib/fastnoise_source_X_impl.cc.t
@@ -59,7 +59,7 @@ namespace gr {
     void
     @IMPL_NAME@::set_type(noise_type_t type)
     {
-      gruel::scoped_lock l(d_setlock);
+      gr::thread::scoped_lock l(d_setlock);
       d_type = type;
       generate();
     }
@@ -67,7 +67,7 @@ namespace gr {
     void
     @IMPL_NAME@::set_amplitude(float ampl) 
     {
-      gruel::scoped_lock l(d_setlock);
+      gr::thread::scoped_lock l(d_setlock);
       d_ampl = ampl;
       generate();
     }
@@ -123,7 +123,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);
 
       @TYPE@ *out = (@TYPE@*)output_items[0];
 
diff --git a/gr-analog/lib/noise_source_X_impl.cc.t b/gr-analog/lib/noise_source_X_impl.cc.t
index 40e2517d2e..7f371b2cfd 100644
--- a/gr-analog/lib/noise_source_X_impl.cc.t
+++ b/gr-analog/lib/noise_source_X_impl.cc.t
@@ -57,14 +57,14 @@ namespace gr {
     void
     @IMPL_NAME@::set_type(noise_type_t type)
     {
-      gruel::scoped_lock l(d_setlock);
+      gr::thread::scoped_lock l(d_setlock);
       d_type = type;
     }
 
     void
     @IMPL_NAME@::set_amplitude(float ampl)
     {
-      gruel::scoped_lock l(d_setlock);
+      gr::thread::scoped_lock l(d_setlock);
       d_ampl = ampl;
     }
 
@@ -73,7 +73,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);
 
       @TYPE@ *out = (@TYPE@*)output_items[0];
 
diff --git a/gr-analog/lib/qa_analog.h b/gr-analog/lib/qa_analog.h
index 458861cc91..b66b62b5fe 100644
--- a/gr-analog/lib/qa_analog.h
+++ b/gr-analog/lib/qa_analog.h
@@ -23,7 +23,7 @@
 #ifndef _QA_GR_ANALOG_H_
 #define _QA_GR_ANALOG_H_
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 #include <cppunit/TestSuite.h>
 
 //! collect all the tests for the gr-analog directory
diff --git a/gr-analog/swig/CMakeLists.txt b/gr-analog/swig/CMakeLists.txt
index 8b56be500c..9f554f70f9 100644
--- a/gr-analog/swig/CMakeLists.txt
+++ b/gr-analog/swig/CMakeLists.txt
@@ -28,7 +28,6 @@ set(GR_SWIG_INCLUDE_DIRS
     ${GR_ANALOG_INCLUDE_DIRS}
     ${GR_FILTER_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-atsc/include/atsc/api.h b/gr-atsc/include/atsc/api.h
index 5add37762b..9516892e02 100644
--- a/gr-atsc/include/atsc/api.h
+++ b/gr-atsc/include/atsc/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_ATSC_API_H
 #define INCLUDED_ATSC_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_atsc_EXPORTS
 #  define ATSC_API __GR_ATTR_EXPORT
diff --git a/gr-atsc/lib/CMakeLists.txt b/gr-atsc/lib/CMakeLists.txt
index b3aa626cb5..22ea35c09e 100644
--- a/gr-atsc/lib/CMakeLists.txt
+++ b/gr-atsc/lib/CMakeLists.txt
@@ -28,7 +28,6 @@ include_directories(
     ${GR_ANALOG_INCLUDE_DIRS}
     ${GR_FEC_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${LOG4CPP_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
diff --git a/gr-atsc/swig/CMakeLists.txt b/gr-atsc/swig/CMakeLists.txt
index 37da95dce1..91d2080cac 100644
--- a/gr-atsc/swig/CMakeLists.txt
+++ b/gr-atsc/swig/CMakeLists.txt
@@ -29,7 +29,6 @@ set(GR_SWIG_INCLUDE_DIRS
     ${GR_BLOCKS_INCLUDE_DIRS}
     ${GR_ANALOG_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${FFTW3F_INCLUDE_DIRS}
 )
diff --git a/gr-audio/examples/c++/CMakeLists.txt b/gr-audio/examples/c++/CMakeLists.txt
index a91dafed78..d383008011 100644
--- a/gr-audio/examples/c++/CMakeLists.txt
+++ b/gr-audio/examples/c++/CMakeLists.txt
@@ -21,7 +21,6 @@ include_directories(
 	${GR_AUDIO_INCLUDE_DIRS}
 	${GR_ANALOG_INCLUDE_DIRS}
 	${GNURADIO_RUNTIME_INCLUDE_DIRS}
-        ${GRUEL_INCLUDE_DIRS}
         ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-audio/include/audio/api.h b/gr-audio/include/audio/api.h
index 2ddd0fec6e..1c113c92ba 100644
--- a/gr-audio/include/audio/api.h
+++ b/gr-audio/include/audio/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_GR_AUDIO_API_H
 #define INCLUDED_GR_AUDIO_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_audio_EXPORTS
 #  define GR_AUDIO_API __GR_ATTR_EXPORT
diff --git a/gr-audio/lib/CMakeLists.txt b/gr-audio/lib/CMakeLists.txt
index 8390f85e63..3e29319ebb 100644
--- a/gr-audio/lib/CMakeLists.txt
+++ b/gr-audio/lib/CMakeLists.txt
@@ -24,7 +24,6 @@ include_directories(
     ${CMAKE_CURRENT_SOURCE_DIR}
     ${GR_AUDIO_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${LOG4CPP_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
diff --git a/gr-audio/lib/osx/circular_buffer.h b/gr-audio/lib/osx/circular_buffer.h
index 65788d482c..7abbeaeb0c 100644
--- a/gr-audio/lib/osx/circular_buffer.h
+++ b/gr-audio/lib/osx/circular_buffer.h
@@ -23,7 +23,7 @@
 #ifndef _CIRCULAR_BUFFER_H_
 #define _CIRCULAR_BUFFER_H_
 
-#include <gruel/thread.h>
+#include <thread/thread.h>
 #include <iostream>
 #include <stdexcept>
 
@@ -49,9 +49,9 @@ private:
   size_t d_n_avail_write_I, d_n_avail_read_I;
 
 // stuff to control access to class internals
-  gruel::mutex* d_internal;
-  gruel::condition_variable* d_readBlock;
-  gruel::condition_variable* d_writeBlock;
+  gr::thread::mutex* d_internal;
+  gr::thread::condition_variable* d_readBlock;
+  gr::thread::condition_variable* d_writeBlock;
 
 // booleans to decide how to control reading, writing, and aborting
   bool d_doWriteBlock, d_doFullRead, d_doAbort;
@@ -96,13 +96,13 @@ public:
   };
 
   inline size_t n_avail_write_items () {
-    gruel::scoped_lock l (*d_internal);
+    gr::thread::scoped_lock l (*d_internal);
     size_t retVal = d_n_avail_write_I;
     return (retVal);
   };
 
   inline size_t n_avail_read_items () {
-    gruel::scoped_lock l (*d_internal);
+    gr::thread::scoped_lock l (*d_internal);
     size_t retVal = d_n_avail_read_I;
     return (retVal);
   };
@@ -120,13 +120,13 @@ public:
     // create a mutex to handle contention of shared resources;
     // any routine needed access to shared resources uses lock()
     // before doing anything, then unlock() when finished.
-    d_internal = new gruel::mutex ();
+    d_internal = new gr::thread::mutex ();
     // link the internal mutex to the read and write conditions;
     // when wait() is called, the internal mutex will automatically
     // be unlock()'ed.  Upon return (from a notify_one() to the condition),
     // the internal mutex will be lock()'ed.
-    d_readBlock = new gruel::condition_variable ();
-    d_writeBlock = new gruel::condition_variable ();
+    d_readBlock = new gr::thread::condition_variable ();
+    d_writeBlock = new gr::thread::condition_variable ();
   };
 
 /*
@@ -167,7 +167,7 @@ public:
     if (!buf)
       throw std::runtime_error ("circular_buffer::enqueue(): "
 				"input buffer is NULL.\n");
-    gruel::scoped_lock l (*d_internal);
+    gr::thread::scoped_lock l (*d_internal);
     if (d_doAbort) {
       return (2);
     }
@@ -253,7 +253,7 @@ public:
       throw std::runtime_error ("circular_buffer::dequeue()");
     }
 
-    gruel::scoped_lock l (*d_internal);
+    gr::thread::scoped_lock l (*d_internal);
     if (d_doAbort) {
       return (2);
     }
@@ -305,7 +305,7 @@ public:
   };
 
   void abort () {
-    gruel::scoped_lock l (*d_internal);
+    gr::thread::scoped_lock l (*d_internal);
     d_doAbort = true;
     d_writeBlock->notify_one ();
     d_readBlock->notify_one ();
diff --git a/gr-audio/lib/osx/osx_sink.cc b/gr-audio/lib/osx/osx_sink.cc
index ace96ec742..b7fe4e9d11 100644
--- a/gr-audio/lib/osx/osx_sink.cc
+++ b/gr-audio/lib/osx/osx_sink.cc
@@ -188,12 +188,12 @@ namespace gr {
 
       // create the stuff to regulate I/O
 
-      d_cond_data = new gruel::condition_variable();
+      d_cond_data = new gr::thread::condition_variable();
       if(d_cond_data == NULL)
         CheckErrorAndThrow(errno, "new condition (data)",
                            "audio_osx_sink::audio_osx_sink");
 
-      d_internal = new gruel::mutex();
+      d_internal = new gr::thread::mutex();
       if(d_internal == NULL)
         CheckErrorAndThrow(errno, "new mutex (internal)",
                            "audio_osx_sink::audio_osx_sink");
@@ -288,7 +288,7 @@ namespace gr {
                    gr_vector_const_void_star &input_items,
                    gr_vector_void_star &output_items)
     {
-      gruel::scoped_lock l(*d_internal);
+      gr::thread::scoped_lock l(*d_internal);
 
       /* take the input data, copy it, and push it to the bottom of the queue
          mono input are pushed onto queue[0];
@@ -386,7 +386,7 @@ namespace gr {
       osx_sink* This = (osx_sink*)inRefCon;
       OSStatus err = noErr;
 
-      gruel::scoped_lock l(*This->d_internal);
+      gr::thread::scoped_lock l(*This->d_internal);
 
 #if _OSX_AU_DEBUG_
       std::cerr << "cb_in: SC = " << This->d_queueSampleCount
diff --git a/gr-audio/lib/osx/osx_sink.h b/gr-audio/lib/osx/osx_sink.h
index 6bbd882239..153d2d76e6 100644
--- a/gr-audio/lib/osx/osx_sink.h
+++ b/gr-audio/lib/osx/osx_sink.h
@@ -47,8 +47,8 @@ namespace gr {
       UInt32  d_n_channels;
       UInt32  d_queueSampleCount, d_max_sample_count;
       bool    d_do_block;
-      gruel::mutex* d_internal;
-      gruel::condition_variable* d_cond_data;
+      gr::thread::mutex* d_internal;
+      gr::thread::condition_variable* d_cond_data;
       circular_buffer<float>** d_buffers;
 
       // AudioUnits and Such
diff --git a/gr-audio/lib/osx/osx_source.cc b/gr-audio/lib/osx/osx_source.cc
index c79a6ec6e9..c666bb7ad8 100644
--- a/gr-audio/lib/osx/osx_source.cc
+++ b/gr-audio/lib/osx/osx_source.cc
@@ -484,12 +484,12 @@ namespace gr {
 
       // create the stuff to regulate I/O
 
-      d_cond_data = new gruel::condition_variable();
+      d_cond_data = new gr::thread::condition_variable();
       if(d_cond_data == NULL)
         CheckErrorAndThrow(errno, "new condition (data)",
                            "audio_osx_source::audio_osx_source");
 
-      d_internal = new gruel::mutex();
+      d_internal = new gr::thread::mutex();
       if(d_internal == NULL)
         CheckErrorAndThrow(errno, "new mutex (internal)",
                            "audio_osx_source::audio_osx_source");
@@ -687,7 +687,7 @@ namespace gr {
                      gr_vector_void_star &output_items)
     {
       // acquire control to do processing here only
-      gruel::scoped_lock l(*d_internal);
+      gr::thread::scoped_lock l(*d_internal);
 
 #if _OSX_AU_DEBUG_
       std::cerr << "work1: SC = " << d_queueSampleCount
@@ -806,7 +806,7 @@ namespace gr {
       OSStatus err = noErr;
       osx_source* This = static_cast<osx_source*>(inRefCon);
 
-      gruel::scoped_lock l(*This->d_internal);
+      gr::thread::scoped_lock l(*This->d_internal);
 
 #if _OSX_AU_DEBUG_
       std::cerr << "cb0: in#F = " << inNumberFrames
diff --git a/gr-audio/lib/osx/osx_source.h b/gr-audio/lib/osx/osx_source.h
index 9315c8e44e..03a2d8879c 100644
--- a/gr-audio/lib/osx/osx_source.h
+++ b/gr-audio/lib/osx/osx_source.h
@@ -53,8 +53,8 @@ namespace gr {
       UInt32              d_n_AvailableInputFrames, d_n_ActualInputFrames;
       UInt32              d_n_user_channels, d_n_max_channels, d_n_deviceChannels;
       bool                d_do_block, d_passThrough, d_waiting_for_data;
-      gruel::mutex*       d_internal;
-      gruel::condition_variable* d_cond_data;
+      gr::thread::mutex*       d_internal;
+      gr::thread::condition_variable* d_cond_data;
       circular_buffer<float>** d_buffers;
 
       // AudioUnits and Such
diff --git a/gr-audio/lib/portaudio/portaudio_sink.cc b/gr-audio/lib/portaudio/portaudio_sink.cc
index d1a3f5166c..746894e494 100644
--- a/gr-audio/lib/portaudio/portaudio_sink.cc
+++ b/gr-audio/lib/portaudio/portaudio_sink.cc
@@ -100,7 +100,7 @@ namespace gr {
 
       if(nreqd_samples <= navail_samples) {  // We've got enough data...
         {
-          gruel::scoped_lock guard(self->d_ringbuffer_mutex);
+          gr::thread::scoped_lock guard(self->d_ringbuffer_mutex);
 
           memcpy(outputBuffer,
                  self->d_reader->read_pointer(),
@@ -313,7 +313,7 @@ namespace gr {
         if(nframes == 0) {      // no room...
           if(d_ok_to_block) {
             {
-              gruel::scoped_lock guard(d_ringbuffer_mutex);
+              gr::thread::scoped_lock guard(d_ringbuffer_mutex);
               while(!d_ringbuffer_ready)
                 d_ringbuffer_cond.wait(guard);
             }
@@ -331,7 +331,7 @@ namespace gr {
 
         // We can write the smaller of the request and the room we've got
         {
-          gruel::scoped_lock guard(d_ringbuffer_mutex);
+          gr::thread::scoped_lock guard(d_ringbuffer_mutex);
 
           int nf = std::min(noutput_items - k, nframes);
           float *p = (float*)d_writer->write_pointer();
diff --git a/gr-audio/lib/portaudio/portaudio_sink.h b/gr-audio/lib/portaudio/portaudio_sink.h
index 41a725b691..e69f96b252 100644
--- a/gr-audio/lib/portaudio/portaudio_sink.h
+++ b/gr-audio/lib/portaudio/portaudio_sink.h
@@ -24,7 +24,7 @@
 
 #include <audio/sink.h>
 #include <gr_buffer.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 #include <string>
 #include <portaudio.h>
 #include <stdexcept>
@@ -58,8 +58,8 @@ namespace gr {
       gr_buffer_sptr        d_writer;  // buffer used between work and callback
       gr_buffer_reader_sptr d_reader;
 
-      gruel::mutex              d_ringbuffer_mutex;
-      gruel::condition_variable d_ringbuffer_cond;
+      gr::thread::mutex              d_ringbuffer_mutex;
+      gr::thread::condition_variable d_ringbuffer_cond;
       bool                      d_ringbuffer_ready;
 
       // random stats
diff --git a/gr-audio/lib/portaudio/portaudio_source.cc b/gr-audio/lib/portaudio/portaudio_source.cc
index 937c1d0dbf..500d3109e5 100644
--- a/gr-audio/lib/portaudio/portaudio_source.cc
+++ b/gr-audio/lib/portaudio/portaudio_source.cc
@@ -103,7 +103,7 @@ namespace gr {
 
         // copy from input buffer to ringbuffer
         {
-          gruel::scoped_lock(d_ringbuffer_mutex);
+          gr::thread::scoped_lock(d_ringbuffer_mutex);
 
           memcpy(self->d_writer->write_pointer(),
                  inputBuffer,
@@ -305,7 +305,7 @@ namespace gr {
             return k;
 
           if(d_ok_to_block) {
-            gruel::scoped_lock guard(d_ringbuffer_mutex);
+            gr::thread::scoped_lock guard(d_ringbuffer_mutex);
             while(d_ringbuffer_ready == false)
               d_ringbuffer_cond.wait(guard);  // block here, then try again
             continue;
@@ -324,7 +324,7 @@ namespace gr {
 
           // Fill with some frames of zeros
           {
-            gruel::scoped_lock guard(d_ringbuffer_mutex);
+            gr::thread::scoped_lock guard(d_ringbuffer_mutex);
 
             int nf = std::min(noutput_items - k, (int)d_portaudio_buffer_size_frames);
             for(int i = 0; i < nf; i++) {
@@ -341,7 +341,7 @@ namespace gr {
 
         // We can read the smaller of the request and what's in the buffer.
         {
-          gruel::scoped_lock guard(d_ringbuffer_mutex);
+          gr::thread::scoped_lock guard(d_ringbuffer_mutex);
 
           int nf = std::min(noutput_items - k, nframes);
 
diff --git a/gr-audio/lib/portaudio/portaudio_source.h b/gr-audio/lib/portaudio/portaudio_source.h
index d4f4f01d1f..6a3419b613 100644
--- a/gr-audio/lib/portaudio/portaudio_source.h
+++ b/gr-audio/lib/portaudio/portaudio_source.h
@@ -25,7 +25,7 @@
 
 #include <audio/source.h>
 #include <gr_buffer.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 #include <string>
 #include <portaudio.h>
 #include <stdexcept>
@@ -58,8 +58,8 @@ namespace gr {
       gr_buffer_sptr        d_writer;  // buffer used between work and callback
       gr_buffer_reader_sptr d_reader;
 
-      gruel::mutex              d_ringbuffer_mutex;
-      gruel::condition_variable d_ringbuffer_cond;
+      gr::thread::mutex              d_ringbuffer_mutex;
+      gr::thread::condition_variable d_ringbuffer_cond;
       bool                      d_ringbuffer_ready;
 
       // random stats
diff --git a/gr-audio/swig/CMakeLists.txt b/gr-audio/swig/CMakeLists.txt
index e9bc9ddead..1a09ff8837 100644
--- a/gr-audio/swig/CMakeLists.txt
+++ b/gr-audio/swig/CMakeLists.txt
@@ -26,7 +26,6 @@ include(GrSwig)
 set(GR_SWIG_INCLUDE_DIRS
     ${GR_AUDIO_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
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..42def5d4d3 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}
 )
 
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}
 )
diff --git a/gr-channels/CMakeLists.txt b/gr-channels/CMakeLists.txt
index 666a837d10..225a297f25 100644
--- a/gr-channels/CMakeLists.txt
+++ b/gr-channels/CMakeLists.txt
@@ -28,7 +28,6 @@ include(GrBoost)
 include(GrComponent)
 
 GR_REGISTER_COMPONENT("gr-channels" ENABLE_GR_CHANNELS
-    ENABLE_GRUEL
     ENABLE_VOLK
     Boost_FOUND
     ENABLE_GNURADIO_RUNTIME
diff --git a/gr-channels/include/channels/api.h b/gr-channels/include/channels/api.h
index 41e65ca7cd..808336b042 100644
--- a/gr-channels/include/channels/api.h
+++ b/gr-channels/include/channels/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_CHANNELS_API_H
 #define INCLUDED_CHANNELS_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_channels_EXPORTS
 #  define CHANNELS_API __GR_ATTR_EXPORT
diff --git a/gr-channels/lib/CMakeLists.txt b/gr-channels/lib/CMakeLists.txt
index 30ff3ebdd2..bd0151143d 100644
--- a/gr-channels/lib/CMakeLists.txt
+++ b/gr-channels/lib/CMakeLists.txt
@@ -28,7 +28,6 @@ include_directories(
     ${GR_FILTER_INCLUDE_DIRS}
     ${GR_ANALOG_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-channels/swig/CMakeLists.txt b/gr-channels/swig/CMakeLists.txt
index c1bd4bb9f8..9c47b71f58 100644
--- a/gr-channels/swig/CMakeLists.txt
+++ b/gr-channels/swig/CMakeLists.txt
@@ -27,7 +27,6 @@ set(GR_SWIG_INCLUDE_DIRS
     ${GR_CHANNELS_INCLUDE_DIRS}
     ${GR_FILTER_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-comedi/include/comedi/api.h b/gr-comedi/include/comedi/api.h
index c9f9fbcae4..54aa18f317 100644
--- a/gr-comedi/include/comedi/api.h
+++ b/gr-comedi/include/comedi/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_COMEDI_API_H
 #define INCLUDED_COMEDI_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_comedi_EXPORTS
 #  define COMEDI_API __GR_ATTR_EXPORT
diff --git a/gr-comedi/lib/CMakeLists.txt b/gr-comedi/lib/CMakeLists.txt
index 0179c8f537..57b4df11a4 100644
--- a/gr-comedi/lib/CMakeLists.txt
+++ b/gr-comedi/lib/CMakeLists.txt
@@ -23,7 +23,6 @@
 include_directories(
     ${GR_COMEDI_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${LOG4CXX_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${COMEDI_INCLUDE_DIRS}
diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt
index 4895c622a9..cc1e5a439d 100644
--- a/gr-comedi/src/CMakeLists.txt
+++ b/gr-comedi/src/CMakeLists.txt
@@ -23,7 +23,6 @@
 include_directories(
     ${GR_COMEDI_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${COMEDI_INCLUDE_DIRS}
 )
diff --git a/gr-comedi/swig/CMakeLists.txt b/gr-comedi/swig/CMakeLists.txt
index 5e7cc15229..7b490cb740 100644
--- a/gr-comedi/swig/CMakeLists.txt
+++ b/gr-comedi/swig/CMakeLists.txt
@@ -26,7 +26,6 @@ include(GrSwig)
 set(GR_SWIG_INCLUDE_DIRS
     ${GR_COMEDI_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-digital/include/digital/api.h b/gr-digital/include/digital/api.h
index d45ace13f2..815f7b6627 100644
--- a/gr-digital/include/digital/api.h
+++ b/gr-digital/include/digital/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_DIGITAL_API_H
 #define INCLUDED_DIGITAL_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_digital_EXPORTS
 #  define DIGITAL_API __GR_ATTR_EXPORT
diff --git a/gr-digital/lib/CMakeLists.txt b/gr-digital/lib/CMakeLists.txt
index faa10c6b65..a17c91a85a 100644
--- a/gr-digital/lib/CMakeLists.txt
+++ b/gr-digital/lib/CMakeLists.txt
@@ -29,7 +29,6 @@ include_directories(
     ${GR_BLOCKS_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
     ${VOLK_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${LOG4CPP_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
diff --git a/gr-digital/lib/constellation_receiver_cb_impl.h b/gr-digital/lib/constellation_receiver_cb_impl.h
index 763dabfde2..7c34518340 100644
--- a/gr-digital/lib/constellation_receiver_cb_impl.h
+++ b/gr-digital/lib/constellation_receiver_cb_impl.h
@@ -24,7 +24,7 @@
 #define	INCLUDED_DIGITAL_CONSTELLATION_RECEIVER_CB_IMPL_H
 
 #include <digital/constellation_receiver_cb.h>
-#include <gruel/attributes.h>
+#include <attributes.h>
 #include <gr_complex.h>
 #include <blocks/control_loop.h>
 
diff --git a/gr-digital/lib/map_bb_impl.cc b/gr-digital/lib/map_bb_impl.cc
index 3a06394ec4..4ea91835a9 100644
--- a/gr-digital/lib/map_bb_impl.cc
+++ b/gr-digital/lib/map_bb_impl.cc
@@ -51,7 +51,7 @@ namespace gr {
     void
     map_bb_impl::set_map(const std::vector<int> &map)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       for(int i = 0; i < 0x100; i++)
 	d_map[i] = i;
@@ -75,7 +75,7 @@ namespace gr {
 		      gr_vector_const_void_star &input_items,
 		      gr_vector_void_star &output_items)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       const unsigned char *in = (const unsigned char*)input_items[0];
       unsigned char *out = (unsigned char*)output_items[0];
diff --git a/gr-digital/lib/map_bb_impl.h b/gr-digital/lib/map_bb_impl.h
index bce2b9b1b3..59f1e834b7 100644
--- a/gr-digital/lib/map_bb_impl.h
+++ b/gr-digital/lib/map_bb_impl.h
@@ -24,7 +24,7 @@
 #define INCLUDED_GR_MAP_BB_IMPL_H
 
 #include <digital/map_bb.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 
 namespace gr {
   namespace digital {
@@ -33,7 +33,7 @@ namespace gr {
     {
     private:
       unsigned char d_map[0x100];
-      gruel::mutex d_mutex;
+      gr::thread::mutex d_mutex;
 
     public:
       map_bb_impl(const std::vector<int> &map);
diff --git a/gr-digital/lib/mpsk_receiver_cc_impl.h b/gr-digital/lib/mpsk_receiver_cc_impl.h
index 099dd424a3..ed53d0f2e4 100644
--- a/gr-digital/lib/mpsk_receiver_cc_impl.h
+++ b/gr-digital/lib/mpsk_receiver_cc_impl.h
@@ -24,7 +24,7 @@
 #define	INCLUDED_DIGITAL_MPSK_RECEIVER_CC_IMPL_H
 
 #include <digital/mpsk_receiver_cc.h>
-#include <gruel/attributes.h>
+#include <attributes.h>
 #include <blocks/control_loop.h>
 #include <gr_complex.h>
 #include <fstream>
diff --git a/gr-digital/python/qa_crc32_bb.py b/gr-digital/python/qa_crc32_bb.py
index 6ee7ca1bcf..6f5249ca08 100755
--- a/gr-digital/python/qa_crc32_bb.py
+++ b/gr-digital/python/qa_crc32_bb.py
@@ -22,8 +22,7 @@
 from gnuradio import gr, gr_unittest
 import blocks_swig as blocks
 import digital_swig as digital
-try: import pmt
-except: from gruel import pmt
+import pmt
 
 class qa_crc32_bb (gr_unittest.TestCase):
 
diff --git a/gr-digital/python/qa_header_payload_demux.py b/gr-digital/python/qa_header_payload_demux.py
index 7595409ef8..222b457021 100755
--- a/gr-digital/python/qa_header_payload_demux.py
+++ b/gr-digital/python/qa_header_payload_demux.py
@@ -20,8 +20,7 @@
 # 
 
 from gnuradio import gr, gr_unittest
-try: import pmt
-except: from gruel import pmt
+import pmt
 import digital_swig as digital
 import blocks_swig as blocks
 import time
diff --git a/gr-digital/python/qa_ofdm_carrier_allocator_cvc.py b/gr-digital/python/qa_ofdm_carrier_allocator_cvc.py
index e1f017ba9e..f5c72fb87e 100755
--- a/gr-digital/python/qa_ofdm_carrier_allocator_cvc.py
+++ b/gr-digital/python/qa_ofdm_carrier_allocator_cvc.py
@@ -20,8 +20,7 @@
 # 
 
 from gnuradio import gr, gr_unittest
-try: import pmt
-except: from gruel import pmt
+import pmt
 import digital_swig as digital
 import blocks_swig as blocks
 
diff --git a/gr-digital/python/qa_ofdm_chanest_vcvc.py b/gr-digital/python/qa_ofdm_chanest_vcvc.py
index c45e39988b..a08ef20846 100755
--- a/gr-digital/python/qa_ofdm_chanest_vcvc.py
+++ b/gr-digital/python/qa_ofdm_chanest_vcvc.py
@@ -20,8 +20,7 @@
 # 
 
 from gnuradio import gr, gr_unittest
-try: import pmt
-except: from gruel import pmt
+import pmt
 import blocks_swig as blocks
 import analog_swig as analog
 import digital_swig as digital
diff --git a/gr-digital/python/qa_ofdm_cyclic_prefixer.py b/gr-digital/python/qa_ofdm_cyclic_prefixer.py
index 355742ab07..0469b3f970 100755
--- a/gr-digital/python/qa_ofdm_cyclic_prefixer.py
+++ b/gr-digital/python/qa_ofdm_cyclic_prefixer.py
@@ -21,8 +21,7 @@
 # 
 
 from gnuradio import gr, gr_unittest
-try: import pmt
-except: from gruel import pmt
+import pmt
 import digital_swig as digital
 import blocks_swig as blocks
 
diff --git a/gr-digital/python/qa_ofdm_frame_equalizer_vcvc.py b/gr-digital/python/qa_ofdm_frame_equalizer_vcvc.py
index 6df9ecbecf..5a34791650 100755
--- a/gr-digital/python/qa_ofdm_frame_equalizer_vcvc.py
+++ b/gr-digital/python/qa_ofdm_frame_equalizer_vcvc.py
@@ -21,8 +21,7 @@
 
 import numpy
 from gnuradio import gr, gr_unittest
-try: import pmt
-except: from gruel import pmt
+import pmt
 import digital_swig as digital
 import blocks_swig as blocks
 
diff --git a/gr-digital/python/qa_ofdm_serializer_vcc.py b/gr-digital/python/qa_ofdm_serializer_vcc.py
index a5dee78558..0ce6f01348 100755
--- a/gr-digital/python/qa_ofdm_serializer_vcc.py
+++ b/gr-digital/python/qa_ofdm_serializer_vcc.py
@@ -25,8 +25,7 @@ import blocks_swig as blocks
 import fft_swig as fft
 import analog_swig as analog
 import digital_swig as digital
-try: import pmt
-except: from gruel import pmt
+import pmt
 import numpy
 
 class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
diff --git a/gr-digital/python/qa_packet_headergenerator_bb.py b/gr-digital/python/qa_packet_headergenerator_bb.py
index 0f42c33a51..bb0cfef9f4 100755
--- a/gr-digital/python/qa_packet_headergenerator_bb.py
+++ b/gr-digital/python/qa_packet_headergenerator_bb.py
@@ -22,8 +22,7 @@
 from gnuradio import gr, gr_unittest
 import digital_swig as digital
 import blocks_swig as blocks
-try: import pmt
-except: from gruel import pmt
+import pmt
 
 class qa_packet_headergenerator_bb (gr_unittest.TestCase):
 
diff --git a/gr-digital/python/qa_packet_headerparser_b.py b/gr-digital/python/qa_packet_headerparser_b.py
index da7aef69d3..3c8cd67335 100755
--- a/gr-digital/python/qa_packet_headerparser_b.py
+++ b/gr-digital/python/qa_packet_headerparser_b.py
@@ -21,8 +21,7 @@
 
 import time
 from gnuradio import gr, gr_unittest
-try: import pmt
-except: from gruel import pmt
+import pmt
 import blocks_swig as blocks
 import digital_swig as digital
 
diff --git a/gr-digital/python/utils/tagged_streams.py b/gr-digital/python/utils/tagged_streams.py
index 6a956aa642..f2a58ffe1e 100644
--- a/gr-digital/python/utils/tagged_streams.py
+++ b/gr-digital/python/utils/tagged_streams.py
@@ -1,6 +1,27 @@
+#!/usr/bin/env python
+#
+# Copyright 2013 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
 from gnuradio import gr
-try: import pmt
-except: from gruel import pmt
+import pmt
 
 def make_lengthtags(lengths, offsets, tagname='length', vlen=1):
     tags = []
diff --git a/gr-digital/swig/CMakeLists.txt b/gr-digital/swig/CMakeLists.txt
index 6f49298209..56da713b7f 100644
--- a/gr-digital/swig/CMakeLists.txt
+++ b/gr-digital/swig/CMakeLists.txt
@@ -30,7 +30,6 @@ set(GR_SWIG_INCLUDE_DIRS
     ${GR_FFT_INCLUDE_DIRS}
     ${GR_FILTER_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-fcd/examples/c++/CMakeLists.txt b/gr-fcd/examples/c++/CMakeLists.txt
index ff2c3d8bb2..346e95db3f 100644
--- a/gr-fcd/examples/c++/CMakeLists.txt
+++ b/gr-fcd/examples/c++/CMakeLists.txt
@@ -23,7 +23,6 @@ include_directories(
     ${GR_ANALOG_INCLUDE_DIRS}
     ${GR_AUDIO_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-fcd/include/fcd/fcd_api.h b/gr-fcd/include/fcd/fcd_api.h
index e1452b8afc..9b8a16639a 100644
--- a/gr-fcd/include/fcd/fcd_api.h
+++ b/gr-fcd/include/fcd/fcd_api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_FCD_API_H
 #define INCLUDED_FCD_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_fcd_EXPORTS
 #  define FCD_API __GR_ATTR_EXPORT
diff --git a/gr-fcd/lib/CMakeLists.txt b/gr-fcd/lib/CMakeLists.txt
index f12842d6b8..151bb401a8 100644
--- a/gr-fcd/lib/CMakeLists.txt
+++ b/gr-fcd/lib/CMakeLists.txt
@@ -30,7 +30,6 @@ include_directories(
     ${GR_AUDIO_INCLUDE_DIRS}
     ${GR_BLOCKS_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${LIBUSB_INCLUDE_DIR}
 )
diff --git a/gr-fcd/lib/fcd_source_c_impl.cc b/gr-fcd/lib/fcd_source_c_impl.cc
index 350ba9e544..eb61183115 100644
--- a/gr-fcd/lib/fcd_source_c_impl.cc
+++ b/gr-fcd/lib/fcd_source_c_impl.cc
@@ -27,7 +27,7 @@
 #include <fcdhidcmd.h> // needed for extended API
 #include <gr_io_signature.h>
 #include <blocks/float_to_complex.h>
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 //#include <iostream>
 //using namespace std;
diff --git a/gr-fcd/swig/CMakeLists.txt b/gr-fcd/swig/CMakeLists.txt
index 370a82bef2..af2152eca9 100644
--- a/gr-fcd/swig/CMakeLists.txt
+++ b/gr-fcd/swig/CMakeLists.txt
@@ -29,7 +29,6 @@ set(GR_SWIG_INCLUDE_DIRS
     ${GR_FCD_INCLUDE_DIRS}
     ${GR_AUDIO_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-fec/CMakeLists.txt b/gr-fec/CMakeLists.txt
index a63cf9cd14..171802610a 100644
--- a/gr-fec/CMakeLists.txt
+++ b/gr-fec/CMakeLists.txt
@@ -29,7 +29,6 @@ include(GrComponent)
 
 GR_REGISTER_COMPONENT("gr-fec" ENABLE_GR_FEC
     Boost_FOUND
-    ENABLE_GRUEL
     ENABLE_GNURADIO_RUNTIME
     ENABLE_GR_BLOCKS
 )
diff --git a/gr-fec/include/fec/api.h b/gr-fec/include/fec/api.h
index e6d8ca5e99..62c0fd98de 100644
--- a/gr-fec/include/fec/api.h
+++ b/gr-fec/include/fec/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_FEC_API_H
 #define INCLUDED_FEC_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_fec_EXPORTS
 #  define FEC_API __GR_ATTR_EXPORT
diff --git a/gr-fec/lib/CMakeLists.txt b/gr-fec/lib/CMakeLists.txt
index d6c273aa9f..29eb36bd1c 100644
--- a/gr-fec/lib/CMakeLists.txt
+++ b/gr-fec/lib/CMakeLists.txt
@@ -30,7 +30,6 @@ include_directories(
     ${CMAKE_CURRENT_BINARY_DIR}
     ${GR_FEC_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-fec/swig/CMakeLists.txt b/gr-fec/swig/CMakeLists.txt
index e071386237..9e80e74267 100644
--- a/gr-fec/swig/CMakeLists.txt
+++ b/gr-fec/swig/CMakeLists.txt
@@ -27,7 +27,6 @@ set(GR_SWIG_INCLUDE_DIRS
     ${CMAKE_CURRENT_BINARY_DIR}/../include
     ${GR_FEC_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-fft/CMakeLists.txt b/gr-fft/CMakeLists.txt
index 9133303d9b..37c0294cbf 100644
--- a/gr-fft/CMakeLists.txt
+++ b/gr-fft/CMakeLists.txt
@@ -30,7 +30,6 @@ find_package(FFTW3f)
 include(GrComponent)
 
 GR_REGISTER_COMPONENT("gr-fft" ENABLE_GR_FFT
-    ENABLE_GRUEL
     ENABLE_VOLK
     Boost_FOUND
     ENABLE_GNURADIO_RUNTIME
diff --git a/gr-fft/include/fft/api.h b/gr-fft/include/fft/api.h
index eef4563738..a569ceb265 100644
--- a/gr-fft/include/fft/api.h
+++ b/gr-fft/include/fft/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_FFT_API_H
 #define INCLUDED_FFT_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_fft_EXPORTS
 #  define FFT_API __GR_ATTR_EXPORT
diff --git a/gr-fft/lib/CMakeLists.txt b/gr-fft/lib/CMakeLists.txt
index 6c0c18eaa0..20fb338465 100644
--- a/gr-fft/lib/CMakeLists.txt
+++ b/gr-fft/lib/CMakeLists.txt
@@ -25,7 +25,6 @@ include_directories(
     ${CMAKE_CURRENT_BINARY_DIR}
     ${GR_FFT_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${FFTW3F_INCLUDE_DIRS}
 )
diff --git a/gr-fft/swig/CMakeLists.txt b/gr-fft/swig/CMakeLists.txt
index 2545edece4..dae7abb6df 100644
--- a/gr-fft/swig/CMakeLists.txt
+++ b/gr-fft/swig/CMakeLists.txt
@@ -26,7 +26,6 @@ include(GrSwig)
 set(GR_SWIG_INCLUDE_DIRS
     ${GR_FFT_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${FFTW3F_INCLUDE_DIRS}
 )
diff --git a/gr-filter/CMakeLists.txt b/gr-filter/CMakeLists.txt
index 2b83542e6f..0aeb2bbbb6 100644
--- a/gr-filter/CMakeLists.txt
+++ b/gr-filter/CMakeLists.txt
@@ -28,7 +28,6 @@ include(GrBoost)
 include(GrComponent)
 
 GR_REGISTER_COMPONENT("gr-filter" ENABLE_GR_FILTER
-    ENABLE_GRUEL
     ENABLE_VOLK
     Boost_FOUND
     ENABLE_GNURADIO_RUNTIME
diff --git a/gr-filter/include/filter/api.h b/gr-filter/include/filter/api.h
index 025b0bd4a7..97f2d537a0 100644
--- a/gr-filter/include/filter/api.h
+++ b/gr-filter/include/filter/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_FILTER_API_H
 #define INCLUDED_FILTER_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_filter_EXPORTS
 #  define FILTER_API __GR_ATTR_EXPORT
diff --git a/gr-filter/lib/CMakeLists.txt b/gr-filter/lib/CMakeLists.txt
index 2a32debd9a..c4d247785f 100644
--- a/gr-filter/lib/CMakeLists.txt
+++ b/gr-filter/lib/CMakeLists.txt
@@ -97,7 +97,6 @@ include_directories(
     ${GR_BLOCKS_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
     ${VOLK_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${LOG4CPP_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
diff --git a/gr-filter/lib/fir_filter_XXX_impl.cc.t b/gr-filter/lib/fir_filter_XXX_impl.cc.t
index 319c267270..e48afe95f2 100644
--- a/gr-filter/lib/fir_filter_XXX_impl.cc.t
+++ b/gr-filter/lib/fir_filter_XXX_impl.cc.t
@@ -64,7 +64,7 @@ namespace gr {
     void
     @IMPL_NAME@::set_taps(const std::vector<@TAP_TYPE@> &taps)
     {
-      gruel::scoped_lock l(d_setlock);
+      gr::thread::scoped_lock l(d_setlock);
       d_fir->set_taps(taps);
       d_updated = true;
     }
@@ -80,7 +80,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);
 
       const @I_TYPE@ *in = (const @I_TYPE@*)input_items[0];
       @O_TYPE@ *out = (@O_TYPE@*)output_items[0];
diff --git a/gr-filter/lib/pfb_arb_resampler_ccf_impl.cc b/gr-filter/lib/pfb_arb_resampler_ccf_impl.cc
index 5480366de2..71507a5aa5 100644
--- a/gr-filter/lib/pfb_arb_resampler_ccf_impl.cc
+++ b/gr-filter/lib/pfb_arb_resampler_ccf_impl.cc
@@ -140,7 +140,7 @@ namespace gr {
     void
     pfb_arb_resampler_ccf_impl::set_taps(const std::vector<float> &taps)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       std::vector<float> dtaps;
       create_diff_taps(taps, dtaps);
@@ -172,7 +172,7 @@ namespace gr {
     void
     pfb_arb_resampler_ccf_impl::set_rate(float rate)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       d_dec_rate = (unsigned int)floor(d_int_rate/rate);
       d_flt_rate = (d_int_rate/rate) - d_dec_rate;
@@ -182,7 +182,7 @@ namespace gr {
     void
     pfb_arb_resampler_ccf_impl::set_phase(float ph)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
       if((ph < 0) || (ph >= 2.0*M_PI)) {
 	throw std::runtime_error("pfb_arb_resampler_ccf: set_phase value out of bounds [0, 2pi).\n");
       }
@@ -204,7 +204,7 @@ namespace gr {
 					     gr_vector_const_void_star &input_items,
 					     gr_vector_void_star &output_items)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       gr_complex *in = (gr_complex*)input_items[0];
       gr_complex *out = (gr_complex*)output_items[0];
diff --git a/gr-filter/lib/pfb_arb_resampler_ccf_impl.h b/gr-filter/lib/pfb_arb_resampler_ccf_impl.h
index 891e601e09..71f8957421 100644
--- a/gr-filter/lib/pfb_arb_resampler_ccf_impl.h
+++ b/gr-filter/lib/pfb_arb_resampler_ccf_impl.h
@@ -26,7 +26,7 @@
 
 #include <filter/pfb_arb_resampler_ccf.h>
 #include <filter/fir_filter.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 
 namespace gr {
   namespace filter {
@@ -46,7 +46,7 @@ namespace gr {
       int          d_start_index;
       unsigned int d_taps_per_filter;
       bool         d_updated;
-      gruel::mutex d_mutex; // mutex to protect set/work access
+      gr::thread::mutex d_mutex; // mutex to protect set/work access
 
       void create_diff_taps(const std::vector<float> &newtaps,
 			    std::vector<float> &difftaps);
diff --git a/gr-filter/lib/pfb_arb_resampler_fff_impl.cc b/gr-filter/lib/pfb_arb_resampler_fff_impl.cc
index 6aff374fdd..2a60c1e2e2 100644
--- a/gr-filter/lib/pfb_arb_resampler_fff_impl.cc
+++ b/gr-filter/lib/pfb_arb_resampler_fff_impl.cc
@@ -147,7 +147,7 @@ namespace gr {
     void
     pfb_arb_resampler_fff_impl::set_taps(const std::vector<float> &taps)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
     }
  
     std::vector<std::vector<float> >
@@ -172,7 +172,7 @@ namespace gr {
     void
     pfb_arb_resampler_fff_impl::set_rate(float rate)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       d_dec_rate = (unsigned int)floor(d_int_rate/rate);
       d_flt_rate = (d_int_rate/rate) - d_dec_rate;
@@ -182,7 +182,7 @@ namespace gr {
     void
     pfb_arb_resampler_fff_impl::set_phase(float ph)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
       if((ph < 0) || (ph >= 2.0*M_PI)) {
 	throw std::runtime_error("pfb_arb_resampler_ccf: set_phase value out of bounds [0, 2pi).\n");
       }
@@ -204,7 +204,7 @@ namespace gr {
 					     gr_vector_const_void_star &input_items,
 					     gr_vector_void_star &output_items)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       float *in = (float*)input_items[0];
       float *out = (float*)output_items[0];
diff --git a/gr-filter/lib/pfb_arb_resampler_fff_impl.h b/gr-filter/lib/pfb_arb_resampler_fff_impl.h
index 5889627114..fb871d4d44 100644
--- a/gr-filter/lib/pfb_arb_resampler_fff_impl.h
+++ b/gr-filter/lib/pfb_arb_resampler_fff_impl.h
@@ -26,7 +26,7 @@
 
 #include <filter/pfb_arb_resampler_fff.h>
 #include <filter/fir_filter.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 
 namespace gr {
   namespace filter {
@@ -46,7 +46,7 @@ namespace gr {
       int          d_start_index;
       unsigned int d_taps_per_filter;
       bool         d_updated;
-      gruel::mutex d_mutex; // mutex to protect set/work access
+      gr::thread::mutex d_mutex; // mutex to protect set/work access
 
       void create_diff_taps(const std::vector<float> &newtaps,
 			    std::vector<float> &difftaps);
diff --git a/gr-filter/lib/pfb_channelizer_ccf_impl.cc b/gr-filter/lib/pfb_channelizer_ccf_impl.cc
index 28fc1dcc10..53d5375bec 100644
--- a/gr-filter/lib/pfb_channelizer_ccf_impl.cc
+++ b/gr-filter/lib/pfb_channelizer_ccf_impl.cc
@@ -92,7 +92,7 @@ namespace gr {
     void
     pfb_channelizer_ccf_impl::set_taps(const std::vector<float> &taps)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       polyphase_filterbank::set_taps(taps);
       set_history(d_taps_per_filter+1);
@@ -114,7 +114,7 @@ namespace gr {
     void
     pfb_channelizer_ccf_impl::set_channel_map(const std::vector<int> &map)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
       
       if(map.size() > 0) {
 	unsigned int max = (unsigned int)*std::max_element(map.begin(), map.end());
@@ -137,7 +137,7 @@ namespace gr {
 					   gr_vector_const_void_star &input_items,
 					   gr_vector_void_star &output_items)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       gr_complex *in = (gr_complex *) input_items[0];
       gr_complex *out = (gr_complex *) output_items[0];
diff --git a/gr-filter/lib/pfb_channelizer_ccf_impl.h b/gr-filter/lib/pfb_channelizer_ccf_impl.h
index 16b112b9a0..56f1103ca5 100644
--- a/gr-filter/lib/pfb_channelizer_ccf_impl.h
+++ b/gr-filter/lib/pfb_channelizer_ccf_impl.h
@@ -27,7 +27,7 @@
 #include <filter/polyphase_filterbank.h>
 #include <filter/fir_filter.h>
 #include <fft/fft.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 
 namespace gr {
   namespace filter {
@@ -41,7 +41,7 @@ namespace gr {
       int              d_rate_ratio;
       int              d_output_multiple;
       std::vector<int> d_channel_map;
-      gruel::mutex     d_mutex; // mutex to protect set/work access
+      gr::thread::mutex     d_mutex; // mutex to protect set/work access
 
     public:
       pfb_channelizer_ccf_impl(unsigned int nfilts,
diff --git a/gr-filter/lib/pfb_decimator_ccf_impl.cc b/gr-filter/lib/pfb_decimator_ccf_impl.cc
index f9a60cb28d..52c459f784 100644
--- a/gr-filter/lib/pfb_decimator_ccf_impl.cc
+++ b/gr-filter/lib/pfb_decimator_ccf_impl.cc
@@ -63,7 +63,7 @@ namespace gr {
     void
     pfb_decimator_ccf_impl::set_taps(const std::vector<float> &taps)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       polyphase_filterbank::set_taps(taps);
       set_history(d_taps_per_filter+1);
@@ -89,7 +89,7 @@ namespace gr {
 				 gr_vector_const_void_star &input_items,
 				 gr_vector_void_star &output_items)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       gr_complex *in;
       gr_complex *out = (gr_complex *)output_items[0];
diff --git a/gr-filter/lib/pfb_decimator_ccf_impl.h b/gr-filter/lib/pfb_decimator_ccf_impl.h
index c4338a5eca..31b9910418 100644
--- a/gr-filter/lib/pfb_decimator_ccf_impl.h
+++ b/gr-filter/lib/pfb_decimator_ccf_impl.h
@@ -28,7 +28,7 @@
 #include <filter/polyphase_filterbank.h>
 #include <filter/fir_filter.h>
 #include <fft/fft.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 
 namespace gr {
   namespace filter {
@@ -40,7 +40,7 @@ namespace gr {
       unsigned int d_rate;
       unsigned int d_chan;
       gr_complex  *d_rotator;
-      gruel::mutex d_mutex; // mutex to protect set/work access
+      gr::thread::mutex d_mutex; // mutex to protect set/work access
     
     public:
       pfb_decimator_ccf_impl(unsigned int decim,
diff --git a/gr-filter/lib/pfb_interpolator_ccf_impl.cc b/gr-filter/lib/pfb_interpolator_ccf_impl.cc
index 572db728b3..042238ff48 100644
--- a/gr-filter/lib/pfb_interpolator_ccf_impl.cc
+++ b/gr-filter/lib/pfb_interpolator_ccf_impl.cc
@@ -58,7 +58,7 @@ namespace gr {
     void
     pfb_interpolator_ccf_impl::set_taps(const std::vector<float> &taps)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       polyphase_filterbank::set_taps(taps);
       set_history(d_taps_per_filter+1);
diff --git a/gr-filter/lib/pfb_interpolator_ccf_impl.h b/gr-filter/lib/pfb_interpolator_ccf_impl.h
index 7e1fe2ca11..fb54501b1a 100644
--- a/gr-filter/lib/pfb_interpolator_ccf_impl.h
+++ b/gr-filter/lib/pfb_interpolator_ccf_impl.h
@@ -28,7 +28,7 @@
 #include <filter/polyphase_filterbank.h>
 #include <filter/fir_filter.h>
 #include <fft/fft.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 
 namespace gr {
   namespace filter {
@@ -38,7 +38,7 @@ namespace gr {
     private:
       bool         d_updated;
       unsigned int d_rate;
-      gruel::mutex d_mutex; // mutex to protect set/work access
+      gr::thread::mutex d_mutex; // mutex to protect set/work access
 
     public:
       pfb_interpolator_ccf_impl(unsigned int interp,
diff --git a/gr-filter/lib/pfb_synthesizer_ccf_impl.cc b/gr-filter/lib/pfb_synthesizer_ccf_impl.cc
index f89b48b125..0968bbc6c3 100644
--- a/gr-filter/lib/pfb_synthesizer_ccf_impl.cc
+++ b/gr-filter/lib/pfb_synthesizer_ccf_impl.cc
@@ -86,7 +86,7 @@ namespace gr {
     void
     pfb_synthesizer_ccf_impl::set_taps(const std::vector<float> &taps)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       if(d_twox == 1)
 	set_taps1(taps);
@@ -201,7 +201,7 @@ namespace gr {
     void
     pfb_synthesizer_ccf_impl::set_channel_map(const std::vector<int> &map)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       if(map.size() > 0) {
 	unsigned int max = (unsigned int)*std::max_element(map.begin(), map.end());
@@ -226,7 +226,7 @@ namespace gr {
 				   gr_vector_const_void_star &input_items,
 				   gr_vector_void_star &output_items)
     {
-      gruel::scoped_lock guard(d_mutex);
+      gr::thread::scoped_lock guard(d_mutex);
 
       gr_complex *in = (gr_complex*)input_items[0];
       gr_complex *out = (gr_complex*)output_items[0];
diff --git a/gr-filter/lib/pfb_synthesizer_ccf_impl.h b/gr-filter/lib/pfb_synthesizer_ccf_impl.h
index adffc143f2..b443773de3 100644
--- a/gr-filter/lib/pfb_synthesizer_ccf_impl.h
+++ b/gr-filter/lib/pfb_synthesizer_ccf_impl.h
@@ -27,7 +27,7 @@
 #include <filter/pfb_synthesizer_ccf.h>
 #include <filter/fir_filter_with_buffer.h>
 #include <fft/fft.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 
 namespace gr {
   namespace filter {
@@ -48,7 +48,7 @@ namespace gr {
       int              d_state;
       std::vector<int> d_channel_map;
       unsigned int     d_twox;
-      gruel::mutex     d_mutex; // mutex to protect set/work access
+      gr::thread::mutex     d_mutex; // mutex to protect set/work access
 
       /*!
        * \brief Tap setting algorithm for critically sampled channels
diff --git a/gr-filter/lib/qa_filter.h b/gr-filter/lib/qa_filter.h
index 427e7f9f6a..d3bc0adecb 100644
--- a/gr-filter/lib/qa_filter.h
+++ b/gr-filter/lib/qa_filter.h
@@ -23,7 +23,7 @@
 #ifndef _QA_GR_FILTER_H_
 #define _QA_GR_FILTER_H_
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 #include <cppunit/TestSuite.h>
 
 //! collect all the tests for the gr-filter directory
diff --git a/gr-filter/swig/CMakeLists.txt b/gr-filter/swig/CMakeLists.txt
index 5656c07877..d2be62e767 100644
--- a/gr-filter/swig/CMakeLists.txt
+++ b/gr-filter/swig/CMakeLists.txt
@@ -27,7 +27,6 @@ set(GR_SWIG_INCLUDE_DIRS
     ${GR_FILTER_INCLUDE_DIRS}
     ${GR_FFT_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${FFTW3F_INCLUDE_DIRS}
 )
diff --git a/gr-noaa/include/noaa/api.h b/gr-noaa/include/noaa/api.h
index d3c3fbf2d0..86bc8eb077 100644
--- a/gr-noaa/include/noaa/api.h
+++ b/gr-noaa/include/noaa/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_NOAA_API_H
 #define INCLUDED_NOAA_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_noaa_EXPORTS
 #  define NOAA_API __GR_ATTR_EXPORT
diff --git a/gr-noaa/lib/CMakeLists.txt b/gr-noaa/lib/CMakeLists.txt
index a5a5cfbb8f..2c69c65675 100644
--- a/gr-noaa/lib/CMakeLists.txt
+++ b/gr-noaa/lib/CMakeLists.txt
@@ -23,7 +23,6 @@
 include_directories(
     ${GR_NOAA_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${LOG4CPP_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
diff --git a/gr-noaa/swig/CMakeLists.txt b/gr-noaa/swig/CMakeLists.txt
index cc471a56c8..18cfc8b4cd 100644
--- a/gr-noaa/swig/CMakeLists.txt
+++ b/gr-noaa/swig/CMakeLists.txt
@@ -26,7 +26,6 @@ include(GrSwig)
 set(GR_SWIG_INCLUDE_DIRS
     ${GR_NOAA_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-pager/include/pager/api.h b/gr-pager/include/pager/api.h
index 4312c5ae38..d14756277f 100644
--- a/gr-pager/include/pager/api.h
+++ b/gr-pager/include/pager/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_PAGER_API_H
 #define INCLUDED_PAGER_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_pager_EXPORTS
 #  define PAGER_API __GR_ATTR_EXPORT
diff --git a/gr-pager/lib/CMakeLists.txt b/gr-pager/lib/CMakeLists.txt
index ca64bf38ef..fa87068478 100644
--- a/gr-pager/lib/CMakeLists.txt
+++ b/gr-pager/lib/CMakeLists.txt
@@ -24,7 +24,6 @@ include_directories(
     ${GR_PAGER_INCLUDE_DIRS}
     ${GR_BLOCKS_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-pager/swig/CMakeLists.txt b/gr-pager/swig/CMakeLists.txt
index 5fba4fa19a..db36f0ffc7 100644
--- a/gr-pager/swig/CMakeLists.txt
+++ b/gr-pager/swig/CMakeLists.txt
@@ -26,7 +26,6 @@ include(GrSwig)
 set(GR_SWIG_INCLUDE_DIRS
     ${GR_PAGER_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt
index 046fb3ca19..4457fbf6b9 100644
--- a/gr-qtgui/CMakeLists.txt
+++ b/gr-qtgui/CMakeLists.txt
@@ -46,7 +46,6 @@ GR_REGISTER_COMPONENT("gr-qtgui" ENABLE_GR_QTGUI
     Boost_FOUND
     QT4_FOUND
     QWT_FOUND
-    ENABLE_GRUEL
     ENABLE_VOLK
     ENABLE_GNURADIO_RUNTIME
     ENABLE_GR_FFT
diff --git a/gr-qtgui/include/qtgui/SpectrumGUIClass.h b/gr-qtgui/include/qtgui/SpectrumGUIClass.h
index 844c6509d6..48b6a37501 100644
--- a/gr-qtgui/include/qtgui/SpectrumGUIClass.h
+++ b/gr-qtgui/include/qtgui/SpectrumGUIClass.h
@@ -23,7 +23,7 @@
 #ifndef SPECTRUM_GUI_CLASS_HPP
 #define SPECTRUM_GUI_CLASS_HPP
 
-#include <gruel/thread.h>
+#include <thread/thread.h>
 #include <qwidget.h>
 #include <qapplication.h>
 #include <qlabel.h>
@@ -66,7 +66,7 @@ public:
 		    const uint64_t, const float*,
 		    const uint64_t, const float*,
 		    const uint64_t,
-		    const gruel::high_res_timer_type, const bool);
+		    const gr::high_res_timer_type, const bool);
 
   float getPowerValue();
   void setPowerValue(const float);
@@ -78,8 +78,8 @@ public:
   int getFFTSizeIndex();
   void setFFTSize(const int);
 
-  gruel::high_res_timer_type getLastGUIUpdateTime();
-  void setLastGUIUpdateTime(const gruel::high_res_timer_type);
+  gr::high_res_timer_type getLastGUIUpdateTime();
+  void setLastGUIUpdateTime(const gr::high_res_timer_type);
 
   unsigned int getPendingGUIUpdateEvents();
   void incrementPendingGUIUpdateEvents();
@@ -103,7 +103,7 @@ protected:
 
 private:
 
-  gruel::mutex d_mutex;
+  gr::thread::mutex d_mutex;
   int64_t _dataPoints;
   std::string _title;
   double _centerFrequency;
@@ -114,7 +114,7 @@ private:
   int _windowType;
   int64_t _lastDataPointCount;
   int _fftSize;
-  gruel::high_res_timer_type _lastGUIUpdateTime;
+  gr::high_res_timer_type _lastGUIUpdateTime;
   unsigned int _pendingGUIUpdateEventsCount;
   int _droppedEntriesCount;
   bool _fftBuffersCreatedFlag;
diff --git a/gr-qtgui/include/qtgui/TimeRasterDisplayPlot.h b/gr-qtgui/include/qtgui/TimeRasterDisplayPlot.h
index c1ea427769..fce22e9df1 100644
--- a/gr-qtgui/include/qtgui/TimeRasterDisplayPlot.h
+++ b/gr-qtgui/include/qtgui/TimeRasterDisplayPlot.h
@@ -30,7 +30,7 @@
 #include <qtgui/DisplayPlot.h>
 #include <qtgui/timeRasterGlobalData.h>
 #include <qtgui/plot_raster.h>
-#include <gruel/high_res_timer.h>
+#include <high_res_timer.h>
 
 #if QWT_VERSION < 0x060000
 #include <qtgui/plot_waterfall.h>
diff --git a/gr-qtgui/include/qtgui/WaterfallDisplayPlot.h b/gr-qtgui/include/qtgui/WaterfallDisplayPlot.h
index 6545774325..6659f4f2d6 100644
--- a/gr-qtgui/include/qtgui/WaterfallDisplayPlot.h
+++ b/gr-qtgui/include/qtgui/WaterfallDisplayPlot.h
@@ -29,7 +29,7 @@
 #include <qwt_plot_spectrogram.h>
 #include <qtgui/DisplayPlot.h>
 #include <qtgui/waterfallGlobalData.h>
-#include <gruel/high_res_timer.h>
+#include <high_res_timer.h>
 
 #if QWT_VERSION < 0x060000
 #include <qtgui/plot_waterfall.h>
@@ -61,14 +61,14 @@ public:
   void plotNewData(const std::vector<double*> dataPoints,
 		   const int64_t numDataPoints,
 		   const double timePerFFT,
-		   const gruel::high_res_timer_type timestamp,
+		   const gr::high_res_timer_type timestamp,
 		   const int droppedFrames);
 
   // to be removed
   void plotNewData(const double* dataPoints,
 		   const int64_t numDataPoints,
 		   const double timePerFFT,
-		   const gruel::high_res_timer_type timestamp,
+		   const gr::high_res_timer_type timestamp,
 		   const int droppedFrames);
 
   void setIntensityRange(const double minIntensity, const double maxIntensity);
@@ -111,7 +111,7 @@ private:
   std::vector<QwtPlotSpectrogram*> d_spectrogram;
 #endif
 
-  gruel::high_res_timer_type _lastReplot;
+  gr::high_res_timer_type _lastReplot;
 
   std::vector<int> _intensityColorMapType;
   QColor _userDefinedLowIntensityColor;
diff --git a/gr-qtgui/include/qtgui/api.h b/gr-qtgui/include/qtgui/api.h
index e88948e07b..888dd656c8 100644
--- a/gr-qtgui/include/qtgui/api.h
+++ b/gr-qtgui/include/qtgui/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_QTGUI_API_H
 #define INCLUDED_QTGUI_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_qtgui_EXPORTS
 #  define QTGUI_API __GR_ATTR_EXPORT
diff --git a/gr-qtgui/include/qtgui/qtgui_types.h b/gr-qtgui/include/qtgui/qtgui_types.h
index f4b16dfef2..135350dbb8 100644
--- a/gr-qtgui/include/qtgui/qtgui_types.h
+++ b/gr-qtgui/include/qtgui/qtgui_types.h
@@ -25,7 +25,7 @@
 
 #include <qwt_color_map.h>
 #include <qwt_scale_draw.h>
-#include <gruel/high_res_timer.h>
+#include <high_res_timer.h>
 
 class FreqOffsetAndPrecisionClass
 {
@@ -80,14 +80,14 @@ public:
   {    
   }
 
-  virtual gruel::high_res_timer_type getZeroTime() const
+  virtual gr::high_res_timer_type getZeroTime() const
   {
     return _zeroTime;
   }
   
-  virtual void setZeroTime(const gruel::high_res_timer_type newTime)
+  virtual void setZeroTime(const gr::high_res_timer_type newTime)
   {
-    _zeroTime = newTime - gruel::high_res_timer_epoch();
+    _zeroTime = newTime - gr::high_res_timer_epoch();
   }
 
   virtual void setSecondsPerLine(const double newTime)
@@ -104,7 +104,7 @@ public:
 protected:
   
 private:
-  gruel::high_res_timer_type _zeroTime;
+  gr::high_res_timer_type _zeroTime;
   double _secondsPerLine;
   
 };
diff --git a/gr-qtgui/include/qtgui/spectrumUpdateEvents.h b/gr-qtgui/include/qtgui/spectrumUpdateEvents.h
index 97d9c90146..df61f7fdb2 100644
--- a/gr-qtgui/include/qtgui/spectrumUpdateEvents.h
+++ b/gr-qtgui/include/qtgui/spectrumUpdateEvents.h
@@ -28,7 +28,7 @@
 #include <QString>
 #include <complex>
 #include <vector>
-#include <gruel/high_res_timer.h>
+#include <high_res_timer.h>
 
 static const int SpectrumUpdateEventType = 10005;
 static const int SpectrumWindowCaptionEventType = 10008;
@@ -43,10 +43,10 @@ public:
 		      const double* realTimeDomainPoints,
 		      const double* imagTimeDomainPoints,
 		      const uint64_t numTimeDomainDataPoints,
-		      const gruel::high_res_timer_type dataTimestamp,
+		      const gr::high_res_timer_type dataTimestamp,
 		      const bool repeatDataFlag,
 		      const bool lastOfMultipleUpdateFlag,
-		      const gruel::high_res_timer_type generatedTimestamp,
+		      const gr::high_res_timer_type generatedTimestamp,
 		      const int droppedFFTFrames);
 
   ~SpectrumUpdateEvent();
@@ -56,10 +56,10 @@ public:
   const double* getImagTimeDomainPoints() const;
   uint64_t getNumFFTDataPoints() const;
   uint64_t getNumTimeDomainDataPoints() const;
-  gruel::high_res_timer_type getDataTimestamp() const;
+  gr::high_res_timer_type getDataTimestamp() const;
   bool getRepeatDataFlag() const;
   bool getLastOfMultipleUpdateFlag() const;
-  gruel::high_res_timer_type getEventGeneratedTimestamp() const;
+  gr::high_res_timer_type getEventGeneratedTimestamp() const;
   int getDroppedFFTFrames() const;
 
 protected:
@@ -70,10 +70,10 @@ private:
   double* _imagDataTimeDomainPoints;
   uint64_t _numFFTDataPoints;
   uint64_t _numTimeDomainDataPoints;
-  gruel::high_res_timer_type _dataTimestamp;
+  gr::high_res_timer_type _dataTimestamp;
   bool _repeatDataFlag;
   bool _lastOfMultipleUpdateFlag;
-  gruel::high_res_timer_type _eventGeneratedTimestamp;
+  gr::high_res_timer_type _eventGeneratedTimestamp;
   int _droppedFFTFrames;
 };
 
@@ -209,7 +209,7 @@ class WaterfallUpdateEvent: public QEvent
 public:
   WaterfallUpdateEvent(const std::vector<double*> dataPoints,
 		       const uint64_t numDataPoints,
-		       const gruel::high_res_timer_type dataTimestamp);
+		       const gr::high_res_timer_type dataTimestamp);
 
   ~WaterfallUpdateEvent();
 
@@ -218,7 +218,7 @@ public:
   uint64_t getNumDataPoints() const;
   bool getRepeatDataFlag() const;
 
-  gruel::high_res_timer_type getDataTimestamp() const;
+  gr::high_res_timer_type getDataTimestamp() const;
 
   static QEvent::Type Type()
   { return QEvent::Type(SpectrumUpdateEventType); }
@@ -230,7 +230,7 @@ private:
   std::vector<double*> _dataPoints;
   uint64_t _numDataPoints;
 
-  gruel::high_res_timer_type _dataTimestamp;
+  gr::high_res_timer_type _dataTimestamp;
 };
 
 
diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt
index 7c60eb7018..7114c6c390 100644
--- a/gr-qtgui/lib/CMakeLists.txt
+++ b/gr-qtgui/lib/CMakeLists.txt
@@ -105,7 +105,6 @@ include_directories(
     ${GR_FFT_INCLUDE_DIRS}
     ${GR_FILTER_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${VOLK_INCLUDE_DIRS}
     ${QWT_INCLUDE_DIRS}
     ${QT_INCLUDE_DIRS}
diff --git a/gr-qtgui/lib/SpectrumGUIClass.cc b/gr-qtgui/lib/SpectrumGUIClass.cc
index 328eaa9b6f..020cd8218a 100644
--- a/gr-qtgui/lib/SpectrumGUIClass.cc
+++ b/gr-qtgui/lib/SpectrumGUIClass.cc
@@ -126,7 +126,7 @@ SpectrumGUIClass::openSpectrumWindow(QWidget* parent,
   _lastGUIUpdateTime = 0;
 
   // Draw Blank Display
-  updateWindow(false, NULL, 0, NULL, 0, NULL, 0, gruel::high_res_timer_now(), true);
+  updateWindow(false, NULL, 0, NULL, 0, NULL, 0, gr::high_res_timer_now(), true);
 
   // Set up the initial frequency axis settings
   setFrequencyRange(_centerFrequency, _startFrequency, _stopFrequency);
@@ -164,7 +164,7 @@ SpectrumGUIClass::setDisplayTitle(const std::string newString)
 bool
 SpectrumGUIClass::getWindowOpenFlag()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   bool returnFlag = false;
   returnFlag =  _windowOpennedFlag;
   return returnFlag;
@@ -174,7 +174,7 @@ SpectrumGUIClass::getWindowOpenFlag()
 void
 SpectrumGUIClass::setWindowOpenFlag(const bool newFlag)
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   _windowOpennedFlag = newFlag;
 }
 
@@ -183,7 +183,7 @@ SpectrumGUIClass::setFrequencyRange(const double centerFreq,
 				    const double startFreq,
 				    const double stopFreq)
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   _centerFrequency = centerFreq;
   _startFrequency = startFreq;
   _stopFrequency = stopFreq;
@@ -196,7 +196,7 @@ SpectrumGUIClass::setFrequencyRange(const double centerFreq,
 double
 SpectrumGUIClass::getStartFrequency()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   double returnValue = 0.0;
   returnValue =  _startFrequency;
   return returnValue;
@@ -205,7 +205,7 @@ SpectrumGUIClass::getStartFrequency()
 double
 SpectrumGUIClass::getStopFrequency()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   double returnValue = 0.0;
   returnValue =  _stopFrequency;
   return returnValue;
@@ -214,7 +214,7 @@ SpectrumGUIClass::getStopFrequency()
 double
 SpectrumGUIClass::getCenterFrequency()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   double returnValue = 0.0;
   returnValue =  _centerFrequency;
   return returnValue;
@@ -229,10 +229,10 @@ SpectrumGUIClass::updateWindow(const bool updateDisplayFlag,
 			       const uint64_t realTimeDomainDataSize,
 			       const float* complexTimeDomainData,
 			       const uint64_t complexTimeDomainDataSize,
-			       const gruel::high_res_timer_type timestamp,
+			       const gr::high_res_timer_type timestamp,
 			       const bool lastOfMultipleFFTUpdateFlag)
 {
-  //gruel::scoped_lock lock(d_mutex);
+  //gr::thread::scoped_lock lock(d_mutex);
   int64_t bufferSize = inputBufferSize;
   bool repeatDataFlag = false;
   if(bufferSize > _dataPoints){
@@ -279,10 +279,10 @@ SpectrumGUIClass::updateWindow(const bool updateDisplayFlag,
     _lastDataPointCount = bufferSize;
   }
 
-  const gruel::high_res_timer_type currentTime = gruel::high_res_timer_now();
-  const gruel::high_res_timer_type lastUpdateGUITime = getLastGUIUpdateTime();
+  const gr::high_res_timer_type currentTime = gr::high_res_timer_now();
+  const gr::high_res_timer_type lastUpdateGUITime = getLastGUIUpdateTime();
 
-  if((currentTime - lastUpdateGUITime > (4*_updateTime)*gruel::high_res_timer_tps()) &&
+  if((currentTime - lastUpdateGUITime > (4*_updateTime)*gr::high_res_timer_tps()) &&
      (getPendingGUIUpdateEvents() > 0) && lastUpdateGUITime != 0) {
     // Do not update the display if too much data is pending to be displayed
     _droppedEntriesCount++;
@@ -312,7 +312,7 @@ SpectrumGUIClass::updateWindow(const bool updateDisplayFlag,
 float
 SpectrumGUIClass::getPowerValue()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   float returnValue = 0;
   returnValue = _powerValue;
   return returnValue;
@@ -321,14 +321,14 @@ SpectrumGUIClass::getPowerValue()
 void
 SpectrumGUIClass::setPowerValue(const float value)
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   _powerValue = value;
 }
 
 int
 SpectrumGUIClass::getWindowType()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   int returnValue = 0;
   returnValue = _windowType;
   return returnValue;
@@ -337,7 +337,7 @@ SpectrumGUIClass::getWindowType()
 void
 SpectrumGUIClass::setWindowType(const int newType)
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   _windowType = newType;
 }
 
@@ -352,7 +352,7 @@ SpectrumGUIClass::getFFTSize()
 int
 SpectrumGUIClass::getFFTSizeIndex()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   int fftsize = getFFTSize();
   switch(fftsize) {
   case(1024): return 0; break;
@@ -368,30 +368,30 @@ SpectrumGUIClass::getFFTSizeIndex()
 void
 SpectrumGUIClass::setFFTSize(const int newSize)
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   _fftSize = newSize;
 }
 
-gruel::high_res_timer_type
+gr::high_res_timer_type
 SpectrumGUIClass::getLastGUIUpdateTime()
 {
-  gruel::scoped_lock lock(d_mutex);
-  gruel::high_res_timer_type returnValue;
+  gr::thread::scoped_lock lock(d_mutex);
+  gr::high_res_timer_type returnValue;
   returnValue = _lastGUIUpdateTime;
   return returnValue;
 }
 
 void
-SpectrumGUIClass::setLastGUIUpdateTime(const gruel::high_res_timer_type newTime)
+SpectrumGUIClass::setLastGUIUpdateTime(const gr::high_res_timer_type newTime)
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   _lastGUIUpdateTime = newTime;
 }
 
 unsigned int
 SpectrumGUIClass::getPendingGUIUpdateEvents()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   unsigned int returnValue = 0;
   returnValue = _pendingGUIUpdateEventsCount;
   return returnValue;
@@ -400,14 +400,14 @@ SpectrumGUIClass::getPendingGUIUpdateEvents()
 void
 SpectrumGUIClass::incrementPendingGUIUpdateEvents()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   _pendingGUIUpdateEventsCount++;
 }
 
 void
 SpectrumGUIClass::decrementPendingGUIUpdateEvents()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   if(_pendingGUIUpdateEventsCount > 0){
     _pendingGUIUpdateEventsCount--;
   }
@@ -416,7 +416,7 @@ SpectrumGUIClass::decrementPendingGUIUpdateEvents()
 void
 SpectrumGUIClass::resetPendingGUIUpdateEvents()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   _pendingGUIUpdateEventsCount = 0;
 }
 
@@ -424,14 +424,14 @@ SpectrumGUIClass::resetPendingGUIUpdateEvents()
 QWidget*
 SpectrumGUIClass::qwidget()
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   return (QWidget*)_spectrumDisplayForm;
 }
 
 void
 SpectrumGUIClass::setTimeDomainAxis(double min, double max)
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   _spectrumDisplayForm->setTimeDomainAxis(min, max);
 }
 
@@ -439,14 +439,14 @@ void
 SpectrumGUIClass::setConstellationAxis(double xmin, double xmax,
 				       double ymin, double ymax)
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   _spectrumDisplayForm->setConstellationAxis(xmin, xmax, ymin, ymax);
 }
 
 void
 SpectrumGUIClass::setConstellationPenSize(int size)
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   _spectrumDisplayForm->setConstellationPenSize(size);
 }
 
@@ -454,14 +454,14 @@ SpectrumGUIClass::setConstellationPenSize(int size)
 void
 SpectrumGUIClass::setFrequencyAxis(double min, double max)
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   _spectrumDisplayForm->setFrequencyAxis(min, max);
 }
 
 void
 SpectrumGUIClass::setUpdateTime(double t)
 {
-  gruel::scoped_lock lock(d_mutex);
+  gr::thread::scoped_lock lock(d_mutex);
   _updateTime = t;
   _spectrumDisplayForm->setUpdateTime(_updateTime);
 }
diff --git a/gr-qtgui/lib/WaterfallDisplayPlot.cc b/gr-qtgui/lib/WaterfallDisplayPlot.cc
index c1b8fd00c3..aa78000741 100644
--- a/gr-qtgui/lib/WaterfallDisplayPlot.cc
+++ b/gr-qtgui/lib/WaterfallDisplayPlot.cc
@@ -264,7 +264,7 @@ void
 WaterfallDisplayPlot::plotNewData(const std::vector<double*> dataPoints,
 				  const int64_t numDataPoints,
 				  const double timePerFFT,
-				  const gruel::high_res_timer_type timestamp,
+				  const gr::high_res_timer_type timestamp,
 				  const int droppedFrames)
 {
   if(!_stop) {
@@ -283,7 +283,7 @@ WaterfallDisplayPlot::plotNewData(const std::vector<double*> dataPoints,
 	  replot();
 	}
 
-	_lastReplot = gruel::high_res_timer_now();
+	_lastReplot = gr::high_res_timer_now();
       }
 
       for(int i = 0; i < _nplots; i++) {
@@ -312,7 +312,7 @@ void
 WaterfallDisplayPlot::plotNewData(const double* dataPoints,
 				  const int64_t numDataPoints,
 				  const double timePerFFT,
-				  const gruel::high_res_timer_type timestamp,
+				  const gr::high_res_timer_type timestamp,
 				  const int droppedFrames)
 {
   std::vector<double*> vecDataPoints;
@@ -569,7 +569,7 @@ WaterfallDisplayPlot::_updateIntensityRangeDisplay()
   replot();
 
   // Update the last replot timer
-  _lastReplot = gruel::high_res_timer_now();
+  _lastReplot = gr::high_res_timer_now();
 }
 
 #endif /* WATERFALL_DISPLAY_PLOT_C */
diff --git a/gr-qtgui/lib/const_sink_c_impl.cc b/gr-qtgui/lib/const_sink_c_impl.cc
index b623dc2175..9064be4ebe 100644
--- a/gr-qtgui/lib/const_sink_c_impl.cc
+++ b/gr-qtgui/lib/const_sink_c_impl.cc
@@ -145,7 +145,7 @@ namespace gr {
     const_sink_c_impl::set_update_time(double t)
     {
       //convert update time to ticks
-      gruel::high_res_timer_type tps = gruel::high_res_timer_tps();
+      gr::high_res_timer_type tps = gr::high_res_timer_tps();
       d_update_time = t * tps;
       d_main_gui->setUpdateTime(t);
       d_last_time = 0;
@@ -244,7 +244,7 @@ namespace gr {
     void
     const_sink_c_impl::set_nsamps(const int newsize)
     {
-      gruel::scoped_lock lock(d_mutex);
+      gr::thread::scoped_lock lock(d_mutex);
 
       if(newsize != d_size) {
 	// Resize residbuf and replace data
@@ -325,8 +325,8 @@ namespace gr {
 	  }
 
 	  // Update the plot if its time
-	  if(gruel::high_res_timer_now() - d_last_time > d_update_time) {
-	    d_last_time = gruel::high_res_timer_now();
+	  if(gr::high_res_timer_now() - d_last_time > d_update_time) {
+	    d_last_time = gr::high_res_timer_now();
 	    d_qApplication->postEvent(d_main_gui,
 				      new ConstUpdateEvent(d_residbufs_real,
 							   d_residbufs_imag,
diff --git a/gr-qtgui/lib/const_sink_c_impl.h b/gr-qtgui/lib/const_sink_c_impl.h
index b5b0858343..02b25409e6 100644
--- a/gr-qtgui/lib/const_sink_c_impl.h
+++ b/gr-qtgui/lib/const_sink_c_impl.h
@@ -24,8 +24,8 @@
 #define INCLUDED_QTGUI_CONST_SINK_C_IMPL_H
 
 #include <qtgui/const_sink_c.h>
-#include <gruel/high_res_timer.h>
-#include <gruel/thread.h>
+#include <high_res_timer.h>
+#include <thread/thread.h>
 #include <qtgui/constellationdisplayform.h>
 
 namespace gr {
@@ -36,7 +36,7 @@ namespace gr {
     private:
       void initialize();
 
-      gruel::mutex d_mutex;
+      gr::thread::mutex d_mutex;
 
       int d_size;
       std::string d_name;
@@ -49,8 +49,8 @@ namespace gr {
       QWidget *d_parent;
       ConstellationDisplayForm *d_main_gui;
 
-      gruel::high_res_timer_type d_update_time;
-      gruel::high_res_timer_type d_last_time;
+      gr::high_res_timer_type d_update_time;
+      gr::high_res_timer_type d_last_time;
 
       void npoints_resize();
 
diff --git a/gr-qtgui/lib/freq_sink_c_impl.cc b/gr-qtgui/lib/freq_sink_c_impl.cc
index b1f9a2b1a1..4508750457 100644
--- a/gr-qtgui/lib/freq_sink_c_impl.cc
+++ b/gr-qtgui/lib/freq_sink_c_impl.cc
@@ -208,7 +208,7 @@ namespace gr {
     freq_sink_c_impl::set_update_time(double t)
     {
       //convert update time to ticks
-      gruel::high_res_timer_type tps = gruel::high_res_timer_tps();
+      gr::high_res_timer_type tps = gr::high_res_timer_tps();
       d_update_time = t * tps;
       d_main_gui->setUpdateTime(t);
       d_last_time = 0;
@@ -376,7 +376,7 @@ namespace gr {
     void
     freq_sink_c_impl::fftresize()
     {
-      gruel::scoped_lock lock(d_mutex);
+      gr::thread::scoped_lock lock(d_mutex);
 
       int newfftsize = d_main_gui->getFFTSize();
       d_fftavg = d_main_gui->getFFTAverage();
@@ -443,8 +443,8 @@ namespace gr {
 	    //volk_32f_convert_64f_a(d_magbufs[n], d_fbuf, d_fftsize);
 	  }
       
-	  if(gruel::high_res_timer_now() - d_last_time > d_update_time) {
-	    d_last_time = gruel::high_res_timer_now();
+	  if(gr::high_res_timer_now() - d_last_time > d_update_time) {
+	    d_last_time = gr::high_res_timer_now();
 	    d_qApplication->postEvent(d_main_gui,
 				      new FreqUpdateEvent(d_magbufs, d_fftsize));
 	  }
diff --git a/gr-qtgui/lib/freq_sink_c_impl.h b/gr-qtgui/lib/freq_sink_c_impl.h
index e82f5c9ee7..ef17079567 100644
--- a/gr-qtgui/lib/freq_sink_c_impl.h
+++ b/gr-qtgui/lib/freq_sink_c_impl.h
@@ -26,8 +26,8 @@
 #include <qtgui/freq_sink_c.h>
 #include <filter/firdes.h>
 #include <fft/fft.h>
-#include <gruel/high_res_timer.h>
-#include <gruel/thread.h>
+#include <high_res_timer.h>
+#include <thread/thread.h>
 #include <qtgui/freqdisplayform.h>
 
 namespace gr {
@@ -40,7 +40,7 @@ namespace gr {
 
       void initialize();
 
-      gruel::mutex d_mutex;
+      gr::thread::mutex d_mutex;
 
       int d_fftsize;
       float d_fftavg;
@@ -62,8 +62,8 @@ namespace gr {
       QWidget *d_parent;
       FreqDisplayForm *d_main_gui;
 
-      gruel::high_res_timer_type d_update_time;
-      gruel::high_res_timer_type d_last_time;
+      gr::high_res_timer_type d_update_time;
+      gr::high_res_timer_type d_last_time;
 
       void windowreset();
       void buildwindow();
diff --git a/gr-qtgui/lib/freq_sink_f_impl.cc b/gr-qtgui/lib/freq_sink_f_impl.cc
index f357ae10be..6028c8ec4e 100644
--- a/gr-qtgui/lib/freq_sink_f_impl.cc
+++ b/gr-qtgui/lib/freq_sink_f_impl.cc
@@ -208,7 +208,7 @@ namespace gr {
     freq_sink_f_impl::set_update_time(double t)
     {
       //convert update time to ticks
-      gruel::high_res_timer_type tps = gruel::high_res_timer_tps();
+      gr::high_res_timer_type tps = gr::high_res_timer_tps();
       d_update_time = t * tps;
       d_main_gui->setUpdateTime(t);
       d_last_time = 0;
@@ -357,7 +357,7 @@ namespace gr {
     void
     freq_sink_f_impl::windowreset()
     {
-      gruel::scoped_lock lock(d_mutex);
+      gr::thread::scoped_lock lock(d_mutex);
 
       filter::firdes::win_type newwintype;
       newwintype = d_main_gui->getFFTWindowType();
@@ -379,7 +379,7 @@ namespace gr {
     void
     freq_sink_f_impl::fftresize()
     {
-      gruel::scoped_lock lock(d_mutex);
+      gr::thread::scoped_lock lock(d_mutex);
 
       int newfftsize = d_main_gui->getFFTSize();
       d_fftavg = d_main_gui->getFFTAverage();
@@ -446,8 +446,8 @@ namespace gr {
 	    //volk_32f_convert_64f_a(d_magbufs[n], d_fbuf, d_fftsize);
 	  }
       
-	  if(gruel::high_res_timer_now() - d_last_time > d_update_time) {
-	    d_last_time = gruel::high_res_timer_now();
+	  if(gr::high_res_timer_now() - d_last_time > d_update_time) {
+	    d_last_time = gr::high_res_timer_now();
 	    d_qApplication->postEvent(d_main_gui,
 				      new FreqUpdateEvent(d_magbufs, d_fftsize));
 	  }
diff --git a/gr-qtgui/lib/freq_sink_f_impl.h b/gr-qtgui/lib/freq_sink_f_impl.h
index d3d8851c88..6f4d9d2062 100644
--- a/gr-qtgui/lib/freq_sink_f_impl.h
+++ b/gr-qtgui/lib/freq_sink_f_impl.h
@@ -26,8 +26,8 @@
 #include <qtgui/freq_sink_f.h>
 #include <filter/firdes.h>
 #include <fft/fft.h>
-#include <gruel/high_res_timer.h>
-#include <gruel/thread.h>
+#include <high_res_timer.h>
+#include <thread/thread.h>
 #include <qtgui/freqdisplayform.h>
 
 namespace gr {
@@ -40,7 +40,7 @@ namespace gr {
 
       void initialize();
 
-      gruel::mutex d_mutex;
+      gr::thread::mutex d_mutex;
 
       int d_fftsize;
       float d_fftavg;
@@ -62,8 +62,8 @@ namespace gr {
       QWidget *d_parent;
       FreqDisplayForm *d_main_gui;
 
-      gruel::high_res_timer_type d_update_time;
-      gruel::high_res_timer_type d_last_time;
+      gr::high_res_timer_type d_update_time;
+      gr::high_res_timer_type d_last_time;
 
       void windowreset();
       void buildwindow();
diff --git a/gr-qtgui/lib/sink_c_impl.cc b/gr-qtgui/lib/sink_c_impl.cc
index a8a0526e77..aab5be54bf 100644
--- a/gr-qtgui/lib/sink_c_impl.cc
+++ b/gr-qtgui/lib/sink_c_impl.cc
@@ -137,7 +137,7 @@ namespace gr {
       // initialize update time to 10 times a second
       set_update_time(0.5);
 
-      d_last_update = gruel::high_res_timer_now();
+      d_last_update = gr::high_res_timer_now();
       d_update_active = false;
     }
 
@@ -215,7 +215,7 @@ namespace gr {
     void
     sink_c_impl::set_update_time(double t)
     {
-      d_update_time = t * gruel::high_res_timer_tps();
+      d_update_time = t * gr::high_res_timer_tps();
       d_main_gui->setUpdateTime(t);
     }
 
@@ -300,18 +300,18 @@ namespace gr {
 	unsigned int datasize = noutput_items - i;
 	unsigned int resid = d_fftsize-d_index;
 
-	if (!d_update_active && (gruel::high_res_timer_now() - d_last_update) < d_update_time) {
+	if (!d_update_active && (gr::high_res_timer_now() - d_last_update) < d_update_time) {
 	  consume_each(noutput_items);
 	  return noutput_items;
 	}
 	else {
-	  d_last_update = gruel::high_res_timer_now();
+	  d_last_update = gr::high_res_timer_now();
 	  d_update_active = true;
 	}
 
 	// If we have enough input for one full FFT, do it
 	if(datasize >= resid) {
-	  const gruel::high_res_timer_type currentTime = gruel::high_res_timer_now();
+	  const gr::high_res_timer_type currentTime = gr::high_res_timer_now();
 
 	  // Fill up residbuf with d_fftsize number of items
 	  memcpy(d_residbuf+d_index, &in[j], sizeof(gr_complex)*resid);
diff --git a/gr-qtgui/lib/sink_c_impl.h b/gr-qtgui/lib/sink_c_impl.h
index 83f542b426..77ddf79a0e 100644
--- a/gr-qtgui/lib/sink_c_impl.h
+++ b/gr-qtgui/lib/sink_c_impl.h
@@ -26,7 +26,7 @@
 #include <qtgui/sink_c.h>
 #include <filter/firdes.h>
 #include <fft/fft.h>
-#include <gruel/high_res_timer.h>
+#include <high_res_timer.h>
 #include <qtgui/SpectrumGUIClass.h>
 
 namespace gr {
@@ -45,7 +45,7 @@ namespace gr {
       double d_center_freq;
       double d_bandwidth;
       std::string d_name;
-      gruel::high_res_timer_type  d_last_update;
+      gr::high_res_timer_type  d_last_update;
       bool d_update_active;
 
       bool d_shift;
@@ -57,7 +57,7 @@ namespace gr {
 
       bool d_plotfreq, d_plotwaterfall, d_plottime, d_plotconst;
 
-      gruel::high_res_timer_type d_update_time;
+      gr::high_res_timer_type d_update_time;
 
       QWidget *d_parent;
       SpectrumGUIClass *d_main_gui;
diff --git a/gr-qtgui/lib/sink_f_impl.cc b/gr-qtgui/lib/sink_f_impl.cc
index 5cb14db672..1fb2bbdbb7 100644
--- a/gr-qtgui/lib/sink_f_impl.cc
+++ b/gr-qtgui/lib/sink_f_impl.cc
@@ -297,7 +297,7 @@ namespace gr {
 
 	// If we have enough input for one full FFT, do it
 	if(datasize >= resid) {
-	  const gruel::high_res_timer_type currentTime = gruel::high_res_timer_now();
+	  const gr::high_res_timer_type currentTime = gr::high_res_timer_now();
 
 	  // Fill up residbuf with d_fftsize number of items
 	  memcpy(d_residbuf+d_index, &in[j], sizeof(float)*resid);
diff --git a/gr-qtgui/lib/sink_f_impl.h b/gr-qtgui/lib/sink_f_impl.h
index 33dab713f6..24dff8d6b3 100644
--- a/gr-qtgui/lib/sink_f_impl.h
+++ b/gr-qtgui/lib/sink_f_impl.h
@@ -26,7 +26,7 @@
 #include <qtgui/sink_f.h>
 #include <filter/firdes.h>
 #include <fft/fft.h>
-#include <gruel/high_res_timer.h>
+#include <high_res_timer.h>
 #include <qtgui/SpectrumGUIClass.h>
 
 namespace gr {
diff --git a/gr-qtgui/lib/spectrumUpdateEvents.cc b/gr-qtgui/lib/spectrumUpdateEvents.cc
index 82b195d692..21b1f4d6d9 100644
--- a/gr-qtgui/lib/spectrumUpdateEvents.cc
+++ b/gr-qtgui/lib/spectrumUpdateEvents.cc
@@ -30,10 +30,10 @@ SpectrumUpdateEvent::SpectrumUpdateEvent(const float* fftPoints,
 					 const double* realTimeDomainPoints,
 					 const double* imagTimeDomainPoints,
 					 const uint64_t numTimeDomainDataPoints,
-					 const gruel::high_res_timer_type dataTimestamp,
+					 const gr::high_res_timer_type dataTimestamp,
 					 const bool repeatDataFlag,
 					 const bool lastOfMultipleUpdateFlag,
-					 const gruel::high_res_timer_type generatedTimestamp,
+					 const gr::high_res_timer_type generatedTimestamp,
 					 const int droppedFFTFrames)
   : QEvent(QEvent::Type(SpectrumUpdateEventType))
 {
@@ -112,7 +112,7 @@ SpectrumUpdateEvent::getNumTimeDomainDataPoints() const
   return _numTimeDomainDataPoints;
 }
 
-gruel::high_res_timer_type
+gr::high_res_timer_type
 SpectrumUpdateEvent::getDataTimestamp() const
 {
   return _dataTimestamp;
@@ -130,7 +130,7 @@ SpectrumUpdateEvent::getLastOfMultipleUpdateFlag() const
   return _lastOfMultipleUpdateFlag;
 }
 
-gruel::high_res_timer_type
+gr::high_res_timer_type
 SpectrumUpdateEvent::getEventGeneratedTimestamp() const
 {
   return _eventGeneratedTimestamp;
@@ -348,7 +348,7 @@ ConstUpdateEvent::getNumDataPoints() const
 
 WaterfallUpdateEvent::WaterfallUpdateEvent(const std::vector<double*> dataPoints,
 					   const uint64_t numDataPoints,
-					   const gruel::high_res_timer_type dataTimestamp)
+					   const gr::high_res_timer_type dataTimestamp)
   : QEvent(QEvent::Type(SpectrumUpdateEventType))
 {
   if(numDataPoints < 1) {
@@ -389,7 +389,7 @@ WaterfallUpdateEvent::getNumDataPoints() const
   return _numDataPoints;
 }
 
-gruel::high_res_timer_type
+gr::high_res_timer_type
 WaterfallUpdateEvent::getDataTimestamp() const
 {
   return _dataTimestamp;
diff --git a/gr-qtgui/lib/spectrumdisplayform.cc b/gr-qtgui/lib/spectrumdisplayform.cc
index e4ee028668..24f15886ba 100644
--- a/gr-qtgui/lib/spectrumdisplayform.cc
+++ b/gr-qtgui/lib/spectrumdisplayform.cc
@@ -192,10 +192,10 @@ SpectrumDisplayForm::newFrequencyData( const SpectrumUpdateEvent* spectrumUpdate
   const float* fftMagDataPoints = spectrumUpdateEvent->getFFTPoints();
   const uint64_t numFFTDataPoints = spectrumUpdateEvent->getNumFFTDataPoints();
   const uint64_t numTimeDomainDataPoints = spectrumUpdateEvent->getNumTimeDomainDataPoints();
-  const gruel::high_res_timer_type dataTimestamp = spectrumUpdateEvent->getDataTimestamp();
+  const gr::high_res_timer_type dataTimestamp = spectrumUpdateEvent->getDataTimestamp();
   const bool repeatDataFlag = spectrumUpdateEvent->getRepeatDataFlag();
   const bool lastOfMultipleUpdatesFlag = spectrumUpdateEvent->getLastOfMultipleUpdateFlag();
-  const gruel::high_res_timer_type generatedTimestamp = spectrumUpdateEvent->getEventGeneratedTimestamp();
+  const gr::high_res_timer_type generatedTimestamp = spectrumUpdateEvent->getEventGeneratedTimestamp();
   double* realTimeDomainDataPoints = (double*)spectrumUpdateEvent->getRealTimeDomainPoints();
   double* imagTimeDomainDataPoints = (double*)spectrumUpdateEvent->getImagTimeDomainPoints();
 
diff --git a/gr-qtgui/lib/time_raster_sink_b_impl.cc b/gr-qtgui/lib/time_raster_sink_b_impl.cc
index d90661b968..6ec6c6075b 100644
--- a/gr-qtgui/lib/time_raster_sink_b_impl.cc
+++ b/gr-qtgui/lib/time_raster_sink_b_impl.cc
@@ -153,7 +153,7 @@ namespace gr {
     time_raster_sink_b_impl::set_update_time(double t)
     {
       //convert update time to ticks
-      gruel::high_res_timer_type tps = gruel::high_res_timer_tps();
+      gr::high_res_timer_type tps = gr::high_res_timer_tps();
       d_update_time = t * tps;
       d_main_gui->setUpdateTime(t);
       d_last_time = 0;
@@ -404,8 +404,8 @@ namespace gr {
 				   d_tmpflt, resid);
 	  }
       
-	  if(gruel::high_res_timer_now() - d_last_time > d_update_time) {
-	    d_last_time = gruel::high_res_timer_now();
+	  if(gr::high_res_timer_now() - d_last_time > d_update_time) {
+	    d_last_time = gr::high_res_timer_now();
 	    d_qApplication->postEvent(d_main_gui,
 				      new TimeRasterUpdateEvent(d_residbufs, d_icols));
 	  }
diff --git a/gr-qtgui/lib/time_raster_sink_b_impl.h b/gr-qtgui/lib/time_raster_sink_b_impl.h
index 93d8819fdb..09c471fcfc 100644
--- a/gr-qtgui/lib/time_raster_sink_b_impl.h
+++ b/gr-qtgui/lib/time_raster_sink_b_impl.h
@@ -26,8 +26,8 @@
 #include <qtgui/time_raster_sink_b.h>
 #include <filter/firdes.h>
 #include <fft/fft.h>
-#include <gruel/high_res_timer.h>
-#include <gruel/thread.h>
+#include <high_res_timer.h>
+#include <thread/thread.h>
 #include <qtgui/timerasterdisplayform.h>
 
 namespace gr {
@@ -56,8 +56,8 @@ namespace gr {
       std::vector<float> d_offset;
       double d_samp_rate;
 
-      gruel::high_res_timer_type d_update_time;
-      gruel::high_res_timer_type d_last_time;
+      gr::high_res_timer_type d_update_time;
+      gr::high_res_timer_type d_last_time;
 
     public:
       time_raster_sink_b_impl(double samp_rate,
diff --git a/gr-qtgui/lib/time_raster_sink_c_impl.cc b/gr-qtgui/lib/time_raster_sink_c_impl.cc
index 17098f0d93..1c71258030 100644
--- a/gr-qtgui/lib/time_raster_sink_c_impl.cc
+++ b/gr-qtgui/lib/time_raster_sink_c_impl.cc
@@ -126,7 +126,7 @@ namespace gr {
     time_raster_sink_c_impl::set_update_time(double t)
     {
       //convert update time to ticks
-      gruel::high_res_timer_type tps = gruel::high_res_timer_tps();
+      gr::high_res_timer_type tps = gr::high_res_timer_tps();
       d_update_time = t * tps;
       d_main_gui->setUpdateTime(t);
     }
@@ -193,8 +193,8 @@ namespace gr {
 	    memcpy(d_residbufs[n]+d_index, &in[j], sizeof(gr_complex)*resid);
 	  }
       
-	  if(gruel::high_res_timer_now() - d_last_time > d_update_time) {
-	    d_last_time = gruel::high_res_timer_now();
+	  if(gr::high_res_timer_now() - d_last_time > d_update_time) {
+	    d_last_time = gr::high_res_timer_now();
 	    d_qApplication->postEvent(d_main_gui,
 				      new TimeRasterUpdateEvent(d_residbufs,
 								d_fftsize,
diff --git a/gr-qtgui/lib/time_raster_sink_c_impl.h b/gr-qtgui/lib/time_raster_sink_c_impl.h
index 0e95733853..9f8a463bf8 100644
--- a/gr-qtgui/lib/time_raster_sink_c_impl.h
+++ b/gr-qtgui/lib/time_raster_sink_c_impl.h
@@ -26,8 +26,8 @@
 #include <qtgui/time_raster_sink_c.h>
 #include <filter/firdes.h>
 #include <fft/fft.h>
-#include <gruel/high_res_timer.h>
-#include <gruel/thread.h>
+#include <high_res_timer.h>
+#include <thread/thread.h>
 #include <qtgui/time_rasterdisplayform.h>
 
 namespace gr {
@@ -52,8 +52,8 @@ namespace gr {
 
       unsigned int d_rows, d_cols;
 
-      gruel::high_res_timer_type d_update_time;
-      gruel::high_res_timer_type d_last_time;
+      gr::high_res_timer_type d_update_time;
+      gr::high_res_timer_type d_last_time;
 
     public:
       time_raster_sink_c_impl(unsignedint rows,
diff --git a/gr-qtgui/lib/time_raster_sink_f_impl.cc b/gr-qtgui/lib/time_raster_sink_f_impl.cc
index 39237e2912..b6b0a1fc7d 100644
--- a/gr-qtgui/lib/time_raster_sink_f_impl.cc
+++ b/gr-qtgui/lib/time_raster_sink_f_impl.cc
@@ -151,7 +151,7 @@ namespace gr {
     time_raster_sink_f_impl::set_update_time(double t)
     {
       //convert update time to ticks
-      gruel::high_res_timer_type tps = gruel::high_res_timer_tps();
+      gr::high_res_timer_type tps = gr::high_res_timer_tps();
       d_update_time = t * tps;
       d_main_gui->setUpdateTime(t);
       d_last_time = 0;
@@ -401,8 +401,8 @@ namespace gr {
 	  }
       
 	  // Update the plot if its time
-	  if(gruel::high_res_timer_now() - d_last_time > d_update_time) {
-	    d_last_time = gruel::high_res_timer_now();
+	  if(gr::high_res_timer_now() - d_last_time > d_update_time) {
+	    d_last_time = gr::high_res_timer_now();
 	    d_qApplication->postEvent(d_main_gui,
 				      new TimeRasterUpdateEvent(d_residbufs, d_cols));
 	  }
diff --git a/gr-qtgui/lib/time_raster_sink_f_impl.h b/gr-qtgui/lib/time_raster_sink_f_impl.h
index fcaab8126a..fad731570c 100644
--- a/gr-qtgui/lib/time_raster_sink_f_impl.h
+++ b/gr-qtgui/lib/time_raster_sink_f_impl.h
@@ -26,8 +26,8 @@
 #include <qtgui/time_raster_sink_f.h>
 #include <filter/firdes.h>
 #include <fft/fft.h>
-#include <gruel/high_res_timer.h>
-#include <gruel/thread.h>
+#include <high_res_timer.h>
+#include <thread/thread.h>
 #include <qtgui/timerasterdisplayform.h>
 
 namespace gr {
@@ -55,8 +55,8 @@ namespace gr {
       std::vector<float> d_offset;
       double d_samp_rate;
 
-      gruel::high_res_timer_type d_update_time;
-      gruel::high_res_timer_type d_last_time;
+      gr::high_res_timer_type d_update_time;
+      gr::high_res_timer_type d_last_time;
 
     public:
       time_raster_sink_f_impl(double samp_rate,
diff --git a/gr-qtgui/lib/time_sink_c_impl.cc b/gr-qtgui/lib/time_sink_c_impl.cc
index 2edb83fa12..f8ff758218 100644
--- a/gr-qtgui/lib/time_sink_c_impl.cc
+++ b/gr-qtgui/lib/time_sink_c_impl.cc
@@ -138,7 +138,7 @@ namespace gr {
     time_sink_c_impl::set_update_time(double t)
     {
       //convert update time to ticks
-      gruel::high_res_timer_type tps = gruel::high_res_timer_tps();
+      gr::high_res_timer_type tps = gr::high_res_timer_tps();
       d_update_time = t * tps;
       d_main_gui->setUpdateTime(t);
       d_last_time = 0;
@@ -237,7 +237,7 @@ namespace gr {
     void
     time_sink_c_impl::set_nsamps(const int newsize)
     {
-      gruel::scoped_lock lock(d_mutex);
+      gr::thread::scoped_lock lock(d_mutex);
 
       if(newsize != d_size) {
 	// Resize residbuf and replace data
@@ -260,7 +260,7 @@ namespace gr {
     void
     time_sink_c_impl::set_samp_rate(const double samp_rate)
     {
-      gruel::scoped_lock lock(d_mutex);
+      gr::thread::scoped_lock lock(d_mutex);
       d_samp_rate = samp_rate;
       d_main_gui->setSampleRate(d_samp_rate);
     }
@@ -347,8 +347,8 @@ namespace gr {
 	  }
 
 	  // Update the plot if its time
-	  if(gruel::high_res_timer_now() - d_last_time > d_update_time) {
-	    d_last_time = gruel::high_res_timer_now();
+	  if(gr::high_res_timer_now() - d_last_time > d_update_time) {
+	    d_last_time = gr::high_res_timer_now();
 	    d_qApplication->postEvent(d_main_gui,
 				      new TimeUpdateEvent(d_residbufs, d_size));
 	  }
diff --git a/gr-qtgui/lib/time_sink_c_impl.h b/gr-qtgui/lib/time_sink_c_impl.h
index 5a52a91316..2f9765c2c5 100644
--- a/gr-qtgui/lib/time_sink_c_impl.h
+++ b/gr-qtgui/lib/time_sink_c_impl.h
@@ -25,8 +25,8 @@
 
 #include <qtgui/time_sink_c.h>
 #include <qtgui/timedisplayform.h>
-#include <gruel/thread.h>
-#include <gruel/high_res_timer.h>
+#include <thread/thread.h>
+#include <high_res_timer.h>
 
 namespace gr {
   namespace qtgui {
@@ -36,7 +36,7 @@ namespace gr {
     private:
       void initialize();
 
-      gruel::mutex d_mutex;
+      gr::thread::mutex d_mutex;
 
       int d_size;
       double d_samp_rate;
@@ -49,8 +49,8 @@ namespace gr {
       QWidget *d_parent;
       TimeDisplayForm *d_main_gui;
 
-      gruel::high_res_timer_type d_update_time;
-      gruel::high_res_timer_type d_last_time;
+      gr::high_res_timer_type d_update_time;
+      gr::high_res_timer_type d_last_time;
 
       void npoints_resize();
 
diff --git a/gr-qtgui/lib/time_sink_f_impl.cc b/gr-qtgui/lib/time_sink_f_impl.cc
index 39a62d3d6b..6011751b2b 100644
--- a/gr-qtgui/lib/time_sink_f_impl.cc
+++ b/gr-qtgui/lib/time_sink_f_impl.cc
@@ -138,7 +138,7 @@ namespace gr {
     time_sink_f_impl::set_update_time(double t)
     {
       //convert update time to ticks
-      gruel::high_res_timer_type tps = gruel::high_res_timer_tps();
+      gr::high_res_timer_type tps = gr::high_res_timer_tps();
       d_update_time = t * tps;
       d_main_gui->setUpdateTime(t);
       d_last_time = 0;
@@ -237,7 +237,7 @@ namespace gr {
     void
     time_sink_f_impl::set_nsamps(const int newsize)
     {
-      gruel::scoped_lock lock(d_mutex);
+      gr::thread::scoped_lock lock(d_mutex);
 
       if(newsize != d_size) {
 	// Resize residbuf and replace data
@@ -260,7 +260,7 @@ namespace gr {
     void
     time_sink_f_impl::set_samp_rate(const double samp_rate)
     {
-      gruel::scoped_lock lock(d_mutex);
+      gr::thread::scoped_lock lock(d_mutex);
       d_samp_rate = samp_rate;
       d_main_gui->setSampleRate(d_samp_rate);
     }
@@ -346,8 +346,8 @@ namespace gr {
 	  }
 
 	  // Update the plot if its time
-	  if(gruel::high_res_timer_now() - d_last_time > d_update_time) {
-	    d_last_time = gruel::high_res_timer_now();
+	  if(gr::high_res_timer_now() - d_last_time > d_update_time) {
+	    d_last_time = gr::high_res_timer_now();
 	    d_qApplication->postEvent(d_main_gui,
 				      new TimeUpdateEvent(d_residbufs, d_size));
 	  }
diff --git a/gr-qtgui/lib/time_sink_f_impl.h b/gr-qtgui/lib/time_sink_f_impl.h
index 3d4f6417a6..1012ffbd77 100644
--- a/gr-qtgui/lib/time_sink_f_impl.h
+++ b/gr-qtgui/lib/time_sink_f_impl.h
@@ -25,8 +25,8 @@
 
 #include <qtgui/time_sink_f.h>
 #include <qtgui/timedisplayform.h>
-#include <gruel/thread.h>
-#include <gruel/high_res_timer.h>
+#include <thread/thread.h>
+#include <high_res_timer.h>
 
 namespace gr {
   namespace qtgui {
@@ -36,7 +36,7 @@ namespace gr {
     private:
       void initialize();
 
-      gruel::mutex d_mutex;
+      gr::thread::mutex d_mutex;
 
       int d_size;
       double d_samp_rate;
@@ -49,8 +49,8 @@ namespace gr {
       QWidget *d_parent;
       TimeDisplayForm *d_main_gui;
 
-      gruel::high_res_timer_type d_update_time;
-      gruel::high_res_timer_type d_last_time;
+      gr::high_res_timer_type d_update_time;
+      gr::high_res_timer_type d_last_time;
 
       void npoints_resize();
 
diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.cc b/gr-qtgui/lib/waterfall_sink_c_impl.cc
index 72908b51b9..817a5a126e 100644
--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc
@@ -214,7 +214,7 @@ namespace gr {
     waterfall_sink_c_impl::set_update_time(double t)
     {
       //convert update time to ticks
-      gruel::high_res_timer_type tps = gruel::high_res_timer_tps();
+      gr::high_res_timer_type tps = gr::high_res_timer_tps();
       d_update_time = t * tps;
       d_main_gui->setUpdateTime(t);
       d_last_time = 0;
@@ -417,8 +417,8 @@ namespace gr {
 	    //volk_32f_convert_64f_a(d_magbufs[n], d_fbuf, d_fftsize);
 	  }
       
-	  if(gruel::high_res_timer_now() - d_last_time > d_update_time) {
-	    d_last_time = gruel::high_res_timer_now();
+	  if(gr::high_res_timer_now() - d_last_time > d_update_time) {
+	    d_last_time = gr::high_res_timer_now();
 	    d_qApplication->postEvent(d_main_gui,
 				      new WaterfallUpdateEvent(d_magbufs,
 							       d_fftsize,
diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.h b/gr-qtgui/lib/waterfall_sink_c_impl.h
index d9a90875af..7483989c00 100644
--- a/gr-qtgui/lib/waterfall_sink_c_impl.h
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.h
@@ -26,8 +26,8 @@
 #include <qtgui/waterfall_sink_c.h>
 #include <filter/firdes.h>
 #include <fft/fft.h>
-#include <gruel/high_res_timer.h>
-#include <gruel/thread.h>
+#include <high_res_timer.h>
+#include <thread/thread.h>
 #include <qtgui/waterfalldisplayform.h>
 
 namespace gr {
@@ -60,8 +60,8 @@ namespace gr {
       QWidget *d_parent;
       WaterfallDisplayForm *d_main_gui;
 
-      gruel::high_res_timer_type d_update_time;
-      gruel::high_res_timer_type d_last_time;
+      gr::high_res_timer_type d_update_time;
+      gr::high_res_timer_type d_last_time;
 
       void windowreset();
       void buildwindow();
diff --git a/gr-qtgui/lib/waterfall_sink_f_impl.cc b/gr-qtgui/lib/waterfall_sink_f_impl.cc
index bdf1159e5a..aad2ffe5c7 100644
--- a/gr-qtgui/lib/waterfall_sink_f_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc
@@ -213,7 +213,7 @@ namespace gr {
     waterfall_sink_f_impl::set_update_time(double t)
     {
       //convert update time to ticks
-      gruel::high_res_timer_type tps = gruel::high_res_timer_tps();
+      gr::high_res_timer_type tps = gr::high_res_timer_tps();
       d_update_time = t * tps;
       d_main_gui->setUpdateTime(t);
       d_last_time = 0;
@@ -418,8 +418,8 @@ namespace gr {
 	    //volk_32f_convert_64f_a(d_magbufs[n], d_fbuf, d_fftsize);
 	  }
       
-	  if(gruel::high_res_timer_now() - d_last_time > d_update_time) {
-	    d_last_time = gruel::high_res_timer_now();
+	  if(gr::high_res_timer_now() - d_last_time > d_update_time) {
+	    d_last_time = gr::high_res_timer_now();
 	    d_qApplication->postEvent(d_main_gui,
 				      new WaterfallUpdateEvent(d_magbufs,
 							       d_fftsize,
diff --git a/gr-qtgui/lib/waterfall_sink_f_impl.h b/gr-qtgui/lib/waterfall_sink_f_impl.h
index c204ef1509..02556fd9d6 100644
--- a/gr-qtgui/lib/waterfall_sink_f_impl.h
+++ b/gr-qtgui/lib/waterfall_sink_f_impl.h
@@ -26,8 +26,8 @@
 #include <qtgui/waterfall_sink_f.h>
 #include <filter/firdes.h>
 #include <fft/fft.h>
-#include <gruel/high_res_timer.h>
-#include <gruel/thread.h>
+#include <high_res_timer.h>
+#include <thread/thread.h>
 #include <qtgui/waterfalldisplayform.h>
 
 namespace gr {
@@ -60,8 +60,8 @@ namespace gr {
       QWidget *d_parent;
       WaterfallDisplayForm *d_main_gui;
 
-      gruel::high_res_timer_type d_update_time;
-      gruel::high_res_timer_type d_last_time;
+      gr::high_res_timer_type d_update_time;
+      gr::high_res_timer_type d_last_time;
 
       void windowreset();
       void buildwindow();
diff --git a/gr-qtgui/lib/waterfalldisplayform.cc b/gr-qtgui/lib/waterfalldisplayform.cc
index 23b2a486bb..fb5df230c2 100644
--- a/gr-qtgui/lib/waterfalldisplayform.cc
+++ b/gr-qtgui/lib/waterfalldisplayform.cc
@@ -115,7 +115,7 @@ WaterfallDisplayForm::newData(const QEvent *updateEvent)
   WaterfallUpdateEvent *event = (WaterfallUpdateEvent*)updateEvent;
   const std::vector<double*> dataPoints = event->getPoints();
   const uint64_t numDataPoints = event->getNumDataPoints();
-  const gruel::high_res_timer_type dataTimestamp = event->getDataTimestamp();
+  const gr::high_res_timer_type dataTimestamp = event->getDataTimestamp();
 
   _min_val =  1000;
   _max_val = -1000;
diff --git a/gr-qtgui/swig/CMakeLists.txt b/gr-qtgui/swig/CMakeLists.txt
index 7232d05a8f..66d4d643c0 100644
--- a/gr-qtgui/swig/CMakeLists.txt
+++ b/gr-qtgui/swig/CMakeLists.txt
@@ -28,7 +28,6 @@ set(GR_SWIG_INCLUDE_DIRS
     ${GR_FFT_INCLUDE_DIRS}
     ${GR_FILTER_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${QWT_INCLUDE_DIRS}
     ${QT_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
diff --git a/gr-shd/lib/CMakeLists.txt b/gr-shd/lib/CMakeLists.txt
index e71efd0ea0..63db4acc80 100644
--- a/gr-shd/lib/CMakeLists.txt
+++ b/gr-shd/lib/CMakeLists.txt
@@ -23,7 +23,6 @@
 include_directories(
     ${GR_SHD_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${SHD_INCLUDE_DIRS}
 }
diff --git a/gr-shd/swig/CMakeLists.txt b/gr-shd/swig/CMakeLists.txt
index eb33845f96..57e9afdacf 100644
--- a/gr-shd/swig/CMakeLists.txt
+++ b/gr-shd/swig/CMakeLists.txt
@@ -28,7 +28,6 @@ set(GR_SWIG_FLAGS -DGR_HAVE_SHD) #needed to parse shd_swig.i
 set(GR_SWIG_INCLUDE_DIRS
     ${GR_SHD_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${SHD_INCLUDE_DIRS}
 )
diff --git a/gr-trellis/include/trellis/api.h b/gr-trellis/include/trellis/api.h
index c09b340d6d..8b85addd96 100644
--- a/gr-trellis/include/trellis/api.h
+++ b/gr-trellis/include/trellis/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_TRELLIS_API_H
 #define INCLUDED_TRELLIS_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_trellis_EXPORTS
 #  define TRELLIS_API __GR_ATTR_EXPORT
diff --git a/gr-trellis/lib/CMakeLists.txt b/gr-trellis/lib/CMakeLists.txt
index 099db57734..fc08dbf7af 100644
--- a/gr-trellis/lib/CMakeLists.txt
+++ b/gr-trellis/lib/CMakeLists.txt
@@ -25,7 +25,6 @@ include_directories(
     ${GR_TRELLIS_INCLUDE_DIRS}
     ${GR_DIGITAL_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${LOG4CXX_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
diff --git a/gr-trellis/src/lib/CMakeLists.txt b/gr-trellis/src/lib/CMakeLists.txt
index c20f4df101..07d0851105 100644
--- a/gr-trellis/src/lib/CMakeLists.txt
+++ b/gr-trellis/src/lib/CMakeLists.txt
@@ -26,7 +26,6 @@ include_directories(
     ${GR_TRELLIS_INCLUDE_DIRS}
     ${GR_DIGITAL_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-trellis/swig/CMakeLists.txt b/gr-trellis/swig/CMakeLists.txt
index 8e15fc8858..240e93ce48 100644
--- a/gr-trellis/swig/CMakeLists.txt
+++ b/gr-trellis/swig/CMakeLists.txt
@@ -27,7 +27,6 @@ set(GR_SWIG_INCLUDE_DIRS
     ${GR_TRELLIS_INCLUDE_DIRS}
     ${GR_DIGITAL_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-uhd/examples/c++/CMakeLists.txt b/gr-uhd/examples/c++/CMakeLists.txt
index aa50c589fc..655ef0c0a9 100644
--- a/gr-uhd/examples/c++/CMakeLists.txt
+++ b/gr-uhd/examples/c++/CMakeLists.txt
@@ -24,7 +24,6 @@ include_directories(
     ${CMAKE_CURRENT_SOURCE_DIR}
     ${GR_UHD_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${UHD_INCLUDE_DIRS}
 )
diff --git a/gr-uhd/lib/CMakeLists.txt b/gr-uhd/lib/CMakeLists.txt
index fe95fcb7ef..9121dd41b8 100644
--- a/gr-uhd/lib/CMakeLists.txt
+++ b/gr-uhd/lib/CMakeLists.txt
@@ -24,7 +24,6 @@ include_directories(
     ${CMAKE_CURRENT_BINARY_DIR}
     ${GR_UHD_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${LOG4CXX_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${UHD_INCLUDE_DIRS}
diff --git a/gr-uhd/lib/amsg_source_impl.cc b/gr-uhd/lib/amsg_source_impl.cc
index 76603e4989..cf344db202 100644
--- a/gr-uhd/lib/amsg_source_impl.cc
+++ b/gr-uhd/lib/amsg_source_impl.cc
@@ -48,7 +48,7 @@ namespace gr {
     {
       _dev = ::uhd::usrp::multi_usrp::make(device_addr);
       _amsg_thread =
-        gruel::thread(boost::bind(&amsg_source_impl::recv_loop, this));
+        gr::thread::thread(boost::bind(&amsg_source_impl::recv_loop, this));
     }
 
     amsg_source_impl::~amsg_source_impl()
diff --git a/gr-uhd/lib/amsg_source_impl.h b/gr-uhd/lib/amsg_source_impl.h
index 2928e85adb..f0f3d4bfb1 100644
--- a/gr-uhd/lib/amsg_source_impl.h
+++ b/gr-uhd/lib/amsg_source_impl.h
@@ -21,7 +21,7 @@
  */
 
 #include <uhd/amsg_source.h>
-#include <gruel/thread.h>
+#include <thread/thread.h>
 
 namespace gr {
   namespace uhd {
@@ -38,7 +38,7 @@ namespace gr {
 
     protected:
       ::uhd::usrp::multi_usrp::sptr _dev;
-      gruel::thread _amsg_thread;
+      gr::thread::thread _amsg_thread;
       gr_msg_queue_sptr _msgq;
       bool _running;
     };
diff --git a/gr-uhd/swig/CMakeLists.txt b/gr-uhd/swig/CMakeLists.txt
index 5f25bb87fd..702613adcc 100644
--- a/gr-uhd/swig/CMakeLists.txt
+++ b/gr-uhd/swig/CMakeLists.txt
@@ -28,7 +28,6 @@ set(GR_SWIG_FLAGS -DGR_HAVE_UHD) #needed to parse uhd_swig.i
 set(GR_SWIG_INCLUDE_DIRS
     ${GR_UHD_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${UHD_INCLUDE_DIRS}
 )
diff --git a/gr-utils/python/gr_read_file_metadata b/gr-utils/python/gr_read_file_metadata
index 3bc448b04e..4373cd054b 100644
--- a/gr-utils/python/gr_read_file_metadata
+++ b/gr-utils/python/gr_read_file_metadata
@@ -23,7 +23,7 @@
 import sys
 from optparse import OptionParser
 
-from gruel import pmt
+import pmt
 from gnuradio.blocks import parse_file_metadata
 
 def main(filename, detached=False):
diff --git a/gr-utils/python/modtool/gr-newmod/CMakeLists.txt b/gr-utils/python/modtool/gr-newmod/CMakeLists.txt
index 1f32ef168e..f68db5c475 100644
--- a/gr-utils/python/modtool/gr-newmod/CMakeLists.txt
+++ b/gr-utils/python/modtool/gr-newmod/CMakeLists.txt
@@ -87,10 +87,6 @@ find_package(Gruel)
 find_package(GnuradioRuntime)
 find_package(CppUnit)
 
-if(NOT GRUEL_FOUND)
-    message(FATAL_ERROR "Gruel required to compile howto")
-endif()
-
 if(NOT GNURADIO_RUNTIME_FOUND)
     message(FATAL_ERROR "GnuRadio Runtime required to compile howto")
 endif()
diff --git a/gr-utils/python/modtool/gr-newmod/include/howto/api.h b/gr-utils/python/modtool/gr-newmod/include/howto/api.h
index 5263a1cf70..0c20712786 100644
--- a/gr-utils/python/modtool/gr-newmod/include/howto/api.h
+++ b/gr-utils/python/modtool/gr-newmod/include/howto/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_HOWTO_API_H
 #define INCLUDED_HOWTO_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_howto_EXPORTS
 #  define HOWTO_API __GR_ATTR_EXPORT
diff --git a/gr-utils/python/modtool/gr-newmod/lib/qa_howto.h b/gr-utils/python/modtool/gr-newmod/lib/qa_howto.h
index 8eff956b61..069afd38ae 100644
--- a/gr-utils/python/modtool/gr-newmod/lib/qa_howto.h
+++ b/gr-utils/python/modtool/gr-newmod/lib/qa_howto.h
@@ -23,7 +23,7 @@
 #ifndef _QA_HOWTO_H_
 #define _QA_HOWTO_H_
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 #include <cppunit/TestSuite.h>
 
 //! collect all the tests for the gr-filter directory
diff --git a/gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt b/gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt
index d896dc3199..bfcf3d521f 100644
--- a/gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt
+++ b/gr-utils/python/modtool/gr-newmod/swig/CMakeLists.txt
@@ -35,10 +35,6 @@ foreach(incdir ${GNURADIO_RUNTIME_INCLUDE_DIRS})
     list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/swig)
 endforeach(incdir)
 
-foreach(incdir ${GRUEL_INCLUDE_DIRS})
-    list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gruel/swig)
-endforeach(incdir)
-
 set(GR_SWIG_LIBRARIES gnuradio-howto)
 set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/howto_swig_doc.i)
 set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
diff --git a/gr-video-sdl/include/video_sdl/api.h b/gr-video-sdl/include/video_sdl/api.h
index 5418f86f03..981292658c 100644
--- a/gr-video-sdl/include/video_sdl/api.h
+++ b/gr-video-sdl/include/video_sdl/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_VIDEO_SDL_API_H
 #define INCLUDED_VIDEO_SDL_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_video_sdl_EXPORTS
 #  define VIDEO_SDL_API __GR_ATTR_EXPORT
diff --git a/gr-video-sdl/lib/CMakeLists.txt b/gr-video-sdl/lib/CMakeLists.txt
index 5b0b9fdfae..e90aa17273 100644
--- a/gr-video-sdl/lib/CMakeLists.txt
+++ b/gr-video-sdl/lib/CMakeLists.txt
@@ -23,7 +23,6 @@
 include_directories(
     ${GR_VIDEO_SDL_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${LOG4CXX_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${SDL_INCLUDE_DIR}
diff --git a/gr-video-sdl/src/CMakeLists.txt b/gr-video-sdl/src/CMakeLists.txt
index 636b34d6df..ae0a0d98ca 100644
--- a/gr-video-sdl/src/CMakeLists.txt
+++ b/gr-video-sdl/src/CMakeLists.txt
@@ -23,7 +23,6 @@
 include_directories(
     ${GR_VIDEO_SDL_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${LOG4CPP_INCLUDE_DIRS}
     ${SDL_INCLUDE_DIR}
diff --git a/gr-video-sdl/swig/CMakeLists.txt b/gr-video-sdl/swig/CMakeLists.txt
index 00bb8755d5..26f4f6d596 100644
--- a/gr-video-sdl/swig/CMakeLists.txt
+++ b/gr-video-sdl/swig/CMakeLists.txt
@@ -26,7 +26,6 @@ include(GrSwig)
 set(GR_SWIG_INCLUDE_DIRS
     ${GR_VIDEO_SDL_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-vocoder/include/vocoder/api.h b/gr-vocoder/include/vocoder/api.h
index 331cf5d0bc..613a19f4bc 100644
--- a/gr-vocoder/include/vocoder/api.h
+++ b/gr-vocoder/include/vocoder/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_VOCODER_API_H
 #define INCLUDED_VOCODER_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_vocoder_EXPORTS
 #  define VOCODER_API __GR_ATTR_EXPORT
diff --git a/gr-vocoder/lib/CMakeLists.txt b/gr-vocoder/lib/CMakeLists.txt
index 4512c19704..08ff4108d3 100644
--- a/gr-vocoder/lib/CMakeLists.txt
+++ b/gr-vocoder/lib/CMakeLists.txt
@@ -23,7 +23,6 @@
 include_directories(
     ${GR_VOCODER_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${LOG4CXX_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
diff --git a/gr-vocoder/swig/CMakeLists.txt b/gr-vocoder/swig/CMakeLists.txt
index 1fa5c0abb7..585e502ef0 100644
--- a/gr-vocoder/swig/CMakeLists.txt
+++ b/gr-vocoder/swig/CMakeLists.txt
@@ -26,7 +26,6 @@ include(GrSwig)
 set(GR_SWIG_INCLUDE_DIRS
     ${GR_VOCODER_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-wavelet/include/wavelet/api.h b/gr-wavelet/include/wavelet/api.h
index 68b2c04d78..f1b281440d 100644
--- a/gr-wavelet/include/wavelet/api.h
+++ b/gr-wavelet/include/wavelet/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_WAVELET_API_H
 #define INCLUDED_WAVELET_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_wavelet_EXPORTS
 #  define WAVELET_API __GR_ATTR_EXPORT
diff --git a/gr-wavelet/lib/CMakeLists.txt b/gr-wavelet/lib/CMakeLists.txt
index d25245f0cc..eb01d7d1cb 100644
--- a/gr-wavelet/lib/CMakeLists.txt
+++ b/gr-wavelet/lib/CMakeLists.txt
@@ -26,7 +26,6 @@ include_directories(
     ${GR_WAVELET_INCLUDE_DIRS}
     ${GR_BLOCKS_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${LOG4CXX_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${GSL_INCLUDE_DIRS}
diff --git a/gr-wavelet/swig/CMakeLists.txt b/gr-wavelet/swig/CMakeLists.txt
index 38f9b0a016..b16f1b6efe 100644
--- a/gr-wavelet/swig/CMakeLists.txt
+++ b/gr-wavelet/swig/CMakeLists.txt
@@ -27,7 +27,6 @@ set(GR_SWIG_INCLUDE_DIRS
     ${GR_WAVELET_INCLUDE_DIRS}
     ${GR_BLOCKS_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${GSL_INCLUDE_DIRS}
 )
diff --git a/gr-wxgui/include/wxgui/api.h b/gr-wxgui/include/wxgui/api.h
index 442e112e4b..cf9e980a9c 100644
--- a/gr-wxgui/include/wxgui/api.h
+++ b/gr-wxgui/include/wxgui/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_WXGUI_API_H
 #define INCLUDED_WXGUI_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gnuradio_wxgui_EXPORTS
 #  define WXGUI_API __GR_ATTR_EXPORT
diff --git a/gr-wxgui/lib/CMakeLists.txt b/gr-wxgui/lib/CMakeLists.txt
index dc4dbbc40b..c33a7b9a33 100644
--- a/gr-wxgui/lib/CMakeLists.txt
+++ b/gr-wxgui/lib/CMakeLists.txt
@@ -27,7 +27,6 @@ include_directories(
     ${GR_WXGUI_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_INCLUDE_DIRS}
     ${VOLK_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gr-wxgui/lib/histo_sink_f_impl.cc b/gr-wxgui/lib/histo_sink_f_impl.cc
index f9459ac8d9..9b168de547 100644
--- a/gr-wxgui/lib/histo_sink_f_impl.cc
+++ b/gr-wxgui/lib/histo_sink_f_impl.cc
@@ -80,7 +80,7 @@ namespace gr {
                             gr_vector_void_star &output_items)
     {
       const float *in = (const float*)input_items[0];
-      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
       for(unsigned int i = 0; i < (unsigned int)noutput_items; i++) {
         d_samps[d_sample_count] = in[i];
         d_sample_count++;
@@ -164,7 +164,7 @@ namespace gr {
     void
     histo_sink_f_impl::set_frame_size(unsigned int frame_size)
     {
-      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
       d_frame_size = frame_size;
       /* allocate a new sample array */
       delete [] d_samps;
@@ -174,7 +174,7 @@ namespace gr {
 
     void
     histo_sink_f_impl::set_num_bins(unsigned int num_bins) {
-      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
       d_num_bins = num_bins;
       /* allocate a new bin array */
       delete [] d_bins;
diff --git a/gr-wxgui/lib/histo_sink_f_impl.h b/gr-wxgui/lib/histo_sink_f_impl.h
index e160e0e550..98b0fe6706 100644
--- a/gr-wxgui/lib/histo_sink_f_impl.h
+++ b/gr-wxgui/lib/histo_sink_f_impl.h
@@ -37,7 +37,7 @@ namespace gr {
       unsigned int d_sample_count;
       unsigned int *d_bins;
       float *d_samps;
-      gruel::mutex d_mutex;
+      gr::thread::mutex d_mutex;
 
       void send_frame(void);
       void clear(void);
diff --git a/gr-wxgui/swig/CMakeLists.txt b/gr-wxgui/swig/CMakeLists.txt
index aa0750f44b..ad2623cdac 100644
--- a/gr-wxgui/swig/CMakeLists.txt
+++ b/gr-wxgui/swig/CMakeLists.txt
@@ -27,7 +27,6 @@ set(GR_SWIG_INCLUDE_DIRS
     ${CMAKE_CURRENT_BINARY_DIR}/../include
     ${GR_WXGUI_INCLUDE_DIRS}
     ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${GRUEL_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gruel/CMakeLists.txt b/gruel/CMakeLists.txt
index 3bdb7406ed..377add8f98 100644
--- a/gruel/CMakeLists.txt
+++ b/gruel/CMakeLists.txt
@@ -85,7 +85,6 @@ add_subdirectory(src/include/gruel)
 add_subdirectory(src/lib)
 if(ENABLE_PYTHON)
     add_subdirectory(src/swig)
-    add_subdirectory(src/python)
 endif(ENABLE_PYTHON)
 
 ########################################################################
diff --git a/gruel/src/include/gruel/api.h b/gruel/src/include/gruel/api.h
index 945814d43c..73a8a5719b 100644
--- a/gruel/src/include/gruel/api.h
+++ b/gruel/src/include/gruel/api.h
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_GRUEL_API_H
 #define INCLUDED_GRUEL_API_H
 
-#include <gruel/attributes.h>
+#include <attributes.h>
 
 #ifdef gruel_EXPORTS
 #  define GRUEL_API __GR_ATTR_EXPORT
diff --git a/gruel/src/include/gruel/attributes.h b/gruel/src/include/gruel/attributes.h
deleted file mode 100644
index baa5521c81..0000000000
--- a/gruel/src/include/gruel/attributes.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2010 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GRUEL_ATTRIBUTES_H
-#define INCLUDED_GRUEL_ATTRIBUTES_H
-
-////////////////////////////////////////////////////////////////////////
-// Cross-platform attribute macros
-////////////////////////////////////////////////////////////////////////
-#if defined __GNUC__
-#  define __GR_ATTR_ALIGNED(x) __attribute__((aligned(x)))
-#  define __GR_ATTR_UNUSED     __attribute__((unused))
-#  define __GR_ATTR_INLINE     __attribute__((always_inline))
-#  define __GR_ATTR_DEPRECATED __attribute__((deprecated))
-#  if __GNUC__ >= 4
-#    define __GR_ATTR_EXPORT   __attribute__((visibility("default")))
-#    define __GR_ATTR_IMPORT   __attribute__((visibility("default")))
-#  else
-#    define __GR_ATTR_EXPORT
-#    define __GR_ATTR_IMPORT
-#  endif
-#elif _MSC_VER
-#  define __GR_ATTR_ALIGNED(x) __declspec(align(x))
-#  define __GR_ATTR_UNUSED
-#  define __GR_ATTR_INLINE     __forceinline
-#  define __GR_ATTR_DEPRECATED __declspec(deprecated)
-#  define __GR_ATTR_EXPORT     __declspec(dllexport)
-#  define __GR_ATTR_IMPORT     __declspec(dllimport)
-#else
-#  define __GR_ATTR_ALIGNED(x)
-#  define __GR_ATTR_UNUSED
-#  define __GR_ATTR_INLINE
-#  define __GR_ATTR_DEPRECATED
-#  define __GR_ATTR_EXPORT
-#  define __GR_ATTR_IMPORT
-#endif
-
-////////////////////////////////////////////////////////////////////////
-// define inline when building C
-////////////////////////////////////////////////////////////////////////
-#if defined(_MSC_VER) && !defined(__cplusplus) && !defined(inline)
-#  define inline __inline
-#endif
-
-////////////////////////////////////////////////////////////////////////
-// suppress warnings
-////////////////////////////////////////////////////////////////////////
-#ifdef _MSC_VER
-#  pragma warning(disable: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B'
-#  pragma warning(disable: 4275) // non dll-interface class ... used as base for dll-interface class ...
-#  pragma warning(disable: 4244) // conversion from 'double' to 'float', possible loss of data
-#  pragma warning(disable: 4305) // 'initializing' : truncation from 'double' to 'float'
-#  pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
-#endif
-
-#endif /* INCLUDED_GRUEL_ATTRIBUTES_H */
diff --git a/gruel/src/include/gruel/high_res_timer.h b/gruel/src/include/gruel/high_res_timer.h
deleted file mode 100644
index a885520b68..0000000000
--- a/gruel/src/include/gruel/high_res_timer.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright 2011 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef INCLUDED_GRUEL_HIGH_RES_TIMER_H
-#define INCLUDED_GRUEL_HIGH_RES_TIMER_H
-
-namespace gruel {
-    //! Typedef for the timer tick count
-    typedef signed long long high_res_timer_type;
-
-    //! Get the current time in ticks
-    high_res_timer_type high_res_timer_now(void);
-
-    //! Get the number of ticks per second
-    high_res_timer_type high_res_timer_tps(void);
-
-    //! Get the tick count at the epoch
-    high_res_timer_type high_res_timer_epoch(void);
-
-} /* namespace gruel */
-
-////////////////////////////////////////////////////////////////////////
-// Use architecture defines to determine the implementation
-////////////////////////////////////////////////////////////////////////
-#if defined(linux) || defined(__linux) || defined(__linux__)
-    #define GRUEL_HRT_USE_CLOCK_GETTIME
-#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
-    #define GRUEL_HRT_USE_QUERY_PERFORMANCE_COUNTER
-#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
-    #define GRUEL_HRT_USE_MACH_ABSOLUTE_TIME
-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
-    #define GRUEL_HRT_USE_CLOCK_GETTIME
-#else
-    #define GRUEL_HRT_USE_MICROSEC_CLOCK
-#endif
-
-////////////////////////////////////////////////////////////////////////
-#ifdef GRUEL_HRT_USE_CLOCK_GETTIME
-    #include <ctime>
-
-    inline gruel::high_res_timer_type gruel::high_res_timer_now(void){
-        timespec ts;
-        clock_gettime(CLOCK_MONOTONIC, &ts);
-        return ts.tv_sec*high_res_timer_tps() + ts.tv_nsec;
-    }
-
-    inline gruel::high_res_timer_type gruel::high_res_timer_tps(void){
-        return 1000000000UL;
-    }
-#endif /* GRUEL_HRT_USE_CLOCK_GETTIME */
-
-////////////////////////////////////////////////////////////////////////
-#ifdef GRUEL_HRT_USE_MACH_ABSOLUTE_TIME
-    #include <mach/mach_time.h>
-
-    inline gruel::high_res_timer_type gruel::high_res_timer_now(void){
-        return mach_absolute_time();
-    }
-
-    inline gruel::high_res_timer_type gruel::high_res_timer_tps(void){
-        mach_timebase_info_data_t info;
-        mach_timebase_info(&info);
-        return gruel::high_res_timer_type(info.numer*1000000000UL)/info.denom;
-    }
-#endif
-
-////////////////////////////////////////////////////////////////////////
-#ifdef GRUEL_HRT_USE_QUERY_PERFORMANCE_COUNTER
-    #include <Windows.h>
-
-    inline gruel::high_res_timer_type gruel::high_res_timer_now(void){
-        LARGE_INTEGER counts;
-        QueryPerformanceCounter(&counts);
-        return counts.QuadPart;
-    }
-
-    inline gruel::high_res_timer_type gruel::high_res_timer_tps(void){
-        LARGE_INTEGER freq;
-        QueryPerformanceFrequency(&freq);
-        return freq.QuadPart;
-    }
-#endif
-
-////////////////////////////////////////////////////////////////////////
-#ifdef GRUEL_HRT_USE_MICROSEC_CLOCK
-    #include <boost/date_time/posix_time/posix_time.hpp>
-
-    inline gruel::high_res_timer_type gruel::high_res_timer_now(void){
-        static const boost::posix_time::ptime epoch(boost::posix_time::from_time_t(0));
-        return (boost::posix_time::microsec_clock::universal_time() - epoch).ticks();
-    }
-
-    inline gruel::high_res_timer_type gruel::high_res_timer_tps(void){
-        return boost::posix_time::time_duration::ticks_per_second();
-    }
-#endif
-
-////////////////////////////////////////////////////////////////////////
-#include <boost/date_time/posix_time/posix_time.hpp>
-
-inline gruel::high_res_timer_type gruel::high_res_timer_epoch(void){
-    static const double hrt_ticks_per_utc_ticks = gruel::high_res_timer_tps()/double(boost::posix_time::time_duration::ticks_per_second());
-    boost::posix_time::time_duration utc = boost::posix_time::microsec_clock::universal_time() - boost::posix_time::from_time_t(0);
-    return gruel::high_res_timer_now() - utc.ticks()*hrt_ticks_per_utc_ticks;
-}
-
-#endif /* INCLUDED_GRUEL_HIGH_RES_TIMER_H */
diff --git a/gruel/src/include/gruel/msg_accepter.h b/gruel/src/include/gruel/msg_accepter.h
deleted file mode 100644
index 45acb3c784..0000000000
--- a/gruel/src/include/gruel/msg_accepter.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_GRUEL_MSG_ACCEPTER_H
-#define INCLUDED_GRUEL_MSG_ACCEPTER_H
-
-#include <gruel/api.h>
-#include <gruel/pmt.h>
-#include <boost/shared_ptr.hpp>
-
-namespace gruel {
-
-  /*!
-   * \brief Virtual base class that accepts messages
-   */
-  class GRUEL_API msg_accepter
-  {
-  public:
-    msg_accepter() {};
-    virtual ~msg_accepter();
-
-    /*!
-     * \brief send \p msg to \p msg_accepter on port \p which_port
-     *
-     * Sending a message is an asynchronous operation.  The \p post
-     * call will not wait for the message either to arrive at the
-     * destination or to be received.
-     */
-    virtual void post(pmt::pmt_t which_port, pmt::pmt_t msg) = 0;
-  };
-
-  typedef boost::shared_ptr<msg_accepter> msg_accepter_sptr;
-
-} /* namespace gruel */
-
-#endif /* INCLUDED_GRUEL_MSG_ACCEPTER_H */
diff --git a/gruel/src/include/gruel/msg_accepter_msgq.h b/gruel/src/include/gruel/msg_accepter_msgq.h
deleted file mode 100644
index 6b9bcf4dbc..0000000000
--- a/gruel/src/include/gruel/msg_accepter_msgq.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef INCLUDED_MSG_ACCEPTER_MSGQ_H
-#define INCLUDED_MSG_ACCEPTER_MSGQ_H
-
-#include <gruel/api.h>
-#include <gruel/msg_accepter.h>
-#include <gruel/msg_queue.h>
-
-namespace gruel {
-
-  /*!
-   * \brief Concrete class that accepts messages and inserts them into a message queue.
-   */
-  class GRUEL_API msg_accepter_msgq : public msg_accepter
-  {
-  protected:
-    msg_queue_sptr d_msg_queue;
-
-  public:
-    msg_accepter_msgq(msg_queue_sptr msgq);
-    ~msg_accepter_msgq();
-
-    virtual void post(pmt::pmt_t msg);
-
-    msg_queue_sptr msg_queue() const { return d_msg_queue; }
-  };
-
-} /* namespace gruel */
-
-#endif /* INCLUDED_MSG_ACCEPTER_MSGQ_H */
diff --git a/gruel/src/include/gruel/msg_passing.h b/gruel/src/include/gruel/msg_passing.h
deleted file mode 100644
index 572507e0f3..0000000000
--- a/gruel/src/include/gruel/msg_passing.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_GRUEL_MSG_PASSING_H
-#define INCLUDED_GRUEL_MSG_PASSING_H
-
-/*!
- * \brief Include this header to use the message passing features
- */
-
-#include <gruel/api.h>
-#include <gruel/pmt.h>
-#include <gruel/msg_accepter.h>
-
-
-namespace gruel {
-
-  /*!
-   * \brief send message to msg_accepter
-   *
-   * \param accepter is the target of the send.
-   * \param which_port A pmt symbol describing the port by name.
-   * \param msg is the message to send.  It's usually a pmt tuple.
-   *
-   * Sending a message is an asynchronous operation.  The \p send
-   * call will not wait for the message either to arrive at the
-   * destination or to be received.
-   *
-   * \returns msg
-   */
-  static inline pmt::pmt_t
-  send(msg_accepter_sptr accepter, const pmt::pmt_t &which_port, const pmt::pmt_t &msg)
-  {
-    accepter->post(which_port, msg);
-    return msg;
-  }
-
-  /*!
-   * \brief send message to msg_accepter
-   *
-   * \param accepter is the target of the send.
-   * \param which_port A pmt symbol describing the port by name.
-   * \param msg is the message to send.  It's usually a pmt tuple.
-   *
-   * Sending a message is an asynchronous operation.  The \p send
-   * call will not wait for the message either to arrive at the
-   * destination or to be received.
-   *
-   * \returns msg
-   */
-  static inline pmt::pmt_t
-  send(msg_accepter *accepter, const pmt::pmt_t &which_port, const pmt::pmt_t &msg)
-  {
-    accepter->post(which_port, msg);
-    return msg;
-  }
-
-  /*!
-   * \brief send message to msg_accepter
-   *
-   * \param accepter is the target of the send.
-   * \param which_port A pmt symbol describing the port by name.
-   * \param msg is the message to send.  It's usually a pmt tuple.
-   *
-   * Sending a message is an asynchronous operation.  The \p send
-   * call will not wait for the message either to arrive at the
-   * destination or to be received.
-   *
-   * \returns msg
-   */
-  static inline pmt::pmt_t
-  send(msg_accepter &accepter, const pmt::pmt_t &which_port, const pmt::pmt_t &msg)
-  {
-    accepter.post(which_port, msg);
-    return msg;
-  }
-
-  /*!
-   * \brief send message to msg_accepter
-   *
-   * \param accepter is the target of the send.  precond: pmt::is_msg_accepter(accepter)
-   * \param which_port A pmt symbol describing the port by name.
-   * \param msg is the message to send.  It's usually a pmt tuple.
-   *
-   * Sending a message is an asynchronous operation.  The \p send
-   * call will not wait for the message either to arrive at the
-   * destination or to be received.
-   *
-   * \returns msg
-   */
-  static inline pmt::pmt_t
-  send(pmt::pmt_t accepter, const pmt::pmt_t &which_port, const pmt::pmt_t &msg)
-  {
-    return send(pmt::msg_accepter_ref(accepter), which_port, msg);
-  }
-
-} /* namespace gruel */
-
-#endif /* INCLUDED_GRUEL_MSG_PASSING_H */
diff --git a/gruel/src/include/gruel/msg_producer.h b/gruel/src/include/gruel/msg_producer.h
deleted file mode 100644
index cd753958ad..0000000000
--- a/gruel/src/include/gruel/msg_producer.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef INCLUDED_GRUEL_MSG_PRODUCER_H
-#define INCLUDED_GRUEL_MSG_PRODUCER_H
-
-#include <gruel/api.h>
-#include <gruel/pmt.h>
-#include <boost/shared_ptr.hpp>
-
-namespace gruel {
-
-  /*!
-   * \brief Virtual base class that produces messages
-   */
-  class GRUEL_API msg_producer
-  {
-  public:
-    msg_producer() {}
-    virtual ~msg_producer();
-
-    /*!
-     * \brief send \p msg to \p msg_producer
-     */
-    virtual pmt::pmt_t retrieve() = 0;
-  };
-
-  typedef boost::shared_ptr<msg_producer> msg_producer_sptr;
-
-} /* namespace gruel */
-
-#endif /* INCLUDED_GRUEL_MSG_PRODUCER_H */
-
diff --git a/gruel/src/include/gruel/msg_queue.h b/gruel/src/include/gruel/msg_queue.h
deleted file mode 100644
index f038ca3259..0000000000
--- a/gruel/src/include/gruel/msg_queue.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-#ifndef INCLUDED_MSG_QUEUE_H
-#define INCLUDED_MSG_QUEUE_H
-
-#include <gruel/api.h>
-#include <gruel/thread.h>
-#include <gruel/pmt.h>
-#include <deque>
-
-namespace gruel {
-
-  class msg_queue;
-  typedef boost::shared_ptr<msg_queue> msg_queue_sptr;
-
-  msg_queue_sptr make_msg_queue(unsigned int limit=0);
-
-  /*!
-   * \brief thread-safe message queue
-   */
-  class GRUEL_API msg_queue {
-
-    gruel::mutex              d_mutex;
-    gruel::condition_variable d_not_empty;
-    gruel::condition_variable d_not_full;
-    unsigned int	      d_limit;    // max # of messages in queue.  0 -> unbounded
-
-    std::deque<pmt::pmt_t>    d_msgs;
-
-  public:
-    msg_queue(unsigned int limit);
-    ~msg_queue();
-
-    /*!
-     * \brief Insert message at tail of queue.
-     * \param msg message
-     *
-     * Block if queue if full.
-     */
-    void insert_tail(pmt::pmt_t msg);
-
-    /*!
-     * \brief Delete message from head of queue and return it.
-     * Block if no message is available.
-     */
-    pmt::pmt_t delete_head();
-
-    /*!
-     * \brief If there's a message in the q, delete it and return it.
-     * If no message is available, return pmt_t().
-     */
-    pmt::pmt_t delete_head_nowait();
-
-    //! Delete all messages from the queue
-    void flush();
-
-    //! is the queue empty?
-    bool empty_p() const { return d_msgs.empty(); }
-
-    //! is the queue full?
-    bool full_p() const { return d_limit != 0 && count() >= d_limit; }
-
-    //! return number of messages in queue
-    unsigned int count() const { return d_msgs.size(); }
-
-    //! return limit on number of message in queue.  0 -> unbounded
-    unsigned int limit() const { return d_limit; }
-  };
-
-} /* namespace gruel */
-
-#endif /* INCLUDED_MSG_QUEUE_H */
diff --git a/gruel/src/include/gruel/pmt.h b/gruel/src/include/gruel/pmt.h
deleted file mode 100644
index b4c51ab927..0000000000
--- a/gruel/src/include/gruel/pmt.h
+++ /dev/null
@@ -1,884 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2009,2010 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_PMT_H
-#define INCLUDED_PMT_H
-
-#include <gruel/api.h>
-#include <boost/intrusive_ptr.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/any.hpp>
-#include <complex>
-#include <string>
-#include <stdint.h>
-#include <iosfwd>
-#include <stdexcept>
-#include <vector>
-
-namespace gruel {
-  class msg_accepter;
-};
-
-/*!
- * This file defines a polymorphic type and the operations on it.
- *
- * It draws heavily on the idea of scheme and lisp data types.
- * The interface parallels that in Guile 1.8, with the notable
- * exception that these objects are transparently reference counted.
- */
-
-namespace pmt {
-
-/*!
- * \brief base class of all pmt types
- */
-class pmt_base;
-
-/*!
- * \brief typedef for shared pointer (transparent reference counting).
- * See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
- */
-typedef boost::intrusive_ptr<pmt_base> pmt_t;
-
-extern GRUEL_API void intrusive_ptr_add_ref(pmt_base*);
-extern GRUEL_API void intrusive_ptr_release(pmt_base*);
-
-class GRUEL_API exception : public std::logic_error
-{
-public:
-  exception(const std::string &msg, pmt_t obj);
-};
-
-class GRUEL_API wrong_type : public exception
-{
-public:
-  wrong_type(const std::string &msg, pmt_t obj);
-};
-
-class GRUEL_API out_of_range : public exception
-{
-public:
-  out_of_range(const std::string &msg, pmt_t obj);
-};
-
-class GRUEL_API notimplemented : public exception
-{
-public:
-  notimplemented(const std::string &msg, pmt_t obj);
-};
-
-/*
- * ------------------------------------------------------------------------
- * Booleans.  Two constants, #t and #f.
- *
- * In predicates, anything that is not #f is considered true.
- * I.e., there is a single false value, #f.
- * ------------------------------------------------------------------------
- */
-extern GRUEL_API const pmt_t PMT_T;	//< \#t : boolean true constant
-extern GRUEL_API const pmt_t PMT_F;	//< \#f : boolean false constant
-
-//! Return true if obj is \#t or \#f, else return false.
-GRUEL_API bool is_bool(pmt_t obj);
-
-//! Return false if obj is \#f, else return true.
-GRUEL_API bool is_true(pmt_t obj);
-
-//! Return true if obj is \#f, else return true.
-GRUEL_API bool is_false(pmt_t obj);
-
-//! Return \#f is val is false, else return \#t.
-GRUEL_API pmt_t from_bool(bool val);
-
-//! Return true if val is pmt::True, return false when val is pmt::PMT_F,
-// else raise wrong_type exception.
-GRUEL_API bool to_bool(pmt_t val);
-
-/*
- * ------------------------------------------------------------------------
- *			       Symbols
- * ------------------------------------------------------------------------
- */
-
-//! Return true if obj is a symbol, else false.
-GRUEL_API bool is_symbol(const pmt_t& obj);
-
-//! Return the symbol whose name is \p s.
-GRUEL_API pmt_t string_to_symbol(const std::string &s);
-
-//! Alias for pmt_string_to_symbol
-GRUEL_API pmt_t intern(const std::string &s);
-
-
-/*!
- * If \p is a symbol, return the name of the symbol as a string.
- * Otherwise, raise the wrong_type exception.
- */
-GRUEL_API const std::string symbol_to_string(const pmt_t& sym);
-
-/*
- * ------------------------------------------------------------------------
- *           Numbers: we support integer, real and complex
- * ------------------------------------------------------------------------
- */
-
-//! Return true if obj is any kind of number, else false.
-GRUEL_API bool is_number(pmt_t obj);
-
-/*
- * ------------------------------------------------------------------------
- *			       Integers
- * ------------------------------------------------------------------------
- */
-
-//! Return true if \p x is an integer number, else false
-GRUEL_API bool is_integer(pmt_t x);
-
-//! Return the pmt value that represents the integer \p x.
-GRUEL_API pmt_t from_long(long x);
-
-/*!
- * \brief Convert pmt to long if possible.
- *
- * When \p x represents an exact integer that fits in a long,
- * return that integer.  Else raise an exception, either wrong_type
- * when x is not an exact integer, or out_of_range when it doesn't fit.
- */
-GRUEL_API long to_long(pmt_t x);
-
-/*
- * ------------------------------------------------------------------------
- *			       uint64_t
- * ------------------------------------------------------------------------
- */
-
-//! Return true if \p x is an uint64 number, else false
-GRUEL_API bool is_uint64(pmt_t x);
-
-//! Return the pmt value that represents the uint64 \p x.
-GRUEL_API pmt_t from_uint64(uint64_t x);
-
-/*!
- * \brief Convert pmt to uint64 if possible.
- *
- * When \p x represents an exact integer that fits in a uint64,
- * return that uint64.  Else raise an exception, either wrong_type
- * when x is not an exact uint64, or out_of_range when it doesn't fit.
- */
-GRUEL_API uint64_t to_uint64(pmt_t x);
-
-/*
- * ------------------------------------------------------------------------
- *				Reals
- * ------------------------------------------------------------------------
- */
-
-/*
- * \brief Return true if \p obj is a real number, else false.
- */
-GRUEL_API bool is_real(pmt_t obj);
-
-//! Return the pmt value that represents double \p x.
-GRUEL_API pmt_t from_double(double x);
-
-/*!
- * \brief Convert pmt to double if possible.
- *
- * Returns the number closest to \p val that is representable
- * as a double.  The argument \p val must be a real or integer, otherwise
- * a wrong_type exception is raised.
- */
-GRUEL_API double to_double(pmt_t x);
-
-/*
- * ------------------------------------------------------------------------
- *			       Complex
- * ------------------------------------------------------------------------
- */
-
-/*!
- * \brief return true if \p obj is a complex number, false otherwise.
- */
-GRUEL_API bool is_complex(pmt_t obj);
-
-//! Return a complex number constructed of the given real and imaginary parts.
-GRUEL_API pmt_t make_rectangular(double re, double im);
-
-//! Return a complex number constructed of the given real and imaginary parts.
-GRUEL_API pmt_t from_complex(double re, double im);
-
-//! Return a complex number constructed of the given a complex number.
-GRUEL_API pmt_t from_complex(const std::complex<double> &z);
-
-//! Return a complex number constructed of the given real and imaginary parts.
-GRUEL_API pmt_t pmt_from_complex(double re, double im);
-
-//! Return a complex number constructed of the given a complex number.
-GRUEL_API pmt_t pmt_from_complex(const std::complex<double> &z);
-
-/*!
- * If \p z is complex, real or integer, return the closest complex<double>.
- * Otherwise, raise the wrong_type exception.
- */
-GRUEL_API std::complex<double> to_complex(pmt_t z);
-
-/*
- * ------------------------------------------------------------------------
- *				Pairs
- * ------------------------------------------------------------------------
- */
-
-extern GRUEL_API const pmt_t PMT_NIL;	//< the empty list
-
-//! Return true if \p x is the empty list, otherwise return false.
-GRUEL_API bool is_null(const pmt_t& x);
-
-//! Return true if \p obj is a pair, else false.
-GRUEL_API bool is_pair(const pmt_t& obj);
-
-//! Return a newly allocated pair whose car is \p x and whose cdr is \p y.
-GRUEL_API pmt_t cons(const pmt_t& x, const pmt_t& y);
-
-//! If \p pair is a pair, return the car of the \p pair, otherwise raise wrong_type.
-GRUEL_API pmt_t car(const pmt_t& pair);
-
-//! If \p pair is a pair, return the cdr of the \p pair, otherwise raise wrong_type.
-GRUEL_API pmt_t cdr(const pmt_t& pair);
-
-//! Stores \p value in the car field of \p pair.
-GRUEL_API void set_car(pmt_t pair, pmt_t value);
-
-//! Stores \p value in the cdr field of \p pair.
-GRUEL_API void set_cdr(pmt_t pair, pmt_t value);
-
-GRUEL_API pmt_t caar(pmt_t pair);
-GRUEL_API pmt_t cadr(pmt_t pair);
-GRUEL_API pmt_t cdar(pmt_t pair);
-GRUEL_API pmt_t cddr(pmt_t pair);
-GRUEL_API pmt_t caddr(pmt_t pair);
-GRUEL_API pmt_t cadddr(pmt_t pair);
-
-/*
- * ------------------------------------------------------------------------
- *			          Tuples
- *
- * Store a fixed number of objects.  Tuples are not modifiable, and thus
- * are excellent for use as messages.  Indexing is zero based.
- * Access time to an element is O(1).
- * ------------------------------------------------------------------------
- */
-
-//! Return true if \p x is a tuple, othewise false.
-GRUEL_API bool is_tuple(pmt_t x);
-
-GRUEL_API pmt_t make_tuple();
-GRUEL_API pmt_t make_tuple(const pmt_t &e0);
-GRUEL_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1);
-GRUEL_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2);
-GRUEL_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3);
-GRUEL_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4);
-GRUEL_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5);
-GRUEL_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6);
-GRUEL_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7);
-GRUEL_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8);
-GRUEL_API pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8, const pmt_t &e9);
-
-/*!
- * If \p x is a vector or proper list, return a tuple containing the elements of x
- */
-GRUEL_API pmt_t to_tuple(const pmt_t &x);
-
-/*!
- * Return the contents of position \p k of \p tuple.
- * \p k must be a valid index of \p tuple.
- */
-GRUEL_API pmt_t tuple_ref(const pmt_t &tuple, size_t k);
-
-/*
- * ------------------------------------------------------------------------
- *			       Vectors
- *
- * These vectors can hold any kind of objects.  Indexing is zero based.
- * ------------------------------------------------------------------------
- */
-
-//! Return true if \p x is a vector, othewise false.
-GRUEL_API bool is_vector(pmt_t x);
-
-//! Make a vector of length \p k, with initial values set to \p fill
-GRUEL_API pmt_t make_vector(size_t k, pmt_t fill);
-
-/*!
- * Return the contents of position \p k of \p vector.
- * \p k must be a valid index of \p vector.
- */
-GRUEL_API pmt_t vector_ref(pmt_t vector, size_t k);
-
-//! Store \p obj in position \p k.
-GRUEL_API void vector_set(pmt_t vector, size_t k, pmt_t obj);
-
-//! Store \p fill in every position of \p vector
-GRUEL_API void vector_fill(pmt_t vector, pmt_t fill);
-
-/*
- * ------------------------------------------------------------------------
- *		      Binary Large Objects (BLOBs)
- *
- * Handy for passing around uninterpreted chunks of memory.
- * ------------------------------------------------------------------------
- */
-
-//! Return true if \p x is a blob, othewise false.
-GRUEL_API bool is_blob(pmt_t x);
-
-/*!
- * \brief Make a blob given a pointer and length in bytes
- *
- * \param buf is the pointer to data to use to create blob
- * \param len is the size of the data in bytes.
- *
- * The data is copied into the blob.
- */
-GRUEL_API pmt_t make_blob(const void *buf, size_t len);
-
-//! Return a pointer to the blob's data
-GRUEL_API const void *blob_data(pmt_t blob);
-
-//! Return the blob's length in bytes
-GRUEL_API size_t blob_length(pmt_t blob);
-
-/*!
- * <pre>
- * ------------------------------------------------------------------------
- *		       Uniform Numeric Vectors
- *
- * A uniform numeric vector is a vector whose elements are all of single
- * numeric type.  pmt offers uniform numeric vectors for signed and
- * unsigned 8-bit, 16-bit, 32-bit, and 64-bit integers, two sizes of
- * floating point values, and complex floating-point numbers of these
- * two sizes.  Indexing is zero based.
- *
- * The names of the functions include these tags in their names:
- *
- *    u8  unsigned 8-bit integers
- *    s8  signed 8-bit integers
- *   u16  unsigned 16-bit integers
- *   s16  signed 16-bit integers
- *   u32  unsigned 32-bit integers
- *   s32  signed 32-bit integers
- *   u64  unsigned 64-bit integers
- *   s64  signed 64-bit integers
- *   f32  the C++ type float
- *   f64  the C++ type double
- *   c32  the C++ type complex<float>
- *   c64  the C++ type complex<double>
- * ------------------------------------------------------------------------
- * </pre>
- */
-
-//! true if \p x is any kind of uniform numeric vector
-GRUEL_API bool is_uniform_vector(pmt_t x);
-
-GRUEL_API bool is_u8vector(pmt_t x);
-GRUEL_API bool is_s8vector(pmt_t x);
-GRUEL_API bool is_u16vector(pmt_t x);
-GRUEL_API bool is_s16vector(pmt_t x);
-GRUEL_API bool is_u32vector(pmt_t x);
-GRUEL_API bool is_s32vector(pmt_t x);
-GRUEL_API bool is_u64vector(pmt_t x);
-GRUEL_API bool is_s64vector(pmt_t x);
-GRUEL_API bool is_f32vector(pmt_t x);
-GRUEL_API bool is_f64vector(pmt_t x);
-GRUEL_API bool is_c32vector(pmt_t x);
-GRUEL_API bool is_c64vector(pmt_t x);
-
-GRUEL_API pmt_t make_u8vector(size_t k, uint8_t fill);
-GRUEL_API pmt_t make_s8vector(size_t k, int8_t fill);
-GRUEL_API pmt_t make_u16vector(size_t k, uint16_t fill);
-GRUEL_API pmt_t make_s16vector(size_t k, int16_t fill);
-GRUEL_API pmt_t make_u32vector(size_t k, uint32_t fill);
-GRUEL_API pmt_t make_s32vector(size_t k, int32_t fill);
-GRUEL_API pmt_t make_u64vector(size_t k, uint64_t fill);
-GRUEL_API pmt_t make_s64vector(size_t k, int64_t fill);
-GRUEL_API pmt_t make_f32vector(size_t k, float fill);
-GRUEL_API pmt_t make_f64vector(size_t k, double fill);
-GRUEL_API pmt_t make_c32vector(size_t k, std::complex<float> fill);
-GRUEL_API pmt_t make_c64vector(size_t k, std::complex<double> fill);
-
-GRUEL_API pmt_t init_u8vector(size_t k, const uint8_t *data);
-GRUEL_API pmt_t init_u8vector(size_t k, const std::vector<uint8_t> &data);
-GRUEL_API pmt_t init_s8vector(size_t k, const int8_t *data);
-GRUEL_API pmt_t init_s8vector(size_t k, const std::vector<int8_t> &data);
-GRUEL_API pmt_t init_u16vector(size_t k, const uint16_t *data);
-GRUEL_API pmt_t init_u16vector(size_t k, const std::vector<uint16_t> &data);
-GRUEL_API pmt_t init_s16vector(size_t k, const int16_t *data);
-GRUEL_API pmt_t init_s16vector(size_t k, const std::vector<int16_t> &data);
-GRUEL_API pmt_t init_u32vector(size_t k, const uint32_t *data);
-GRUEL_API pmt_t init_u32vector(size_t k, const std::vector<uint32_t> &data);
-GRUEL_API pmt_t init_s32vector(size_t k, const int32_t *data);
-GRUEL_API pmt_t init_s32vector(size_t k, const std::vector<int32_t> &data);
-GRUEL_API pmt_t init_u64vector(size_t k, const uint64_t *data);
-GRUEL_API pmt_t init_u64vector(size_t k, const std::vector<uint64_t> &data);
-GRUEL_API pmt_t init_s64vector(size_t k, const int64_t *data);
-GRUEL_API pmt_t init_s64vector(size_t k, const std::vector<int64_t> &data);
-GRUEL_API pmt_t init_f32vector(size_t k, const float *data);
-GRUEL_API pmt_t init_f32vector(size_t k, const std::vector<float> &data);
-GRUEL_API pmt_t init_f64vector(size_t k, const double *data);
-GRUEL_API pmt_t init_f64vector(size_t k, const std::vector<double> &data);
-GRUEL_API pmt_t init_c32vector(size_t k, const std::complex<float> *data);
-GRUEL_API pmt_t init_c32vector(size_t k, const std::vector<std::complex<float> > &data);
-GRUEL_API pmt_t init_c64vector(size_t k, const std::complex<double> *data);
-GRUEL_API pmt_t init_c64vector(size_t k, const std::vector<std::complex<double> > &data);
-
-GRUEL_API uint8_t  u8vector_ref(pmt_t v, size_t k);
-GRUEL_API int8_t   s8vector_ref(pmt_t v, size_t k);
-GRUEL_API uint16_t u16vector_ref(pmt_t v, size_t k);
-GRUEL_API int16_t  s16vector_ref(pmt_t v, size_t k);
-GRUEL_API uint32_t u32vector_ref(pmt_t v, size_t k);
-GRUEL_API int32_t  s32vector_ref(pmt_t v, size_t k);
-GRUEL_API uint64_t u64vector_ref(pmt_t v, size_t k);
-GRUEL_API int64_t  s64vector_ref(pmt_t v, size_t k);
-GRUEL_API float    f32vector_ref(pmt_t v, size_t k);
-GRUEL_API double   f64vector_ref(pmt_t v, size_t k);
-GRUEL_API std::complex<float>  c32vector_ref(pmt_t v, size_t k);
-GRUEL_API std::complex<double> c64vector_ref(pmt_t v, size_t k);
-
-GRUEL_API void u8vector_set(pmt_t v, size_t k, uint8_t x);  //< v[k] = x
-GRUEL_API void s8vector_set(pmt_t v, size_t k, int8_t x);
-GRUEL_API void u16vector_set(pmt_t v, size_t k, uint16_t x);
-GRUEL_API void s16vector_set(pmt_t v, size_t k, int16_t x);
-GRUEL_API void u32vector_set(pmt_t v, size_t k, uint32_t x);
-GRUEL_API void s32vector_set(pmt_t v, size_t k, int32_t x);
-GRUEL_API void u64vector_set(pmt_t v, size_t k, uint64_t x);
-GRUEL_API void s64vector_set(pmt_t v, size_t k, int64_t x);
-GRUEL_API void f32vector_set(pmt_t v, size_t k, float x);
-GRUEL_API void f64vector_set(pmt_t v, size_t k, double x);
-GRUEL_API void c32vector_set(pmt_t v, size_t k, std::complex<float> x);
-GRUEL_API void c64vector_set(pmt_t v, size_t k, std::complex<double> x);
-
-// Return const pointers to the elements
-
-GRUEL_API const void *uniform_vector_elements(pmt_t v, size_t &len);  //< works with any; len is in bytes
-
-GRUEL_API const uint8_t  *u8vector_elements(pmt_t v, size_t &len);  //< len is in elements
-GRUEL_API const int8_t   *s8vector_elements(pmt_t v, size_t &len);  //< len is in elements
-GRUEL_API const uint16_t *u16vector_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API const int16_t  *s16vector_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API const uint32_t *u32vector_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API const int32_t  *s32vector_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API const uint64_t *u64vector_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API const int64_t  *s64vector_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API const float    *f32vector_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API const double   *f64vector_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API const std::complex<float>  *c32vector_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API const std::complex<double> *c64vector_elements(pmt_t v, size_t &len); //< len is in elements
-
-// len is in elements
-GRUEL_API const std::vector<uint8_t>  u8vector_elements(pmt_t v);
-GRUEL_API const std::vector<int8_t>   s8vector_elements(pmt_t v);
-GRUEL_API const std::vector<uint16_t> u16vector_elements(pmt_t v);
-GRUEL_API const std::vector<int16_t>  s16vector_elements(pmt_t v);
-GRUEL_API const std::vector<uint32_t> u32vector_elements(pmt_t v);
-GRUEL_API const std::vector<int32_t>  s32vector_elements(pmt_t v);
-GRUEL_API const std::vector<uint64_t> u64vector_elements(pmt_t v);
-GRUEL_API const std::vector<int64_t>  s64vector_elements(pmt_t v);
-GRUEL_API const std::vector<float>    f32vector_elements(pmt_t v);
-GRUEL_API const std::vector<double>   f64vector_elements(pmt_t v);
-GRUEL_API const std::vector<std::complex<float> > c32vector_elements(pmt_t v);
-GRUEL_API const std::vector<std::complex<double> > c64vector_elements(pmt_t v);
-
-// len is in elements
-GRUEL_API const std::vector<uint8_t>  pmt_u8vector_elements(pmt_t v);
-GRUEL_API const std::vector<int8_t>   pmt_s8vector_elements(pmt_t v);
-GRUEL_API const std::vector<uint16_t> pmt_u16vector_elements(pmt_t v);
-GRUEL_API const std::vector<int16_t>  pmt_s16vector_elements(pmt_t v);
-GRUEL_API const std::vector<uint32_t> pmt_u32vector_elements(pmt_t v);
-GRUEL_API const std::vector<int32_t>  pmt_s32vector_elements(pmt_t v);
-GRUEL_API const std::vector<uint64_t> pmt_u64vector_elements(pmt_t v);
-GRUEL_API const std::vector<int64_t>  pmt_s64vector_elements(pmt_t v);
-GRUEL_API const std::vector<float>    pmt_f32vector_elements(pmt_t v);
-GRUEL_API const std::vector<double>   pmt_f64vector_elements(pmt_t v);
-GRUEL_API const std::vector<std::complex<float> > pmt_c32vector_elements(pmt_t v);
-GRUEL_API const std::vector<std::complex<double> > pmt_c64vector_elements(pmt_t v);
-
-// Return non-const pointers to the elements
-
-GRUEL_API void *uniform_vector_writable_elements(pmt_t v, size_t &len);  //< works with any; len is in bytes
-
-GRUEL_API uint8_t  *u8vector_writable_elements(pmt_t v, size_t &len);  //< len is in elements
-GRUEL_API int8_t   *s8vector_writable_elements(pmt_t v, size_t &len);  //< len is in elements
-GRUEL_API uint16_t *u16vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API int16_t  *s16vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API uint32_t *u32vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API int32_t  *s32vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API uint64_t *u64vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API int64_t  *s64vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API float    *f32vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API double   *f64vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API std::complex<float>  *c32vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
-GRUEL_API std::complex<double> *c64vector_writable_elements(pmt_t v, size_t &len); //< len is in elements
-
-/*
- * ------------------------------------------------------------------------
- *	   Dictionary (a.k.a associative array, hash, map)
- *
- * This is a functional data structure that is persistent.  Updating a
- * functional data structure does not destroy the existing version, but
- * rather creates a new version that coexists with the old.
- * ------------------------------------------------------------------------
- */
-
-//! Return true if \p obj is a dictionary
-GRUEL_API bool is_dict(const pmt_t &obj);
-
-//! Make an empty dictionary
-GRUEL_API pmt_t make_dict();
-
-//! Return a new dictionary with \p key associated with \p value.
-GRUEL_API pmt_t dict_add(const pmt_t &dict, const pmt_t &key, const pmt_t &value);
-
-//! Return a new dictionary with \p key removed.
-GRUEL_API pmt_t dict_delete(const pmt_t &dict, const pmt_t &key);
-
-//! Return true if \p key exists in \p dict
-GRUEL_API bool  dict_has_key(const pmt_t &dict, const pmt_t &key);
-
-//! If \p key exists in \p dict, return associated value; otherwise return \p not_found.
-GRUEL_API pmt_t dict_ref(const pmt_t &dict, const pmt_t &key, const pmt_t &not_found);
-
-//! Return list of (key . value) pairs
-GRUEL_API pmt_t dict_items(pmt_t dict);
-
-//! Return list of keys
-GRUEL_API pmt_t dict_keys(pmt_t dict);
-
-//! Return list of values
-GRUEL_API pmt_t dict_values(pmt_t dict);
-
-/*
- * ------------------------------------------------------------------------
- *   Any (wraps boost::any -- can be used to wrap pretty much anything)
- *
- * Cannot be serialized or used across process boundaries.
- * See http://www.boost.org/doc/html/any.html
- * ------------------------------------------------------------------------
- */
-
-//! Return true if \p obj is an any
-GRUEL_API bool is_any(pmt_t obj);
-
-//! make an any
-GRUEL_API pmt_t make_any(const boost::any &any);
-
-//! Return underlying boost::any
-GRUEL_API boost::any any_ref(pmt_t obj);
-
-//! Store \p any in \p obj
-GRUEL_API void any_set(pmt_t obj, const boost::any &any);
-
-
-/*
- * ------------------------------------------------------------------------
- *    msg_accepter -- pmt representation of gruel::msg_accepter
- * ------------------------------------------------------------------------
- */
-//! Return true if \p obj is a msg_accepter
-GRUEL_API bool is_msg_accepter(const pmt_t &obj);
-
-//! make a msg_accepter
-GRUEL_API pmt_t make_msg_accepter(boost::shared_ptr<gruel::msg_accepter> ma);
-
-//! Return underlying msg_accepter
-GRUEL_API boost::shared_ptr<gruel::msg_accepter> msg_accepter_ref(const pmt_t &obj);
-
-/*
- * ------------------------------------------------------------------------
- *			  General functions
- * ------------------------------------------------------------------------
- */
-
-//! Return true if x and y are the same object; otherwise return false.
-GRUEL_API bool eq(const pmt_t& x, const pmt_t& y);
-
-/*!
- * \brief Return true if x and y should normally be regarded as the same object, else false.
- *
- * <pre>
- * eqv returns true if:
- *   x and y are the same object.
- *   x and y are both \#t or both \#f.
- *   x and y are both symbols and their names are the same.
- *   x and y are both numbers, and are numerically equal.
- *   x and y are both the empty list (nil).
- *   x and y are pairs or vectors that denote same location in store.
- * </pre>
- */
-GRUEL_API bool eqv(const pmt_t& x, const pmt_t& y);
-
-/*!
- * pmt::equal recursively compares the contents of pairs and vectors,
- * applying pmt::eqv on other objects such as numbers and symbols.
- * pmt::equal may fail to terminate if its arguments are circular data
- * structures.
- */
-GRUEL_API bool equal(const pmt_t& x, const pmt_t& y);
-
-
-//! Return the number of elements in v
-GRUEL_API size_t length(const pmt_t& v);
-
-/*!
- * \brief Find the first pair in \p alist whose car field is \p obj
- *  and return that pair.
- *
- * \p alist (for "association list") must be a list of pairs.  If no pair
- * in \p alist has \p obj as its car then \#f is returned.
- * Uses pmt::eq to compare \p obj with car fields of the pairs in \p alist.
- */
-GRUEL_API pmt_t assq(pmt_t obj, pmt_t alist);
-
-/*!
- * \brief Find the first pair in \p alist whose car field is \p obj
- *  and return that pair.
- *
- * \p alist (for "association list") must be a list of pairs.  If no pair
- * in \p alist has \p obj as its car then \#f is returned.
- * Uses pmt::eqv to compare \p obj with car fields of the pairs in \p alist.
- */
-GRUEL_API pmt_t assv(pmt_t obj, pmt_t alist);
-
-/*!
- * \brief Find the first pair in \p alist whose car field is \p obj
- *  and return that pair.
- *
- * \p alist (for "association list") must be a list of pairs.  If no pair
- * in \p alist has \p obj as its car then \#f is returned.
- * Uses pmt::equal to compare \p obj with car fields of the pairs in \p alist.
- */
-GRUEL_API pmt_t assoc(pmt_t obj, pmt_t alist);
-
-/*!
- * \brief Apply \p proc element-wise to the elements of list and returns
- * a list of the results, in order.
- *
- * \p list must be a list.  The dynamic order in which \p proc is
- * applied to the elements of \p list is unspecified.
- */
-GRUEL_API pmt_t map(pmt_t proc(const pmt_t&), pmt_t list);
-
-/*!
- * \brief reverse \p list.
- *
- * \p list must be a proper list.
- */
-GRUEL_API pmt_t reverse(pmt_t list);
-
-/*!
- * \brief destructively reverse \p list.
- *
- * \p list must be a proper list.
- */
-GRUEL_API pmt_t reverse_x(pmt_t list);
-
-/*!
- * \brief (acons x y a) == (cons (cons x y) a)
- */
-inline static pmt_t
-acons(pmt_t x, pmt_t y, pmt_t a)
-{
-  return cons(cons(x, y), a);
-}
-
-/*!
- * \brief locates \p nth element of \n list where the car is the 'zeroth' element.
- */
-GRUEL_API pmt_t nth(size_t n, pmt_t list);
-
-/*!
- * \brief returns the tail of \p list that would be obtained by calling
- * cdr \p n times in succession.
- */
-GRUEL_API pmt_t nthcdr(size_t n, pmt_t list);
-
-/*!
- * \brief Return the first sublist of \p list whose car is \p obj.
- * If \p obj does not occur in \p list, then \#f is returned.
- * pmt::memq use pmt::eq to compare \p obj with the elements of \p list.
- */
-GRUEL_API pmt_t memq(pmt_t obj, pmt_t list);
-
-/*!
- * \brief Return the first sublist of \p list whose car is \p obj.
- * If \p obj does not occur in \p list, then \#f is returned.
- * pmt::memv use pmt::eqv to compare \p obj with the elements of \p list.
- */
-GRUEL_API pmt_t memv(pmt_t obj, pmt_t list);
-
-/*!
- * \brief Return the first sublist of \p list whose car is \p obj.
- * If \p obj does not occur in \p list, then \#f is returned.
- * pmt::member use pmt::equal to compare \p obj with the elements of \p list.
- */
-GRUEL_API pmt_t member(pmt_t obj, pmt_t list);
-
-/*!
- * \brief Return true if every element of \p list1 appears in \p list2, and false otherwise.
- * Comparisons are done with pmt::eqv.
- */
-GRUEL_API bool subsetp(pmt_t list1, pmt_t list2);
-
-/*!
- * \brief Return a list of length 1 containing \p x1
- */
-GRUEL_API pmt_t list1(const pmt_t& x1);
-
-/*!
- * \brief Return a list of length 2 containing \p x1, \p x2
- */
-GRUEL_API pmt_t list2(const pmt_t& x1, const pmt_t& x2);
-
-/*!
- * \brief Return a list of length 3 containing \p x1, \p x2, \p x3
- */
-GRUEL_API pmt_t list3(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3);
-
-/*!
- * \brief Return a list of length 4 containing \p x1, \p x2, \p x3, \p x4
- */
-GRUEL_API pmt_t list4(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4);
-
-/*!
- * \brief Return a list of length 5 containing \p x1, \p x2, \p x3, \p x4, \p x5
- */
-GRUEL_API pmt_t list5(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4, const pmt_t& x5);
-
-/*!
- * \brief Return a list of length 6 containing \p x1, \p x2, \p x3, \p x4, \p
- * x5, \p x6
- */
-GRUEL_API pmt_t list6(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4, const pmt_t& x5, const pmt_t& x6);
-
-/*!
- * \brief Return \p list with \p item added to it.
- */
-GRUEL_API pmt_t list_add(pmt_t list, const pmt_t& item);
-
-/*!
- * \brief Return \p list with \p item removed from it.
- */
-GRUEL_API pmt_t list_rm(pmt_t list, const pmt_t& item);
-
-/*!
- * \brief Return bool of \p list contains \p item
- */
-GRUEL_API bool list_has(pmt_t list, const pmt_t& item);
-
-
-/*
- * ------------------------------------------------------------------------
- *			     read / write
- * ------------------------------------------------------------------------
- */
-extern GRUEL_API const pmt_t PMT_EOF;	//< The end of file object
-
-//! return true if obj is the EOF object, otherwise return false.
-GRUEL_API bool is_eof_object(pmt_t obj);
-
-/*!
- * read converts external representations of pmt objects into the
- * objects themselves.  Read returns the next object parsable from
- * the given input port, updating port to point to the first
- * character past the end of the external representation of the
- * object.
- *
- * If an end of file is encountered in the input before any
- * characters are found that can begin an object, then an end of file
- * object is returned.   The port remains open, and further attempts
- * to read will also return an end of file object.  If an end of file
- * is encountered after the beginning of an object's external
- * representation, but the external representation is incomplete and
- * therefore not parsable, an error is signaled.
- */
-GRUEL_API pmt_t read(std::istream &port);
-
-/*!
- * Write a written representation of \p obj to the given \p port.
- */
-GRUEL_API void write(pmt_t obj, std::ostream &port);
-
-/*!
- * Return a string representation of \p obj.
- * This is the same output as would be generated by pmt::write.
- */
-GRUEL_API std::string write_string(pmt_t obj);
-
-
-GRUEL_API std::ostream& operator<<(std::ostream &os, pmt_t obj);
-
-/*!
- * \brief Write pmt string representation to stdout.
- */
-GRUEL_API void print(pmt_t v);
-
-
-/*
- * ------------------------------------------------------------------------
- *		      portable byte stream representation
- * ------------------------------------------------------------------------
- */
-/*!
- * \brief Write portable byte-serial representation of \p obj to \p sink
- */
-GRUEL_API bool serialize(pmt_t obj, std::streambuf &sink);
-
-/*!
- * \brief Create obj from portable byte-serial representation
- */
-GRUEL_API pmt_t deserialize(std::streambuf &source);
-
-
-GRUEL_API void dump_sizeof();	// debugging
-
-/*!
- * \brief Provide a simple string generating interface to pmt's serialize function
- */
-GRUEL_API std::string serialize_str(pmt_t obj);
-
-/*!
- * \brief Provide a simple string generating interface to pmt's deserialize function
- */
-GRUEL_API pmt_t deserialize_str(std::string str);
-
-/*!
- * \brief Provide a comparator function object to allow pmt use in stl types
- */
-class comperator {
-    public:
-        bool operator()(pmt::pmt_t const& p1, pmt::pmt_t const& p2) const
-            { return pmt::eqv(p1,p2)?false:p1.get()>p2.get(); }
-    };
-
-} /* namespace pmt */
-
-#include <gruel/pmt_sugar.h>
-
-#endif /* INCLUDED_PMT_H */
diff --git a/gruel/src/include/gruel/pmt_pool.h b/gruel/src/include/gruel/pmt_pool.h
deleted file mode 100644
index 93c5290ad5..0000000000
--- a/gruel/src/include/gruel/pmt_pool.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_PMT_POOL_H
-#define INCLUDED_PMT_POOL_H
-
-#include <gruel/api.h>
-#include <cstddef>
-#include <vector>
-#include <boost/thread.hpp>
-
-namespace pmt {
-
-/*!
- * \brief very simple thread-safe fixed-size allocation pool
- *
- * FIXME may want to go to global allocation with per-thread free list.
- * This would eliminate virtually all lock contention.
- */
-class GRUEL_API pmt_pool {
-
-  struct GRUEL_API item {
-    struct item	*d_next;
-  };
-
-  typedef boost::unique_lock<boost::mutex>  scoped_lock;
-  mutable boost::mutex 		d_mutex;
-  boost::condition_variable	d_cond;
-
-  size_t	      d_itemsize;
-  size_t	      d_alignment;
-  size_t	      d_allocation_size;
-  size_t	      d_max_items;
-  size_t	      d_n_items;
-  item	       	     *d_freelist;
-  std::vector<char *> d_allocations;
-
-public:
-  /*!
-   * \param itemsize size in bytes of the items to be allocated.
-   * \param alignment alignment in bytes of all objects to be allocated (must be power-of-2).
-   * \param allocation_size number of bytes to allocate at a time from the underlying allocator.
-   * \param max_items is the maximum number of items to allocate.  If this number is exceeded,
-   *	      the allocate blocks.  0 implies no limit.
-   */
-  pmt_pool(size_t itemsize, size_t alignment = 16,
-	   size_t allocation_size = 4096, size_t max_items = 0);
-  ~pmt_pool();
-
-  void *malloc();
-  void free(void *p);
-};
-
-} /* namespace pmt */
-
-#endif /* INCLUDED_PMT_POOL_H */
diff --git a/gruel/src/include/gruel/pmt_sugar.h b/gruel/src/include/gruel/pmt_sugar.h
deleted file mode 100644
index 7791bcce6a..0000000000
--- a/gruel/src/include/gruel/pmt_sugar.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_GRUEL_PMT_SUGAR_H
-#define INCLUDED_GRUEL_PMT_SUGAR_H
-
-/*!
- * This file is included by pmt.h and contains pseudo-constructor
- * shorthand for making pmt objects
- */
-
-namespace pmt {
-
-  //! Make pmt symbol
-  static inline pmt_t
-  mp(const std::string &s)
-  {
-    return string_to_symbol(s);
-  }
-
-  //! Make pmt symbol
-  static inline pmt_t
-  mp(const char *s)
-  {
-    return string_to_symbol(s);
-  }
-
-  //! Make pmt long
-  static inline pmt_t
-  mp(long x){
-    return from_long(x);
-  }
-
-  //! Make pmt long
-  static inline pmt_t
-  mp(long long unsigned x){
-    return from_long(x);
-  }
-
-  //! Make pmt long
-  static inline pmt_t
-  mp(int x){
-    return from_long(x);
-  }
-
-  //! Make pmt double
-  static inline pmt_t
-  mp(double x){
-    return from_double(x);
-  }
-
-  //! Make pmt complex
-  static inline pmt_t
-  mp(std::complex<double> z)
-  {
-    return make_rectangular(z.real(), z.imag());
-  }
-
-  //! Make pmt complex
-  static inline pmt_t
-  mp(std::complex<float> z)
-  {
-    return make_rectangular(z.real(), z.imag());
-  }
-
-  //! Make pmt msg_accepter
-  static inline pmt_t
-  mp(boost::shared_ptr<gruel::msg_accepter> ma)
-  {
-    return make_msg_accepter(ma);
-  }
-
-  //! Make pmt Binary Large Object (BLOB)
-  static inline pmt_t
-  mp(const void *data, size_t len_in_bytes)
-  {
-    return make_blob(data, len_in_bytes);
-  }
-
-  //! Make tuple
-  static inline pmt_t
-  mp(const pmt_t &e0)
-  {
-    return make_tuple(e0);
-  }
-
-  //! Make tuple
-  static inline pmt_t
-  mp(const pmt_t &e0, const pmt_t &e1)
-  {
-    return make_tuple(e0, e1);
-  }
-
-  //! Make tuple
-  static inline pmt_t
-  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2)
-  {
-    return make_tuple(e0, e1, e2);
-  }
-
-  //! Make tuple
-  static inline pmt_t
-  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3)
-  {
-    return make_tuple(e0, e1, e2, e3);
-  }
-
-  //! Make tuple
-  static inline pmt_t
-  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4)
-  {
-    return make_tuple(e0, e1, e2, e3, e4);
-  }
-
-  //! Make tuple
-  static inline pmt_t
-  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5)
-  {
-    return make_tuple(e0, e1, e2, e3, e4, e5);
-  }
-
-  //! Make tuple
-  static inline pmt_t
-  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6)
-  {
-    return make_tuple(e0, e1, e2, e3, e4, e5, e6);
-  }
-
-  //! Make tuple
-  static inline pmt_t
-  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7)
-  {
-    return make_tuple(e0, e1, e2, e3, e4, e5, e6, e7);
-  }
-
-  //! Make tuple
-  static inline pmt_t
-  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8)
-  {
-    return make_tuple(e0, e1, e2, e3, e4, e5, e6, e7, e8);
-  }
-
-  //! Make tuple
-  static inline pmt_t
-  mp(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8, const pmt_t &e9)
-  {
-    return make_tuple(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9);
-  }
-
-
-} /* namespace pmt */
-
-
-#endif /* INCLUDED_GRUEL_PMT_SUGAR_H */
diff --git a/gruel/src/include/gruel/realtime.h b/gruel/src/include/gruel/realtime.h
deleted file mode 100644
index 13673ecb36..0000000000
--- a/gruel/src/include/gruel/realtime.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2008 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GRUEL_REALTIME_H
-#define INCLUDED_GRUEL_REALTIME_H
-
-#include <gruel/api.h>
-#include <stdexcept>
-
-/*!
- * \brief System independent way to ask for realtime scheduling
- *
- * \sa sys_pri.h
- */
-
-namespace gruel {
-
-  typedef enum {
-    RT_OK = 0,
-    RT_NOT_IMPLEMENTED,
-    RT_NO_PRIVS,
-    RT_OTHER_ERROR
-  } rt_status_t;
-
-
-  enum rt_sched_policy {
-    RT_SCHED_RR   = 0,		// round robin
-    RT_SCHED_FIFO = 1,		// first in first out
-  };
-
-  /*
-   * Define the range for our virtual priorities (don't change these)
-   *
-   * Processes (or threads) with numerically higher priority values
-   * are scheduled before processes with numerically lower priority
-   * values.  Thus, the value returned by rt_priority_max() will be
-   * greater than the value returned by rt_priority_min().
-   */
-  static inline int rt_priority_min() { return  0; }
-  static inline int rt_priority_max() { return 15; }
-  static inline int rt_priority_default() { return 1; }
-
-  struct GRUEL_API rt_sched_param {
-    int			priority;
-    rt_sched_policy	policy;
-
-    rt_sched_param()
-      : priority(rt_priority_default()), policy(RT_SCHED_RR){}
-
-    rt_sched_param(int priority_, rt_sched_policy policy_ = RT_SCHED_RR)
-    {
-      if (priority_ < rt_priority_min() || priority_ > rt_priority_max())
-	throw std::invalid_argument("rt_sched_param: priority out of range");
-
-      priority = priority_;
-      policy = policy_;
-    }
-  };
-
-  /*!
-   * \brief If possible, enable "realtime" scheduling.
-   * \ingroup misc
-   *
-   * In general, this means that the code will be scheduled before any
-   * non-realtime (normal) processes.  Note that if your code contains
-   * an non-blocking infinite loop and you enable realtime scheduling,
-   * it's possible to hang the system.
-   */
-
-  // NOTE: If you change this, you need to change the code in
-  // gnuradio-core/src/lib/runtime/gr_realtime.i, see note there.
-  rt_status_t
-  GRUEL_API enable_realtime_scheduling(rt_sched_param = rt_sched_param());
-
-} // namespace gruel
-
-#endif /* INCLUDED_GRUEL_REALTIME_H */
diff --git a/gruel/src/include/gruel/sys_pri.h b/gruel/src/include/gruel/sys_pri.h
deleted file mode 100644
index c0751e52c2..0000000000
--- a/gruel/src/include/gruel/sys_pri.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef INCLUDED_GRUEL_SYS_PRI_H
-#define INCLUDED_GRUEL_SYS_PRI_H
-
-#include <gruel/api.h>
-#include <gruel/realtime.h>
-
-/*
- * A single place to define real-time priorities used by the system itself
- */
-namespace gruel {
-
-  struct GRUEL_API sys_pri {
-    static rt_sched_param python();		  // python code
-    static rt_sched_param normal();		  // normal blocks
-    static rt_sched_param gcell_event_handler();
-    static rt_sched_param usrp2_backend();	  // thread that services the ethernet
-  };
-
-}
-
-#endif /* INCLUDED_GRUEL_SYS_PRI_H */
diff --git a/gruel/src/include/gruel/thread.h b/gruel/src/include/gruel/thread.h
deleted file mode 100644
index 10c6c38ccc..0000000000
--- a/gruel/src/include/gruel/thread.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009-2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_THREAD_H
-#define INCLUDED_THREAD_H
-
-#include <gruel/api.h>
-#include <boost/thread/thread.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/locks.hpp>
-#include <boost/thread/condition_variable.hpp>
-#include <vector>
-
-#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
-
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-
-#include <windows.h>
-
-#endif
-
-namespace gruel {
-
-  typedef boost::thread                    thread;
-  typedef boost::mutex                     mutex;
-  typedef boost::unique_lock<boost::mutex> scoped_lock;
-  typedef boost::condition_variable        condition_variable;
-
-  /*! \brief a system-dependent typedef for the underlying thread type.
-   */
-#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
-  typedef HANDLE gr_thread_t;
-#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
-  typedef pthread_t gr_thread_t;
-#else
-  typedef pthread_t gr_thread_t;
-#endif
-
-  /*! \brief Get the current thread's ID as a gr_thread_t
-   *
-   * We use this when setting the thread affinity or any other
-   * low-level thread settings. Can be called withing a GNU Radio
-   * block to get a reference to its current thread ID.
-   */
-  GRUEL_API gr_thread_t get_current_thread_id();
-
-  /*! \brief Bind the current thread to a set of cores.
-   *
-   * Wrapper for system-dependent calls to set the affinity of the
-   * current thread to the processor mask. The mask is simply a
-   * 1-demensional vector containing the processor or core number from
-   * 0 to N-1 for N cores.
-   *
-   * Note: this does not work on OSX; it is a nop call since OSX does
-   * not support the concept of thread affinity (and what they do
-   * support in this way since 10.5 is not what we want or can use in
-   * this fashion).
-   */
-  GRUEL_API void thread_bind_to_processor(const std::vector<int> &mask);
-
-  /*! \brief Convineince function to bind the current thread to a single core.
-   *
-   * Wrapper for system-dependent calls to set the affinity of the
-   * current thread to a given core from 0 to N-1 for N cores.
-   *
-   * Note: this does not work on OSX; it is a nop call since OSX does
-   * not support the concept of thread affinity (and what they do
-   * support in this way since 10.5 is not what we want or can use in
-   * this fashion).
-   */
-  GRUEL_API void thread_bind_to_processor(int n);
-
-  /*! \brief Bind a thread to a set of cores.
-   *
-   * Wrapper for system-dependent calls to set the affinity of the
-   * given thread ID to the processor mask. The mask is simply a
-   * 1-demensional vector containing the processor or core number from
-   * 0 to N-1 for N cores.
-   *
-   * Note: this does not work on OSX; it is a nop call since OSX does
-   * not support the concept of thread affinity (and what they do
-   * support in this way since 10.5 is not what we want or can use in
-   * this fashion).
-   */
-  GRUEL_API void thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask);
-
-
-  /*! \brief Convineince function to bind the a thread to a single core.
-   *
-   * Wrapper for system-dependent calls to set the affinity of the
-   * given thread ID to a given core from 0 to N-1 for N cores.
-   *
-   * Note: this does not work on OSX; it is a nop call since OSX does
-   * not support the concept of thread affinity (and what they do
-   * support in this way since 10.5 is not what we want or can use in
-   * this fashion).
-   */
-  GRUEL_API void thread_bind_to_processor(gr_thread_t thread, unsigned int n);
-
-  /*! \brief Remove any thread-processor affinity for the current thread.
-   *
-   * Note: this does not work on OSX; it is a nop call since OSX does
-   * not support the concept of thread affinity (and what they do
-   * support in this way since 10.5 is not what we want or can use in
-   * this fashion).
-   */
-  GRUEL_API void thread_unbind();
-
-  /*! \brief Remove any thread-processor affinity for a given thread ID.
-   *
-   * Note: this does not work on OSX; it is a nop call since OSX does
-   * not support the concept of thread affinity (and what they do
-   * support in this way since 10.5 is not what we want or can use in
-   * this fashion).
-   */
-  GRUEL_API void thread_unbind(gr_thread_t thread);
-
-} /* namespace gruel */
-
-#endif /* INCLUDED_THREAD_H */
diff --git a/gruel/src/include/gruel/thread_body_wrapper.h b/gruel/src/include/gruel/thread_body_wrapper.h
deleted file mode 100644
index e09a43e684..0000000000
--- a/gruel/src/include/gruel/thread_body_wrapper.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_THREAD_BODY_WRAPPER_H
-#define INCLUDED_THREAD_BODY_WRAPPER_H
-
-#include <gruel/api.h>
-#include <gruel/thread.h>
-#include <exception>
-#include <iostream>
-
-namespace gruel
-{
-
-  GRUEL_API void mask_signals();
-
-  template <class F>
-  class thread_body_wrapper
-  {
-    F 		d_f;
-    std::string d_name;
-
-  public:
-
-    explicit thread_body_wrapper(F f, const std::string &name="")
-      : d_f(f), d_name(name) {}
-
-    void operator()()
-    {
-      mask_signals();
-
-      try {
-	d_f();
-      }
-      catch(boost::thread_interrupted const &)
-      {
-      }
-      catch(std::exception const &e)
-      {
-	std::cerr << "thread[" << d_name << "]: "
-		  << e.what() << std::endl;
-      }
-      catch(...)
-      {
-	std::cerr << "thread[" << d_name << "]: "
-		  << "caught unrecognized exception\n";
-      }
-    }
-  };
-}
-
-#endif /* INCLUDED_THREAD_BODY_WRAPPER_H */
diff --git a/gruel/src/include/gruel/thread_group.h b/gruel/src/include/gruel/thread_group.h
deleted file mode 100644
index 1b8a0a4bfb..0000000000
--- a/gruel/src/include/gruel/thread_group.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright (C) 2001-2003 William E. Kempf
- * Copyright (C) 2007 Anthony Williams
- * Copyright 2008,2009 Free Software Foundation, Inc.
- *
- *  Distributed under the Boost Software License, Version 1.0. (See accompanying
- *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- */
-
-/*
- * This was extracted from Boost 1.35.0 and fixed.
- */
-
-#ifndef INCLUDED_GRUEL_THREAD_GROUP_H
-#define INCLUDED_GRUEL_THREAD_GROUP_H
-
-#include <gruel/api.h>
-#include <gruel/thread.h>
-#include <boost/utility.hpp>
-#include <boost/thread/shared_mutex.hpp>
-#include <boost/function.hpp>
-
-namespace gruel
-{
-  class GRUEL_API thread_group : public boost::noncopyable
-  {
-  public:
-    thread_group();
-    ~thread_group();
-
-    boost::thread* create_thread(const boost::function0<void>& threadfunc);
-    void add_thread(boost::thread* thrd);
-    void remove_thread(boost::thread* thrd);
-    void join_all();
-    void interrupt_all();
-    size_t size() const;
-
-  private:
-    std::list<boost::thread*> m_threads;
-    mutable boost::shared_mutex m_mutex;
-  };
-}
-
-#endif /* INCLUDED_GRUEL_THREAD_GROUP_H */
diff --git a/gruel/src/lib/CMakeLists.txt b/gruel/src/lib/CMakeLists.txt
index a3baa4fa5c..fc51c8f927 100644
--- a/gruel/src/lib/CMakeLists.txt
+++ b/gruel/src/lib/CMakeLists.txt
@@ -59,14 +59,12 @@ GR_ADD_COND_DEF(HAVE_SCHED_SETSCHEDULER)
 # Include subdirs rather to populate to the sources lists.
 ########################################################################
 GR_INCLUDE_SUBDIRECTORY(msg)
-GR_INCLUDE_SUBDIRECTORY(pmt)
 
 ########################################################################
 # Setup the include and linker paths
 ########################################################################
 include_directories(
 	${CMAKE_CURRENT_SOURCE_DIR}
-	${GRUEL_INCLUDE_DIRS}
 	${Boost_INCLUDE_DIRS}
 )
 link_directories(${Boost_LIBRARY_DIRS})
diff --git a/gruel/src/lib/msg/CMakeLists.txt b/gruel/src/lib/msg/CMakeLists.txt
deleted file mode 100644
index b8167fff34..0000000000
--- a/gruel/src/lib/msg/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-########################################################################
-# This file included, use CMake directory variables
-########################################################################
-
-list(APPEND gruel_sources
-    ${CMAKE_CURRENT_SOURCE_DIR}/msg_accepter.cc
-    ${CMAKE_CURRENT_SOURCE_DIR}/msg_accepter_msgq.cc
-    ${CMAKE_CURRENT_SOURCE_DIR}/msg_producer.cc
-    ${CMAKE_CURRENT_SOURCE_DIR}/msg_queue.cc
-)
diff --git a/gruel/src/lib/msg/msg_accepter.cc b/gruel/src/lib/msg/msg_accepter.cc
deleted file mode 100644
index 5acd98aa22..0000000000
--- a/gruel/src/lib/msg/msg_accepter.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gruel/msg_accepter.h>
-
-namespace gruel {
-
-  msg_accepter::~msg_accepter()
-  {
-    // NOP, required as virtual destructor
-  }
-
-} /* namespace gruel */
diff --git a/gruel/src/lib/msg/msg_accepter_msgq.cc b/gruel/src/lib/msg/msg_accepter_msgq.cc
deleted file mode 100644
index 2ae3537b8c..0000000000
--- a/gruel/src/lib/msg/msg_accepter_msgq.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gruel/msg_accepter_msgq.h>
-
-using namespace pmt;
-
-namespace gruel {
-
-  msg_accepter_msgq::msg_accepter_msgq(msg_queue_sptr msgq)
-    : d_msg_queue(msgq)
-  {
-  }
-
-  msg_accepter_msgq::~msg_accepter_msgq()
-  {
-    // NOP, required as virtual destructor
-  }
-
-  void
-  msg_accepter_msgq::post(pmt_t msg)
-  {
-    d_msg_queue->insert_tail(msg);
-  }
-
-} /* namespace gruel */
diff --git a/gruel/src/lib/msg/msg_producer.cc b/gruel/src/lib/msg/msg_producer.cc
deleted file mode 100644
index 3e8148763b..0000000000
--- a/gruel/src/lib/msg/msg_producer.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gruel/msg_producer.h>
-
-namespace gruel {
-
-  msg_producer::~msg_producer()
-  {
-    // NOP, required as virtual destructor
-  }
-
-} /* namespace gruel */
diff --git a/gruel/src/lib/msg/msg_queue.cc b/gruel/src/lib/msg/msg_queue.cc
deleted file mode 100644
index a0b120e40d..0000000000
--- a/gruel/src/lib/msg/msg_queue.cc
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gruel/msg_queue.h>
-#include <stdexcept>
-
-using namespace pmt;
-
-namespace gruel {
-
-  msg_queue_sptr
-  make_msg_queue(unsigned int limit)
-  {
-    return msg_queue_sptr(new msg_queue(limit));
-  }
-
-  msg_queue::msg_queue(unsigned int limit)
-    : d_limit(limit)
-  {
-  }
-
-  msg_queue::~msg_queue()
-  {
-    flush();
-  }
-
-  void
-  msg_queue::insert_tail(pmt_t msg)
-  {
-    gruel::scoped_lock guard(d_mutex);
-
-    while (full_p())
-      d_not_full.wait(guard);
-
-    d_msgs.push_back(msg);
-    d_not_empty.notify_one();
-  }
-
-  pmt_t
-  msg_queue::delete_head()
-  {
-    gruel::scoped_lock guard(d_mutex);
-
-    while (empty_p())
-      d_not_empty.wait(guard);
-
-    pmt_t m(d_msgs.front());
-    d_msgs.pop_front();
-
-    if (d_limit > 0)		// Unlimited length queues never block on write
-      d_not_full.notify_one();
-
-    return m;
-  }
-
-  pmt_t
-  msg_queue::delete_head_nowait()
-  {
-    gruel::scoped_lock guard(d_mutex);
-
-    if (empty_p())
-      return pmt_t();
-
-    pmt_t m(d_msgs.front());
-    d_msgs.pop_front();
-
-    if (d_limit > 0)		// Unlimited length queues never block on write
-      d_not_full.notify_one();
-
-    return m;
-  }
-
-  void
-  msg_queue::flush()
-  {
-    while (delete_head_nowait() != pmt_t())
-      ;
-  }
-
-} /* namespace gruel */
diff --git a/gruel/src/lib/pmt/CMakeLists.txt b/gruel/src/lib/pmt/CMakeLists.txt
deleted file mode 100644
index 6ea616e107..0000000000
--- a/gruel/src/lib/pmt/CMakeLists.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 2010-2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-########################################################################
-# This file included, use CMake directory variables
-########################################################################
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-
-########################################################################
-# Generate serial tags header file
-########################################################################
-
-get_filename_component(PMT_SERIAL_TAGS_H
-    ${CMAKE_CURRENT_BINARY_DIR}/../../include/gruel/pmt_serial_tags.h ABSOLUTE
-)
-
-add_custom_command(
-    OUTPUT ${PMT_SERIAL_TAGS_H}
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gen-serial-tags.py
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/pmt-serial-tags.scm
-    COMMAND ${PYTHON_EXECUTABLE}
-        ${CMAKE_CURRENT_SOURCE_DIR}/gen-serial-tags.py
-        ${CMAKE_CURRENT_SOURCE_DIR}/pmt-serial-tags.scm
-        ${PMT_SERIAL_TAGS_H}
-)
-
-install(
-    FILES ${PMT_SERIAL_TAGS_H}
-    DESTINATION ${GR_INCLUDE_DIR}/gruel
-    COMPONENT "gruel_devel"
-)
-
-include(AddFileDependencies)
-ADD_FILE_DEPENDENCIES(
-    ${CMAKE_CURRENT_SOURCE_DIR}/pmt_serialize.cc
-    ${PMT_SERIAL_TAGS_H}
-)
-
-add_custom_target(pmt_generated DEPENDS ${PMT_SERIAL_TAGS_H})
-
-########################################################################
-# Generate other pmt stuff
-########################################################################
-add_custom_command(
-    OUTPUT
-        ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv_int.h
-        ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.h
-        ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv.cc
-        ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.cc
-    DEPENDS
-        ${CMAKE_CURRENT_SOURCE_DIR}/generate_unv.py
-        ${CMAKE_CURRENT_SOURCE_DIR}/unv_template.h.t
-        ${CMAKE_CURRENT_SOURCE_DIR}/unv_template.cc.t
-        ${CMAKE_CURRENT_SOURCE_DIR}/unv_qa_template.cc.t
-    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} -c
-    \"import os,sys\;srcdir='${CMAKE_CURRENT_SOURCE_DIR}'\;sys.path.append(srcdir)\;os.environ['srcdir']=srcdir\;from generate_unv import main\;main()\"
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)
-
-list(APPEND gruel_sources
-    ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv.cc
-    ${CMAKE_CURRENT_SOURCE_DIR}/pmt.cc
-    ${CMAKE_CURRENT_SOURCE_DIR}/pmt_io.cc
-    ${CMAKE_CURRENT_SOURCE_DIR}/pmt_pool.cc
-    ${CMAKE_CURRENT_SOURCE_DIR}/pmt_serialize.cc
-)
-
-list(APPEND test_gruel_sources
-    ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.cc
-    ${CMAKE_CURRENT_SOURCE_DIR}/qa_pmt_prims.cc
-    ${CMAKE_CURRENT_SOURCE_DIR}/qa_pmt.cc
-)
diff --git a/gruel/src/lib/pmt/gen-serial-tags.py b/gruel/src/lib/pmt/gen-serial-tags.py
deleted file mode 100644
index 18e927beb5..0000000000
--- a/gruel/src/lib/pmt/gen-serial-tags.py
+++ /dev/null
@@ -1,53 +0,0 @@
-"""
-//
-// Copyright 2011 Free Software Foundation, Inc.
-//
-// This file is part of GNU Radio
-//
-// GNU Radio is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// GNU Radio is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-//
-// THIS FILE IS MACHINE GENERATED FROM %s. DO NOT EDIT BY HAND.
-// See %s for additional commentary.
-//
-
-#ifndef INCLUDED_PMT_SERIAL_TAGS_H
-#define INCLUDED_PMT_SERIAL_TAGS_H
-
-enum pst_tags {
-%s
-};
-#endif /* INCLUDED_PMT_SERIAL_TAGS_H */
-"""
-
-import sys, os, re
-
-if __name__ == '__main__':
-    if len(sys.argv) != 3:
-        print "Usage %s <input_scm_file> <output_hdr_file>"%__file__
-        exit()
-    input_scm_file, output_hdr_file = sys.argv[1:]
-    enums = list()
-    for line in open(input_scm_file).readlines():
-        match = re.match('^\s*\(define\s+([\w|-]+)\s+#x([0-9a-fA-F]+)\)', line)
-        if not match: continue
-        name, value = match.groups()
-        name = name.upper().replace('-', '_')
-        enums.append('    %s = 0x%s'%(name, value))
-    open(output_hdr_file, 'w').write(__doc__%(
-        os.path.basename(__file__),
-        os.path.basename(input_scm_file),
-        ',\n'.join(enums),
-    ))
diff --git a/gruel/src/lib/pmt/generate_unv.py b/gruel/src/lib/pmt/generate_unv.py
deleted file mode 100755
index 42b57e2454..0000000000
--- a/gruel/src/lib/pmt/generate_unv.py
+++ /dev/null
@@ -1,190 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006,2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""
-Generate code for uniform numeric vectors
-"""
-
-import re, os, os.path
-
-
-unv_types = (
-    ('u8', 'uint8_t'),
-    ('s8', 'int8_t'),
-    ('u16', 'uint16_t'),
-    ('s16', 'int16_t'),
-    ('u32', 'uint32_t'),
-    ('s32', 'int32_t'),
-    ('u64', 'uint64_t'),
-    ('s64', 'int64_t'),
-    ('f32', 'float'),
-    ('f64', 'double'),
-    ('c32', 'std::complex<float>'),
-    ('c64', 'std::complex<double>')
-    )
-
-header = """\
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-"""
-
-guard_tail = """
-#endif
-"""
-
-includes = """
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <vector>
-#include <gruel/pmt.h>
-#include "pmt_int.h"
-"""
-
-qa_includes = """
-#include <qa_pmt_unv.h>
-#include <cppunit/TestAssert.h>
-#include <gruel/pmt.h>
-#include <stdio.h>
-
-using namespace pmt;
-"""
-
-
-# set srcdir to the directory that contains Makefile.am
-try:
-    srcdir = os.environ['srcdir']
-except KeyError, e:
-    srcdir = "."
-srcdir = srcdir + '/'
-
-
-def open_src (name, mode):
-    global srcdir
-    return open(os.path.join (srcdir, name), mode)
-
-
-def guard_name(filename):
-    return 'INCLUDED_' + re.sub('\.', '_', filename.upper())
-
-def guard_head(filename):
-    guard = guard_name(filename)
-    return """
-#ifndef %s
-#define %s
-""" % (guard, guard)
-
-
-def do_substitution (d, input, out_file):
-    def repl (match_obj):
-        key = match_obj.group (1)
-        # print key
-        return d[key]
-
-    out = re.sub (r"@([a-zA-Z0-9_]+)@", repl, input)
-    out_file.write (out)
-
-
-def generate_h():
-    template = open_src('unv_template.h.t', 'r').read()
-    output_filename = 'pmt_unv_int.h'
-    output = open(output_filename, 'w')
-    output.write(header)
-    output.write(guard_head(output_filename))
-    for tag, typ in unv_types:
-        d = { 'TAG' : tag, 'TYPE' : typ }
-        do_substitution(d, template, output)
-    output.write(guard_tail)
-
-def generate_cc():
-    template = open_src('unv_template.cc.t', 'r').read()
-    output = open('pmt_unv.cc', 'w')
-    output.write(header)
-    output.write(includes)
-    for tag, typ in unv_types:
-        d = { 'TAG' : tag, 'TYPE' : typ }
-        do_substitution(d, template, output)
-
-
-def generate_qa_h():
-    output_filename = 'qa_pmt_unv.h'
-    output = open(output_filename, 'w')
-    output.write(header)
-    output.write(guard_head(output_filename))
-
-    output.write('''
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/TestCase.h>
-
-class qa_pmt_unv : public CppUnit::TestCase {
-
-  CPPUNIT_TEST_SUITE(qa_pmt_unv);
-''')
-    for tag, typ in unv_types:
-        output.write('  CPPUNIT_TEST(test_%svector);\n' % (tag,))
-    output.write('''\
-  CPPUNIT_TEST_SUITE_END();
-
- private:
-''')
-    for tag, typ in unv_types:
-        output.write('  void test_%svector();\n' % (tag,))
-    output.write('};\n')
-    output.write(guard_tail)
-
-def generate_qa_cc():
-    template = open_src('unv_qa_template.cc.t', 'r').read()
-    output = open('qa_pmt_unv.cc', 'w')
-    output.write(header)
-    output.write(qa_includes)
-    for tag, typ in unv_types:
-        d = { 'TAG' : tag, 'TYPE' : typ }
-        do_substitution(d, template, output)
-
-
-def main():
-    generate_h()
-    generate_cc()
-    generate_qa_h()
-    generate_qa_cc()
-
-if __name__ == '__main__':
-    main()
diff --git a/gruel/src/lib/pmt/pmt-serial-tags.scm b/gruel/src/lib/pmt/pmt-serial-tags.scm
deleted file mode 100644
index 4f06bf75f8..0000000000
--- a/gruel/src/lib/pmt/pmt-serial-tags.scm
+++ /dev/null
@@ -1,77 +0,0 @@
-;;; -*-scheme-*-
-;;;
-;;; Copyright 2007 Free Software Foundation, Inc.
-;;;
-;;; This file is part of GNU Radio
-;;;
-;;; GNU Radio is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3, or (define at your option)
-;;; any later version.
-;;;
-;;; GNU Radio is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License along
-;;; with this program; if not, write to the Free Software Foundation, Inc.,
-;;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;;
-
-;;; definitions of tag values used for marshalling pmt data
-
-(define pst-true		#x00)
-(define pst-false		#x01)
-(define pst-symbol		#x02)   ; untagged-int16 n; followed by n bytes of symbol name
-(define pst-int32		#x03)
-(define pst-double		#x04)
-(define pst-complex		#x05)   ; complex<double>: real, imag
-(define pst-null		#x06)
-(define pst-pair		#x07)   ; followed by two objects
-(define pst-vector		#x08)   ; untagged-int32 n; followed by n objects
-(define pst-dict		#x09)   ; untagged-int32 n; followed by n key/value tuples
-
-(define pst-uniform-vector	#x0a)
-(define pst-uint64	#x0b)
-(define pst-tuple	#x0c)
-
-;; u8, s8, u16, s16, u32, s32, u64, s64, f32, f64, c32, c64
-;;
-;;   untagged-uint8  tag
-;;   untagged-uint8  uvi (define uniform vector info, see below)
-;;   untagged-int32  n-items
-;;   untagged-uint8  npad
-;;   npad bytes of zeros to align binary data
-;;   n-items binary numeric items
-;;
-;; uvi:
-;; +-+-+-+-+-+-+-+-+
-;; |B|   subtype   |
-;; +-+-+-+-+-+-+-+-+
-;;
-;; B == 0, numeric data is little-endian.
-;; B == 1, numeric data is big-endian.
-
-    (define uvi-endian-mask     #x80)
-    (define uvi-subtype-mask    #x7f)
-
-    (define uvi-little-endian   #x00)
-    (define uvi-big-endian      #x80)
-
-    (define uvi-u8		#x00)
-    (define uvi-s8		#x01)
-    (define uvi-u16		#x02)
-    (define uvi-s16		#x03)
-    (define uvi-u32		#x04)
-    (define uvi-s32		#x05)
-    (define uvi-u64		#x06)
-    (define uvi-s64		#x07)
-    (define uvi-f32		#x08)
-    (define uvi-f64		#x09)
-    (define uvi-c32		#x0a)
-    (define uvi-c64		#x0b)
-
-
-(define pst-comment		#x3b)	; ascii ';'
-(define pst-comment-end		#x0a)	; ascii '\n'
diff --git a/gruel/src/lib/pmt/pmt.cc b/gruel/src/lib/pmt/pmt.cc
deleted file mode 100644
index 8ea0e76143..0000000000
--- a/gruel/src/lib/pmt/pmt.cc
+++ /dev/null
@@ -1,1435 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2009,2010 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <vector>
-#include <gruel/pmt.h>
-#include "pmt_int.h"
-#include <gruel/msg_accepter.h>
-#include <gruel/pmt_pool.h>
-#include <stdio.h>
-#include <string.h>
-
-namespace pmt {
-
-static const int CACHE_LINE_SIZE = 64;		// good guess
-
-# if (PMT_LOCAL_ALLOCATOR)
-
-static pmt_pool global_pmt_pool(sizeof(pmt_pair), CACHE_LINE_SIZE);
-
-void *
-pmt_base::operator new(size_t size)
-{
-  void *p = global_pmt_pool.malloc();
-
-  // fprintf(stderr, "pmt_base::new p = %p\n", p);
-  assert((reinterpret_cast<intptr_t>(p) & (CACHE_LINE_SIZE - 1)) == 0);
-  return p;
-}
-
-void
-pmt_base::operator delete(void *p, size_t size)
-{
-  global_pmt_pool.free(p);
-}
-
-#endif
-
-void intrusive_ptr_add_ref(pmt_base* p) { ++(p->count_); }
-void intrusive_ptr_release(pmt_base* p) { if (--(p->count_) == 0 ) delete p; }
-
-pmt_base::~pmt_base()
-{
-  // nop -- out of line virtual destructor
-}
-
-////////////////////////////////////////////////////////////////////////////
-//                         Exceptions
-////////////////////////////////////////////////////////////////////////////
-
-exception::exception(const std::string &msg, pmt_t obj)
-  : logic_error(msg + ": " + write_string(obj))
-{
-}
-
-wrong_type::wrong_type(const std::string &msg, pmt_t obj)
-  : exception(msg + ": wrong_type ", obj)
-{
-}
-
-out_of_range::out_of_range(const std::string &msg, pmt_t obj)
-  : exception(msg + ": out of range ", obj)
-{
-}
-
-notimplemented::notimplemented(const std::string &msg, pmt_t obj)
-  : exception(msg + ": notimplemented ", obj)
-{
-}
-
-////////////////////////////////////////////////////////////////////////////
-//                          Dynamic Casts
-////////////////////////////////////////////////////////////////////////////
-
-static pmt_symbol *
-_symbol(pmt_t x)
-{
-  return dynamic_cast<pmt_symbol*>(x.get());
-}
-
-static pmt_integer *
-_integer(pmt_t x)
-{
-  return dynamic_cast<pmt_integer*>(x.get());
-}
-
-static pmt_uint64 *
-_uint64(pmt_t x)
-{
-  return dynamic_cast<pmt_uint64*>(x.get());
-}
-
-static pmt_real *
-_real(pmt_t x)
-{
-  return dynamic_cast<pmt_real*>(x.get());
-}
-
-static pmt_complex *
-_complex(pmt_t x)
-{
-  return dynamic_cast<pmt_complex*>(x.get());
-}
-
-static pmt_pair *
-_pair(pmt_t x)
-{
-  return dynamic_cast<pmt_pair*>(x.get());
-}
-
-static pmt_vector *
-_vector(pmt_t x)
-{
-  return dynamic_cast<pmt_vector*>(x.get());
-}
-
-static pmt_tuple *
-_tuple(pmt_t x)
-{
-  return dynamic_cast<pmt_tuple*>(x.get());
-}
-
-static pmt_uniform_vector *
-_uniform_vector(pmt_t x)
-{
-  return dynamic_cast<pmt_uniform_vector*>(x.get());
-}
-
-static pmt_any *
-_any(pmt_t x)
-{
-  return dynamic_cast<pmt_any*>(x.get());
-}
-
-////////////////////////////////////////////////////////////////////////////
-//                           Globals
-////////////////////////////////////////////////////////////////////////////
-
-const pmt_t PMT_T = pmt_t(new pmt_bool());	// singleton
-const pmt_t PMT_F = pmt_t(new pmt_bool());	// singleton
-const pmt_t PMT_NIL = pmt_t(new pmt_null());	// singleton
-const pmt_t PMT_EOF = cons(PMT_NIL, PMT_NIL);           // singleton
-
-////////////////////////////////////////////////////////////////////////////
-//                           Booleans
-////////////////////////////////////////////////////////////////////////////
-
-pmt_bool::pmt_bool(){}
-
-bool
-is_true(pmt_t obj)
-{
-  return obj != PMT_F;
-}
-
-bool
-is_false(pmt_t obj)
-{
-  return obj == PMT_F;
-}
-
-bool
-is_bool(pmt_t obj)
-{
-  return obj->is_bool();
-}
-
-pmt_t
-from_bool(bool val)
-{
-  return val ? PMT_T : PMT_F;
-}
-
-bool
-to_bool(pmt_t val)
-{
-  if (val == PMT_T)
-    return true;
-  if (val == PMT_F)
-    return false;
-  throw wrong_type("pmt_to_bool", val);
-}
-
-////////////////////////////////////////////////////////////////////////////
-//                             Symbols
-////////////////////////////////////////////////////////////////////////////
-
-static const unsigned int SYMBOL_HASH_TABLE_SIZE = 701;
-static std::vector<pmt_t> s_symbol_hash_table(SYMBOL_HASH_TABLE_SIZE);
-
-pmt_symbol::pmt_symbol(const std::string &name) : d_name(name){}
-
-
-static unsigned int
-hash_string(const std::string &s)
-{
-  unsigned int h = 0;
-  unsigned int g = 0;
-
-  for (std::string::const_iterator p = s.begin(); p != s.end(); ++p){
-    h = (h << 4) + (*p & 0xff);
-    g = h & 0xf0000000;
-    if (g){
-      h = h ^ (g >> 24);
-      h = h ^ g;
-    }
-  }
-  return h;
-}
-
-bool
-is_symbol(const pmt_t& obj)
-{
-  return obj->is_symbol();
-}
-
-pmt_t
-string_to_symbol(const std::string &name)
-{
-  unsigned hash = hash_string(name) % SYMBOL_HASH_TABLE_SIZE;
-
-  // Does a symbol with this name already exist?
-  for (pmt_t sym = s_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(s_symbol_hash_table[hash]);
-  s_symbol_hash_table[hash] = sym;
-  return sym;
-}
-
-// alias...
-pmt_t
-intern(const std::string &name)
-{
-  return string_to_symbol(name);
-}
-
-const std::string
-symbol_to_string(const pmt_t& sym)
-{
-  if (!sym->is_symbol())
-    throw wrong_type("pmt_symbol_to_string", sym);
-
-  return _symbol(sym)->name();
-}
-
-
-
-////////////////////////////////////////////////////////////////////////////
-//                             Number
-////////////////////////////////////////////////////////////////////////////
-
-bool
-is_number(pmt_t x)
-{
-  return x->is_number();
-}
-
-////////////////////////////////////////////////////////////////////////////
-//                             Integer
-////////////////////////////////////////////////////////////////////////////
-
-pmt_integer::pmt_integer(long value) : d_value(value) {}
-
-bool
-is_integer(pmt_t x)
-{
-  return x->is_integer();
-}
-
-
-pmt_t
-from_long(long x)
-{
-  return pmt_t(new pmt_integer(x));
-}
-
-long
-to_long(pmt_t x)
-{
-  pmt_integer* i = dynamic_cast<pmt_integer*>(x.get());
-  if ( i )
-    return i->value();
-
-  throw wrong_type("pmt_to_long", x);
-}
-
-////////////////////////////////////////////////////////////////////////////
-//                             Uint64
-////////////////////////////////////////////////////////////////////////////
-
-pmt_uint64::pmt_uint64(uint64_t value) : d_value(value) {}
-
-bool
-is_uint64(pmt_t x)
-{
-  return x->is_uint64();
-}
-
-
-pmt_t
-from_uint64(uint64_t x)
-{
-  return pmt_t(new pmt_uint64(x));
-}
-
-uint64_t
-to_uint64(pmt_t x)
-{
-  if(x->is_uint64())
-    return _uint64(x)->value();
-  if(x->is_integer())
-    {
-    long tmp = _integer(x)->value();
-    if(tmp >= 0)
-        return (uint64_t) tmp;
-    }
-
-  throw wrong_type("pmt_to_uint64", x);
-}
-
-////////////////////////////////////////////////////////////////////////////
-//                              Real
-////////////////////////////////////////////////////////////////////////////
-
-pmt_real::pmt_real(double value) : d_value(value) {}
-
-bool
-is_real(pmt_t x)
-{
-  return x->is_real();
-}
-
-pmt_t
-from_double(double x)
-{
-  return pmt_t(new pmt_real(x));
-}
-
-double
-to_double(pmt_t x)
-{
-  if (x->is_real())
-    return _real(x)->value();
-  if (x->is_integer())
-    return _integer(x)->value();
-
-  throw wrong_type("pmt_to_double", x);
-}
-
-////////////////////////////////////////////////////////////////////////////
-//                              Complex
-////////////////////////////////////////////////////////////////////////////
-
-pmt_complex::pmt_complex(std::complex<double> value) : d_value(value) {}
-
-bool
-is_complex(pmt_t x)
-{
-  return x->is_complex();
-}
-
-pmt_t
-make_rectangular(double re, double im)
-{
-  return from_complex(re, im);
-}
-
-pmt_t
-from_complex(double re, double im)
-{
-  return pmt_from_complex(re, im);
-}
-
-pmt_t pmt_from_complex(double re, double im)
-{
-  return pmt_t(new pmt_complex(std::complex<double>(re, im)));
-}
-
-pmt_t
-from_complex(const std::complex<double> &z)
-{
-  return pmt_t(new pmt_complex(z));
-}
-
-std::complex<double>
-to_complex(pmt_t x)
-{
-  if (x->is_complex())
-    return _complex(x)->value();
-  if (x->is_real())
-    return _real(x)->value();
-  if (x->is_integer())
-    return _integer(x)->value();
-
-  throw wrong_type("pmt_to_complex", x);
-}
-
-////////////////////////////////////////////////////////////////////////////
-//                              Pairs
-////////////////////////////////////////////////////////////////////////////
-
-pmt_null::pmt_null() {}
-pmt_pair::pmt_pair(const pmt_t& car, const pmt_t& cdr) : d_car(car), d_cdr(cdr) {}
-
-bool
-is_null(const pmt_t& x)
-{
-  return x == PMT_NIL;
-}
-
-bool
-is_pair(const pmt_t& obj)
-{
-  return obj->is_pair();
-}
-
-pmt_t
-cons(const pmt_t& x, const pmt_t& y)
-{
-  return pmt_t(new pmt_pair(x, y));
-}
-
-pmt_t
-car(const pmt_t& pair)
-{
-  pmt_pair* p = dynamic_cast<pmt_pair*>(pair.get());
-  if ( p )
-    return p->car();
-
-  throw wrong_type("pmt_car", pair);
-}
-
-pmt_t
-cdr(const pmt_t& pair)
-{
-  pmt_pair* p = dynamic_cast<pmt_pair*>(pair.get());
-  if ( p )
-    return p->cdr();
-
-  throw wrong_type("pmt_cdr", pair);
-}
-
-void
-set_car(pmt_t pair, pmt_t obj)
-{
-  if (pair->is_pair())
-    _pair(pair)->set_car(obj);
-  else
-    throw wrong_type("pmt_set_car", pair);
-}
-
-void
-set_cdr(pmt_t pair, pmt_t obj)
-{
-  if (pair->is_pair())
-    _pair(pair)->set_cdr(obj);
-  else
-    throw wrong_type("pmt_set_cdr", pair);
-}
-
-////////////////////////////////////////////////////////////////////////////
-//                             Vectors
-////////////////////////////////////////////////////////////////////////////
-
-pmt_vector::pmt_vector(size_t len, pmt_t fill)
-  : d_v(len)
-{
-  for (size_t i = 0; i < len; i++)
-    d_v[i] = fill;
-}
-
-pmt_t
-pmt_vector::ref(size_t k) const
-{
-  if (k >= length())
-    throw out_of_range("pmt_vector_ref", from_long(k));
-  return d_v[k];
-}
-
-void
-pmt_vector::set(size_t k, pmt_t obj)
-{
-  if (k >= length())
-    throw out_of_range("pmt_vector_set", from_long(k));
-  d_v[k] = obj;
-}
-
-void
-pmt_vector::fill(pmt_t obj)
-{
-  for (size_t i = 0; i < length(); i++)
-    d_v[i] = obj;
-}
-
-bool
-is_vector(pmt_t obj)
-{
-  return obj->is_vector();
-}
-
-pmt_t
-make_vector(size_t k, pmt_t fill)
-{
-  return pmt_t(new pmt_vector(k, fill));
-}
-
-pmt_t
-vector_ref(pmt_t vector, size_t k)
-{
-  if (!vector->is_vector())
-    throw wrong_type("pmt_vector_ref", vector);
-  return _vector(vector)->ref(k);
-}
-
-void
-vector_set(pmt_t vector, size_t k, pmt_t obj)
-{
-  if (!vector->is_vector())
-    throw wrong_type("pmt_vector_set", vector);
-  _vector(vector)->set(k, obj);
-}
-
-void
-vector_fill(pmt_t vector, pmt_t obj)
-{
-  if (!vector->is_vector())
-    throw wrong_type("pmt_vector_set", vector);
-  _vector(vector)->fill(obj);
-}
-
-////////////////////////////////////////////////////////////////////////////
-//                             Tuples
-////////////////////////////////////////////////////////////////////////////
-
-pmt_tuple::pmt_tuple(size_t len)
-  : d_v(len)
-{
-}
-
-pmt_t
-pmt_tuple::ref(size_t k) const
-{
-  if (k >= length())
-    throw out_of_range("pmt_tuple_ref", from_long(k));
-  return d_v[k];
-}
-
-bool
-is_tuple(pmt_t obj)
-{
-  return obj->is_tuple();
-}
-
-pmt_t
-tuple_ref(const pmt_t &tuple, size_t k)
-{
-  if (!tuple->is_tuple())
-    throw wrong_type("pmt_tuple_ref", tuple);
-  return _tuple(tuple)->ref(k);
-}
-
-// for (i=0; i < 10; i++)
-//   make_constructor()
-
-pmt_t
-make_tuple()
-{
-  return pmt_t(new pmt_tuple(0));
-}
-
-pmt_t
-make_tuple(const pmt_t &e0)
-{
-  pmt_tuple *t = new pmt_tuple(1);
-  t->_set(0, e0);
-  return pmt_t(t);
-}
-
-pmt_t
-make_tuple(const pmt_t &e0, const pmt_t &e1)
-{
-  pmt_tuple *t = new pmt_tuple(2);
-  t->_set(0, e0);
-  t->_set(1, e1);
-  return pmt_t(t);
-}
-
-pmt_t
-make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2)
-{
-  pmt_tuple *t = new pmt_tuple(3);
-  t->_set(0, e0);
-  t->_set(1, e1);
-  t->_set(2, e2);
-  return pmt_t(t);
-}
-
-pmt_t
-make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3)
-{
-  pmt_tuple *t = new pmt_tuple(4);
-  t->_set(0, e0);
-  t->_set(1, e1);
-  t->_set(2, e2);
-  t->_set(3, e3);
-  return pmt_t(t);
-}
-
-pmt_t
-make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4)
-{
-  pmt_tuple *t = new pmt_tuple(5);
-  t->_set(0, e0);
-  t->_set(1, e1);
-  t->_set(2, e2);
-  t->_set(3, e3);
-  t->_set(4, e4);
-  return pmt_t(t);
-}
-
-pmt_t
-make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5)
-{
-  pmt_tuple *t = new pmt_tuple(6);
-  t->_set(0, e0);
-  t->_set(1, e1);
-  t->_set(2, e2);
-  t->_set(3, e3);
-  t->_set(4, e4);
-  t->_set(5, e5);
-  return pmt_t(t);
-}
-
-pmt_t
-make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6)
-{
-  pmt_tuple *t = new pmt_tuple(7);
-  t->_set(0, e0);
-  t->_set(1, e1);
-  t->_set(2, e2);
-  t->_set(3, e3);
-  t->_set(4, e4);
-  t->_set(5, e5);
-  t->_set(6, e6);
-  return pmt_t(t);
-}
-
-pmt_t
-make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7)
-{
-  pmt_tuple *t = new pmt_tuple(8);
-  t->_set(0, e0);
-  t->_set(1, e1);
-  t->_set(2, e2);
-  t->_set(3, e3);
-  t->_set(4, e4);
-  t->_set(5, e5);
-  t->_set(6, e6);
-  t->_set(7, e7);
-  return pmt_t(t);
-}
-
-pmt_t
-make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8)
-{
-  pmt_tuple *t = new pmt_tuple(9);
-  t->_set(0, e0);
-  t->_set(1, e1);
-  t->_set(2, e2);
-  t->_set(3, e3);
-  t->_set(4, e4);
-  t->_set(5, e5);
-  t->_set(6, e6);
-  t->_set(7, e7);
-  t->_set(8, e8);
-  return pmt_t(t);
-}
-
-pmt_t
-make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8, const pmt_t &e9)
-{
-  pmt_tuple *t = new pmt_tuple(10);
-  t->_set(0, e0);
-  t->_set(1, e1);
-  t->_set(2, e2);
-  t->_set(3, e3);
-  t->_set(4, e4);
-  t->_set(5, e5);
-  t->_set(6, e6);
-  t->_set(7, e7);
-  t->_set(8, e8);
-  t->_set(9, e9);
-  return pmt_t(t);
-}
-
-pmt_t
-to_tuple(const pmt_t &x)
-{
-  if (x->is_tuple())		// already one
-    return x;
-
-  size_t len = length(x);
-  pmt_tuple *t = new pmt_tuple(len);
-  pmt_t r = pmt_t(t);
-
-  if (x->is_vector()){
-    for (size_t i = 0; i < len; i++)
-      t->_set(i, _vector(x)->ref(i));
-    return r;
-  }
-
-  if (x->is_pair()){
-    pmt_t y = x;
-    for (size_t i = 0; i < len; i++){
-      t->_set(i, car(y));
-      y = cdr(y);
-    }
-    return r;
-  }
-
-  throw wrong_type("pmt_to_tuple", x);
-}
-
-
-
-////////////////////////////////////////////////////////////////////////////
-//                       Uniform Numeric Vectors
-////////////////////////////////////////////////////////////////////////////
-
-bool
-is_uniform_vector(pmt_t x)
-{
-  return x->is_uniform_vector();
-}
-
-const void *
-uniform_vector_elements(pmt_t vector, size_t &len)
-{
-  if (!vector->is_uniform_vector())
-    throw wrong_type("pmt_uniform_vector_elements", vector);
-  return _uniform_vector(vector)->uniform_elements(len);
-}
-
-void *
-uniform_vector_writable_elements(pmt_t vector, size_t &len)
-{
-  if (!vector->is_uniform_vector())
-    throw wrong_type("pmt_uniform_vector_writable_elements", vector);
-  return _uniform_vector(vector)->uniform_writable_elements(len);
-}
-
-////////////////////////////////////////////////////////////////////////////
-//                            Dictionaries
-////////////////////////////////////////////////////////////////////////////
-
-/*
- * This is an a-list implementation.
- *
- * When we need better performance for large dictionaries, consider implementing
- * persistent Red-Black trees as described in "Purely Functional Data Structures",
- * Chris Okasaki, 1998, section 3.3.
- */
-
-bool
-is_dict(const pmt_t &obj)
-{
-  return is_null(obj) || is_pair(obj);
-}
-
-pmt_t
-make_dict()
-{
-  return PMT_NIL;
-}
-
-pmt_t
-dict_add(const pmt_t &dict, const pmt_t &key, const pmt_t &value)
-{
-  if (is_null(dict))
-    return acons(key, value, PMT_NIL);
-
-  if (dict_has_key(dict, key))
-    return acons(key, value, dict_delete(dict, key));
-
-  return acons(key, value, dict);
-}
-
-pmt_t
-dict_delete(const pmt_t &dict, const pmt_t &key)
-{
-  if (is_null(dict))
-    return dict;
-
-  if (eqv(caar(dict), key))
-    return cdr(dict);
-
-  return cons(car(dict), dict_delete(cdr(dict), key));
-}
-
-pmt_t
-dict_ref(const pmt_t &dict, const pmt_t &key, const pmt_t &not_found)
-{
-  pmt_t	p = assv(key, dict);	// look for (key . value) pair
-  if (is_pair(p))
-    return cdr(p);
-  else
-    return not_found;
-}
-
-bool
-dict_has_key(const pmt_t &dict, const pmt_t &key)
-{
-  return is_pair(assv(key, dict));
-}
-
-pmt_t
-dict_items(pmt_t dict)
-{
-  if (!is_dict(dict))
-    throw wrong_type("pmt_dict_values", dict);
-
-  return dict;		// equivalent to dict in the a-list case
-}
-
-pmt_t
-dict_keys(pmt_t dict)
-{
-  if (!is_dict(dict))
-    throw wrong_type("pmt_dict_keys", dict);
-
-  return map(car, dict);
-}
-
-pmt_t
-dict_values(pmt_t dict)
-{
-  if (!is_dict(dict))
-    throw wrong_type("pmt_dict_keys", dict);
-
-  return map(cdr, dict);
-}
-
-////////////////////////////////////////////////////////////////////////////
-//                                 Any
-////////////////////////////////////////////////////////////////////////////
-
-pmt_any::pmt_any(const boost::any &any) : d_any(any) {}
-
-bool
-is_any(pmt_t obj)
-{
-  return obj->is_any();
-}
-
-pmt_t
-make_any(const boost::any &any)
-{
-  return pmt_t(new pmt_any(any));
-}
-
-boost::any
-any_ref(pmt_t obj)
-{
-  if (!obj->is_any())
-    throw wrong_type("pmt_any_ref", obj);
-  return _any(obj)->ref();
-}
-
-void
-any_set(pmt_t obj, const boost::any &any)
-{
-  if (!obj->is_any())
-    throw wrong_type("pmt_any_set", obj);
-  _any(obj)->set(any);
-}
-
-////////////////////////////////////////////////////////////////////////////
-//               msg_accepter -- built from "any"
-////////////////////////////////////////////////////////////////////////////
-
-bool
-is_msg_accepter(const pmt_t &obj)
-{
-  if (!is_any(obj))
-    return false;
-
-  boost::any r = any_ref(obj);
-  return boost::any_cast<gruel::msg_accepter_sptr>(&r) != 0;
-}
-
-//! make a msg_accepter
-pmt_t
-make_msg_accepter(gruel::msg_accepter_sptr ma)
-{
-  return make_any(ma);
-}
-
-//! Return underlying msg_accepter
-gruel::msg_accepter_sptr
-msg_accepter_ref(const pmt_t &obj)
-{
-  try {
-    return boost::any_cast<gruel::msg_accepter_sptr>(any_ref(obj));
-  }
-  catch (boost::bad_any_cast &e){
-    throw wrong_type("pmt_msg_accepter_ref", obj);
-  }
-}
-
-
-////////////////////////////////////////////////////////////////////////////
-//             Binary Large Object -- currently a u8vector
-////////////////////////////////////////////////////////////////////////////
-
-bool
-is_blob(pmt_t x)
-{
-  // return is_u8vector(x);
-  return is_uniform_vector(x);
-}
-
-pmt_t
-make_blob(const void *buf, size_t len_in_bytes)
-{
-  return init_u8vector(len_in_bytes, (const uint8_t *) buf);
-}
-
-const void *
-blob_data(pmt_t blob)
-{
-  size_t len;
-  return uniform_vector_elements(blob, len);
-}
-
-size_t
-blob_length(pmt_t blob)
-{
-  size_t len;
-  uniform_vector_elements(blob, len);
-  return len;
-}
-
-
-////////////////////////////////////////////////////////////////////////////
-//                          General Functions
-////////////////////////////////////////////////////////////////////////////
-
-bool
-eq(const pmt_t& x, const pmt_t& y)
-{
-  return x == y;
-}
-
-bool
-eqv(const pmt_t& x, const pmt_t& y)
-{
-  if (x == y)
-    return true;
-
-  if (x->is_integer() && y->is_integer())
-    return _integer(x)->value() == _integer(y)->value();
-
-  if (x->is_uint64() && y->is_uint64())
-    return _uint64(x)->value() == _uint64(y)->value();
-
-  if (x->is_real() && y->is_real())
-    return _real(x)->value() == _real(y)->value();
-
-  if (x->is_complex() && y->is_complex())
-    return _complex(x)->value() == _complex(y)->value();
-
-  return false;
-}
-
-bool
-eqv_raw(pmt_base *x, pmt_base *y)
-{
-  if (x == y)
-    return true;
-
-  if (x->is_integer() && y->is_integer())
-    return _integer(x)->value() == _integer(y)->value();
-
-  if (x->is_uint64() && y->is_uint64())
-    return _uint64(x)->value() == _uint64(y)->value();
-
-  if (x->is_real() && y->is_real())
-    return _real(x)->value() == _real(y)->value();
-
-  if (x->is_complex() && y->is_complex())
-    return _complex(x)->value() == _complex(y)->value();
-
-  return false;
-}
-
-bool
-equal(const pmt_t& x, const pmt_t& y)
-{
-  if (eqv(x, y))
-    return true;
-
-  if (x->is_pair() && y->is_pair())
-    return equal(car(x), car(y)) && equal(cdr(x), cdr(y));
-
-  if (x->is_vector() && y->is_vector()){
-    pmt_vector *xv = _vector(x);
-    pmt_vector *yv = _vector(y);
-    if (xv->length() != yv->length())
-      return false;
-
-    for (unsigned i = 0; i < xv->length(); i++)
-      if (!equal(xv->_ref(i), yv->_ref(i)))
-	return false;
-
-    return true;
-  }
-
-  if (x->is_tuple() && y->is_tuple()){
-    pmt_tuple *xv = _tuple(x);
-    pmt_tuple *yv = _tuple(y);
-    if (xv->length() != yv->length())
-      return false;
-
-    for (unsigned i = 0; i < xv->length(); i++)
-      if (!equal(xv->_ref(i), yv->_ref(i)))
-	return false;
-
-    return true;
-  }
-
-  if (x->is_uniform_vector() && y->is_uniform_vector()){
-    pmt_uniform_vector *xv = _uniform_vector(x);
-    pmt_uniform_vector *yv = _uniform_vector(y);
-    if (xv->length() != yv->length())
-      return false;
-
-    size_t len_x, len_y;
-    if (memcmp(xv->uniform_elements(len_x),
-	       yv->uniform_elements(len_y),
-	       len_x) == 0)
-      return true;
-
-    return true;
-  }
-
-  // FIXME add other cases here...
-
-  return false;
-}
-
-size_t
-length(const pmt_t& x)
-{
-  if (x->is_vector())
-    return _vector(x)->length();
-
-  if (x->is_uniform_vector())
-    return _uniform_vector(x)->length();
-
-  if (x->is_tuple())
-    return _tuple(x)->length();
-
-  if (x->is_null())
-    return 0;
-
-  if (x->is_pair()) {
-    size_t length=1;
-    pmt_t it = cdr(x);
-    while (is_pair(it)){
-      length++;
-      it = cdr(it);
-    }
-    if (is_null(it))
-      return length;
-
-    // not a proper list
-    throw wrong_type("pmt_length", x);
-  }
-
-  // FIXME dictionary length (number of entries)
-
-  throw wrong_type("pmt_length", x);
-}
-
-pmt_t
-assq(pmt_t obj, pmt_t alist)
-{
-  while (is_pair(alist)){
-    pmt_t p = car(alist);
-    if (!is_pair(p))	// malformed alist
-      return PMT_F;
-
-    if (eq(obj, car(p)))
-      return p;
-
-    alist = cdr(alist);
-  }
-  return PMT_F;
-}
-
-/*
- * This avoids a bunch of shared_pointer reference count manipulation.
- */
-pmt_t
-assv_raw(pmt_base *obj, pmt_base *alist)
-{
-  while (alist->is_pair()){
-    pmt_base *p = ((pmt_pair *)alist)->d_car.get();
-    if (!p->is_pair())		// malformed alist
-      return PMT_F;
-
-    if (eqv_raw(obj, ((pmt_pair *)p)->d_car.get()))
-      return ((pmt_pair *)alist)->d_car;
-
-    alist = (((pmt_pair *)alist)->d_cdr).get();
-  }
-  return PMT_F;
-}
-
-#if 1
-
-pmt_t
-assv(pmt_t obj, pmt_t alist)
-{
-  return assv_raw(obj.get(), alist.get());
-}
-
-#else
-
-pmt_t
-assv(pmt_t obj, pmt_t alist)
-{
-  while (is_pair(alist)){
-    pmt_t p = car(alist);
-    if (!is_pair(p))	// malformed alist
-      return PMT_F;
-
-    if (eqv(obj, car(p)))
-      return p;
-
-    alist = cdr(alist);
-  }
-  return PMT_F;
-}
-
-#endif
-
-
-pmt_t
-assoc(pmt_t obj, pmt_t alist)
-{
-  while (is_pair(alist)){
-    pmt_t p = car(alist);
-    if (!is_pair(p))	// malformed alist
-      return PMT_F;
-
-    if (equal(obj, car(p)))
-      return p;
-
-    alist = cdr(alist);
-  }
-  return PMT_F;
-}
-
-pmt_t
-map(pmt_t proc(const pmt_t&), pmt_t list)
-{
-  pmt_t r = PMT_NIL;
-
-  while(is_pair(list)){
-    r = cons(proc(car(list)), r);
-    list = cdr(list);
-  }
-
-  return reverse_x(r);
-}
-
-pmt_t
-reverse(pmt_t listx)
-{
-  pmt_t list = listx;
-  pmt_t r = PMT_NIL;
-
-  while(is_pair(list)){
-    r = cons(car(list), r);
-    list = cdr(list);
-  }
-  if (is_null(list))
-    return r;
-  else
-    throw wrong_type("pmt_reverse", listx);
-}
-
-pmt_t
-reverse_x(pmt_t list)
-{
-  // FIXME do it destructively
-  return reverse(list);
-}
-
-pmt_t
-nth(size_t n, pmt_t list)
-{
-  pmt_t t = nthcdr(n, list);
-  if (is_pair(t))
-    return car(t);
-  else
-    return PMT_NIL;
-}
-
-pmt_t
-nthcdr(size_t n, pmt_t list)
-{
-  if (!(is_pair(list) || is_null(list)))
-    throw wrong_type("pmt_nthcdr", list);
-
-  while (n > 0){
-    if (is_pair(list)){
-      list = cdr(list);
-      n--;
-      continue;
-    }
-    if (is_null(list))
-      return PMT_NIL;
-    else
-      throw wrong_type("pmt_nthcdr: not a LIST", list);
-  }
-  return list;
-}
-
-pmt_t
-memq(pmt_t obj, pmt_t list)
-{
-  while (is_pair(list)){
-    if (eq(obj, car(list)))
-      return list;
-    list = cdr(list);
-  }
-  return PMT_F;
-}
-
-pmt_t
-memv(pmt_t obj, pmt_t list)
-{
-  while (is_pair(list)){
-    if (eqv(obj, car(list)))
-      return list;
-    list = cdr(list);
-  }
-  return PMT_F;
-}
-
-pmt_t
-member(pmt_t obj, pmt_t list)
-{
-  while (is_pair(list)){
-    if (equal(obj, car(list)))
-      return list;
-    list = cdr(list);
-  }
-  return PMT_F;
-}
-
-bool
-subsetp(pmt_t list1, pmt_t list2)
-{
-  while (is_pair(list1)){
-    pmt_t p = car(list1);
-    if (is_false(memv(p, list2)))
-      return false;
-    list1 = cdr(list1);
-  }
-  return true;
-}
-
-pmt_t
-list1(const pmt_t& x1)
-{
-  return cons(x1, PMT_NIL);
-}
-
-pmt_t
-list2(const pmt_t& x1, const pmt_t& x2)
-{
-  return cons(x1, cons(x2, PMT_NIL));
-}
-
-pmt_t
-list3(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3)
-{
-  return cons(x1, cons(x2, cons(x3, PMT_NIL)));
-}
-
-pmt_t
-list4(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4)
-{
-  return cons(x1, cons(x2, cons(x3, cons(x4, PMT_NIL))));
-}
-
-pmt_t
-list5(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4, const pmt_t& x5)
-{
-  return cons(x1, cons(x2, cons(x3, cons(x4, cons(x5, PMT_NIL)))));
-}
-
-pmt_t
-list6(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4, const pmt_t& x5, const pmt_t& x6)
-{
-  return cons(x1, cons(x2, cons(x3, cons(x4, cons(x5, cons(x6, PMT_NIL))))));
-}
-
-pmt_t
-list_add(pmt_t list, const pmt_t& item)
-{
-  return reverse(cons(item, reverse(list)));
-}
-
-pmt_t
-list_rm(pmt_t list, const pmt_t& item)
-{
-  if(is_pair(list)){
-    pmt_t left = car(list);
-    pmt_t right = cdr(list);
-    if(!equal(left, item)){
-        return cons(left, list_rm(right, item));
-        } else {
-        return list_rm(right, item);
-        }
-    } else {
-      return list;
-    }
-}
-
-bool
-list_has(pmt_t list, const pmt_t& item)
-{
-  if(is_pair(list)){
-    pmt_t left = car(list);
-    pmt_t right = cdr(list);
-    if(equal(left,item))
-        return true;
-    return list_has(right, item);   
-  } else {
-    if(is_null(list))
-        return false;
-    throw std::runtime_error("list contains invalid format!");
-  }
-}
-
-pmt_t
-caar(pmt_t pair)
-{
-  return (car(car(pair)));
-}
-
-pmt_t
-cadr(pmt_t pair)
-{
-  return car(cdr(pair));
-}
-
-pmt_t
-cdar(pmt_t pair)
-{
-  return cdr(car(pair));
-}
-
-pmt_t
-cddr(pmt_t pair)
-{
-  return cdr(cdr(pair));
-}
-
-pmt_t
-caddr(pmt_t pair)
-{
-  return car(cdr(cdr(pair)));
-}
-
-pmt_t
-cadddr(pmt_t pair)
-{
-  return car(cdr(cdr(cdr(pair))));
-}
-
-bool
-is_eof_object(pmt_t obj)
-{
-  return eq(obj, PMT_EOF);
-}
-
-void
-dump_sizeof()
-{
-  printf("sizeof(pmt_t)              = %3zd\n", sizeof(pmt_t));
-  printf("sizeof(pmt_base)           = %3zd\n", sizeof(pmt_base));
-  printf("sizeof(pmt_bool)           = %3zd\n", sizeof(pmt_bool));
-  printf("sizeof(pmt_symbol)         = %3zd\n", sizeof(pmt_symbol));
-  printf("sizeof(pmt_integer)        = %3zd\n", sizeof(pmt_integer));
-  printf("sizeof(pmt_uint64)         = %3zd\n", sizeof(pmt_uint64));
-  printf("sizeof(pmt_real)           = %3zd\n", sizeof(pmt_real));
-  printf("sizeof(pmt_complex)        = %3zd\n", sizeof(pmt_complex));
-  printf("sizeof(pmt_null)           = %3zd\n", sizeof(pmt_null));
-  printf("sizeof(pmt_pair)           = %3zd\n", sizeof(pmt_pair));
-  printf("sizeof(pmt_vector)         = %3zd\n", sizeof(pmt_vector));
-  printf("sizeof(pmt_uniform_vector) = %3zd\n", sizeof(pmt_uniform_vector));
-}
-
-} /* namespace pmt */
diff --git a/gruel/src/lib/pmt/pmt_int.h b/gruel/src/lib/pmt/pmt_int.h
deleted file mode 100644
index d669e10491..0000000000
--- a/gruel/src/lib/pmt/pmt_int.h
+++ /dev/null
@@ -1,247 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2009,2010 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-#ifndef INCLUDED_PMT_INT_H
-#define INCLUDED_PMT_INT_H
-
-#include <gruel/pmt.h>
-#include <boost/utility.hpp>
-#include <boost/detail/atomic_count.hpp>
-
-/*
- * EVERYTHING IN THIS FILE IS PRIVATE TO THE IMPLEMENTATION!
- *
- * See pmt.h for the public interface
- */
-
-#define PMT_LOCAL_ALLOCATOR 0		// define to 0 or 1
-namespace pmt {
-
-class GRUEL_API pmt_base : boost::noncopyable {
-  mutable boost::detail::atomic_count count_;
-
-protected:
-  pmt_base() : count_(0) {};
-  virtual ~pmt_base();
-
-public:
-  virtual bool is_bool()    const { return false; }
-  virtual bool is_symbol()  const { return false; }
-  virtual bool is_number()  const { return false; }
-  virtual bool is_integer() const { return false; }
-  virtual bool is_uint64()  const { return false; }
-  virtual bool is_real()    const { return false; }
-  virtual bool is_complex() const { return false; }
-  virtual bool is_null()    const { return false; }
-  virtual bool is_pair()    const { return false; }
-  virtual bool is_tuple()   const { return false; }
-  virtual bool is_vector()  const { return false; }
-  virtual bool is_dict()    const { return false; }
-  virtual bool is_any()     const { return false; }
-
-  virtual bool is_uniform_vector() const { return false; }
-  virtual bool is_u8vector()  const { return false; }
-  virtual bool is_s8vector()  const { return false; }
-  virtual bool is_u16vector() const { return false; }
-  virtual bool is_s16vector() const { return false; }
-  virtual bool is_u32vector() const { return false; }
-  virtual bool is_s32vector() const { return false; }
-  virtual bool is_u64vector() const { return false; }
-  virtual bool is_s64vector() const { return false; }
-  virtual bool is_f32vector() const { return false; }
-  virtual bool is_f64vector() const { return false; }
-  virtual bool is_c32vector() const { return false; }
-  virtual bool is_c64vector() const { return false; }
-
-  friend void intrusive_ptr_add_ref(pmt_base* p);
-  friend void intrusive_ptr_release(pmt_base* p);
-
-# if (PMT_LOCAL_ALLOCATOR)
-  void *operator new(size_t);
-  void operator delete(void *, size_t);
-#endif
-};
-
-class pmt_bool : public pmt_base
-{
-public:
-  pmt_bool();
-  //~pmt_bool(){}
-
-  bool is_bool() const { return true; }
-};
-
-
-class pmt_symbol : public pmt_base
-{
-  std::string	d_name;
-  pmt_t		d_next;
-
-public:
-  pmt_symbol(const std::string &name);
-  //~pmt_symbol(){}
-
-  bool is_symbol() const { return true; }
-  const std::string name() { return d_name; }
-
-  pmt_t next() { return d_next; }		// symbol table link
-  void set_next(pmt_t next) { d_next = next; }
-};
-
-class pmt_integer : public pmt_base
-{
-public:
-  long		d_value;
-
-  pmt_integer(long value);
-  //~pmt_integer(){}
-
-  bool is_number()  const { return true; }
-  bool is_integer() const { return true; }
-  long value() const { return d_value; }
-};
-
-class pmt_uint64 : public pmt_base
-{
-public:
-  uint64_t		d_value;
-
-  pmt_uint64(uint64_t value);
-  //~pmt_uint64(){}
-
-  bool is_number()  const { return true; }
-  bool is_uint64() const { return true; }
-  uint64_t value() const { return d_value; }
-};
-
-class pmt_real : public pmt_base
-{
-public:
-  double	d_value;
-
-  pmt_real(double value);
-  //~pmt_real(){}
-
-  bool is_number()  const { return true; }
-  bool is_real() const { return true; }
-  double value() const { return d_value; }
-};
-
-class pmt_complex : public pmt_base
-{
-public:
-  std::complex<double>	d_value;
-
-  pmt_complex(std::complex<double> value);
-  //~pmt_complex(){}
-
-  bool is_number()  const { return true; }
-  bool is_complex() const { return true; }
-  std::complex<double> value() const { return d_value; }
-};
-
-class pmt_null  : public pmt_base
-{
-public:
-  pmt_null();
-  //~pmt_null(){}
-
-  bool is_null() const { return true; }
-};
-
-class pmt_pair : public pmt_base
-{
-public:
-  pmt_t		d_car;
-  pmt_t		d_cdr;
-
-  pmt_pair(const pmt_t& car, const pmt_t& cdr);
-  //~pmt_pair(){};
-
-  bool is_pair() const { return true; }
-  pmt_t car() const { return d_car; }
-  pmt_t cdr() const { return d_cdr; }
-
-  void set_car(pmt_t car) { d_car = car; }
-  void set_cdr(pmt_t cdr) { d_cdr = cdr; }
-};
-
-class pmt_vector : public pmt_base
-{
-  std::vector<pmt_t>	d_v;
-
-public:
-  pmt_vector(size_t len, pmt_t fill);
-  //~pmt_vector();
-
-  bool is_vector() const { return true; }
-  pmt_t ref(size_t k) const;
-  void  set(size_t k, pmt_t obj);
-  void  fill(pmt_t fill);
-  size_t length() const { return d_v.size(); }
-
-  pmt_t _ref(size_t k) const { return d_v[k]; }
-};
-
-class pmt_tuple : public pmt_base
-{
-  std::vector<pmt_t>	d_v;
-
-public:
-  pmt_tuple(size_t len);
-  //~pmt_tuple();
-
-  bool is_tuple() const { return true; }
-  pmt_t ref(size_t k) const;
-  size_t length() const { return d_v.size(); }
-
-  pmt_t _ref(size_t k) const { return d_v[k]; }
-  void _set(size_t k, pmt_t v) { d_v[k] = v; }
-};
-
-class pmt_any : public pmt_base
-{
-  boost::any	d_any;
-
-public:
-  pmt_any(const boost::any &any);
-  //~pmt_any();
-
-  bool is_any() const { return true; }
-  const boost::any &ref() const { return d_any; }
-  void  set(const boost::any &any) { d_any = any; }
-};
-
-
-class pmt_uniform_vector : public pmt_base
-{
-public:
-  bool is_uniform_vector() const { return true; }
-  virtual const void *uniform_elements(size_t &len) = 0;
-  virtual void *uniform_writable_elements(size_t &len) = 0;
-  virtual size_t length() const = 0;
-};
-
-#include "pmt_unv_int.h"
-
-} /* namespace pmt */
-
-#endif /* INCLUDED_PMT_INT_H */
diff --git a/gruel/src/lib/pmt/pmt_io.cc b/gruel/src/lib/pmt/pmt_io.cc
deleted file mode 100644
index 2e853b9147..0000000000
--- a/gruel/src/lib/pmt/pmt_io.cc
+++ /dev/null
@@ -1,168 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <vector>
-#include <gruel/pmt.h>
-#include "pmt_int.h"
-#include <sstream>
-#include <iostream>
-
-namespace pmt {
-
-static void
-write_list_tail(pmt_t obj, std::ostream &port)
-{
-  write(car(obj), port); // write the car
-  obj = cdr(obj);		 // step to cdr
-
-  if (is_null(obj))		 // ()
-    port << ")";
-
-  else if (is_pair(obj)){	 // normal list
-    port << " ";
-    write_list_tail(obj, port);
-  }
-  else {			 // dotted pair
-    port << " . ";
-    write(obj, port);
-    port << ")";
-  }
-}
-
-void
-write(pmt_t obj, std::ostream &port)
-{
-  if (is_bool(obj)){
-    if (is_true(obj))
-      port << "#t";
-    else
-      port << "#f";
-  }
-  else if (is_symbol(obj)){
-    port << symbol_to_string(obj);
-  }
-  else if (is_number(obj)){
-    if (is_integer(obj))
-      port << to_long(obj);
-    else if (is_uint64(obj))
-      port << to_uint64(obj);
-    else if (is_real(obj))
-      port << to_double(obj);
-    else if (is_complex(obj)){
-      std::complex<double> c = to_complex(obj);
-      port << c.real() << '+' << c.imag() << 'i';
-    }
-    else
-      goto error;
-  }
-  else if (is_null(obj)){
-    port << "()";
-  }
-  else if (is_pair(obj)){
-    port << "(";
-    write_list_tail(obj, port);
-  }
-  else if (is_tuple(obj)){
-    port << "{";
-    size_t len = length(obj);
-    if (len > 0){
-      port << tuple_ref(obj, 0);
-      for (size_t i = 1; i < len; i++)
-	port << " " << tuple_ref(obj, i);
-    }
-    port << "}";
-  }
-  else if (is_vector(obj)){
-    port << "#(";
-    size_t len = length(obj);
-    if (len > 0){
-      port << vector_ref(obj, 0);
-      for (size_t i = 1; i < len; i++)
-	port << " " << vector_ref(obj, i);
-    }
-    port << ")";
-  }
-  else if (is_dict(obj)){
-    // FIXME
-    // port << "#<dict " << obj << ">";
-    port << "#<dict>";
-  }
-  else if (is_uniform_vector(obj)){
-    // FIXME
-    // port << "#<uniform-vector " << obj << ">";
-    port << "#<uniform-vector>";
-  }
-  else {
-  error:
-    // FIXME
-    // port << "#<" << obj << ">";
-    port << "#<unknown>";
-  }
-}
-
-std::ostream& operator<<(std::ostream &os, pmt_t obj)
-{
-  write(obj, os);
-  return os;
-}
-
-std::string
-write_string(pmt_t obj)
-{
-  std::ostringstream s;
-  s << obj;
-  return s.str();
-}
-
-pmt_t
-read(std::istream &port)
-{
-  throw notimplemented("notimplemented: pmt::read", PMT_NIL);
-}
-
-void
-serialize(pmt_t obj, std::ostream &sink)
-{
-  throw notimplemented("notimplemented: pmt::serialize", obj);
-}
-
-/*!
- * \brief Create obj from portable byte-serial representation
- */
-pmt_t
-deserialize(std::istream &source)
-{
-  throw notimplemented("notimplemented: pmt::deserialize", PMT_NIL);
-}
-
-} /* namespace pmt */
-
-
-void
-pmt::print(pmt_t v)
-{
-  std::cout << write_string(v) << std::endl;
-}
-
-
diff --git a/gruel/src/lib/pmt/pmt_pool.cc b/gruel/src/lib/pmt/pmt_pool.cc
deleted file mode 100644
index 63a681abff..0000000000
--- a/gruel/src/lib/pmt/pmt_pool.cc
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <gruel/pmt_pool.h>
-#include <algorithm>
-#include <stdint.h>
-
-namespace pmt {
-
-static inline size_t
-ROUNDUP(size_t x, size_t stride)
-{
-  return ((((x) + (stride) - 1)/(stride)) * (stride));
-}
-
-pmt_pool::pmt_pool(size_t itemsize, size_t alignment,
-		   size_t allocation_size, size_t max_items)
-  : d_itemsize(ROUNDUP(itemsize, alignment)),
-    d_alignment(alignment),
-    d_allocation_size(std::max(allocation_size, 16 * itemsize)),
-    d_max_items(max_items), d_n_items(0),
-    d_freelist(0)
-{
-}
-
-pmt_pool::~pmt_pool()
-{
-  for (unsigned int i = 0; i < d_allocations.size(); i++){
-    delete [] d_allocations[i];
-  }
-}
-
-void *
-pmt_pool::malloc()
-{
-  scoped_lock guard(d_mutex);
-  item *p;
-
-  if (d_max_items != 0){
-    while (d_n_items >= d_max_items)
-      d_cond.wait(guard);
-  }
-
-  if (d_freelist){	// got something?
-    p = d_freelist;
-    d_freelist = p->d_next;
-    d_n_items++;
-    return p;
-  }
-
-  // allocate a new chunk
-  char *alloc = new char[d_allocation_size + d_alignment - 1];
-  d_allocations.push_back(alloc);
-
-  // get the alignment we require
-  char *start = (char *)(((uintptr_t)alloc + d_alignment-1) & -d_alignment);
-  char *end = alloc + d_allocation_size + d_alignment - 1;
-  size_t n = (end - start) / d_itemsize;
-
-  // link the new items onto the free list.
-  p = (item *) start;
-  for (size_t i = 0; i < n; i++){
-    p->d_next = d_freelist;
-    d_freelist = p;
-    p = (item *)((char *) p + d_itemsize);
-  }
-
-  // now return the first one
-  p = d_freelist;
-  d_freelist = p->d_next;
-  d_n_items++;
-  return p;
-}
-
-void
-pmt_pool::free(void *foo)
-{
-  if (!foo)
-    return;
-
-  scoped_lock guard(d_mutex);
-
-  item *p = (item *) foo;
-  p->d_next = d_freelist;
-  d_freelist = p;
-  d_n_items--;
-  if (d_max_items != 0)
-    d_cond.notify_one();
-}
-
-} /* namespace pmt */
diff --git a/gruel/src/lib/pmt/pmt_serialize.cc b/gruel/src/lib/pmt/pmt_serialize.cc
deleted file mode 100644
index 2c74f30b01..0000000000
--- a/gruel/src/lib/pmt/pmt_serialize.cc
+++ /dev/null
@@ -1,834 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <vector>
-#include <gruel/pmt.h>
-#include "pmt_int.h"
-#include "gruel/pmt_serial_tags.h"
-
-namespace pmt {
-
-static pmt_t parse_pair(std::streambuf &sb);
-
-// ----------------------------------------------------------------
-// output primitives
-// ----------------------------------------------------------------
-
-static bool
-serialize_untagged_u8(unsigned int i, std::streambuf &sb)
-{
-  return sb.sputc((i >> 0) & 0xff) != std::streambuf::traits_type::eof();
-}
-
-// always writes big-endian
-static bool
-serialize_untagged_u16(unsigned int i, std::streambuf &sb)
-{
-  sb.sputc((i >> 8) & 0xff);
-  return sb.sputc((i >> 0) & 0xff) != std::streambuf::traits_type::eof();
-}
-
-// always writes big-endian
-static bool
-serialize_untagged_u32(unsigned int i, std::streambuf &sb)
-{
-  sb.sputc((i >> 24) & 0xff);
-  sb.sputc((i >> 16) & 0xff);
-  sb.sputc((i >>  8) & 0xff);
-  return sb.sputc((i >> 0) & 0xff) != std::streambuf::traits_type::eof();
-}
-
-static bool
-serialize_untagged_f64(double i, std::streambuf &sb)
-{
- typedef union {
-	double id;
-	uint64_t ii;
-	} iu_t;
-  iu_t iu;
-  iu.id = i;
-  sb.sputc((iu.ii >> 56) & 0xff);
-  sb.sputc((iu.ii >> 48) & 0xff);
-  sb.sputc((iu.ii >> 40) & 0xff);
-  sb.sputc((iu.ii >> 32) & 0xff);
-  sb.sputc((iu.ii >> 24) & 0xff);
-  sb.sputc((iu.ii >> 16) & 0xff);
-  sb.sputc((iu.ii >>  8) & 0xff);
-  return sb.sputc((iu.ii >>  0) & 0xff) != std::streambuf::traits_type::eof();
-}
-
-
-// always writes big-endian
-static bool
-serialize_untagged_u64(uint64_t i, std::streambuf &sb)
-{
-  sb.sputc((i >> 56) & 0xff);
-  sb.sputc((i >> 48) & 0xff);
-  sb.sputc((i >> 40) & 0xff);
-  sb.sputc((i >> 32) & 0xff);
-  sb.sputc((i >> 24) & 0xff);
-  sb.sputc((i >> 16) & 0xff);
-  sb.sputc((i >>  8) & 0xff);
-  return sb.sputc((i >> 0) & 0xff) != std::streambuf::traits_type::eof();
-}
-
-// ----------------------------------------------------------------
-// input primitives
-// ----------------------------------------------------------------
-
-
-// always reads big-endian
-static bool
-deserialize_untagged_u8(uint8_t *ip, std::streambuf &sb)
-{
-  std::streambuf::traits_type::int_type  t;
-  int i;
-
-  t = sb.sbumpc();
-  i = t & 0xff;
-
-  *ip = i;
-  return t != std::streambuf::traits_type::eof();
-}
-
-// always reads big-endian
-static bool
-deserialize_untagged_u16(uint16_t *ip, std::streambuf &sb)
-{
-  std::streambuf::traits_type::int_type  t;
-  int i;
-
-  t = sb.sbumpc();
-  i = t & 0xff;
-
-  t = sb.sbumpc();
-  i = (i << 8) | (t & 0xff);
-
-  *ip = i;
-  return t != std::streambuf::traits_type::eof();
-}
-
-// always reads big-endian
-static bool
-deserialize_untagged_u32(uint32_t *ip, std::streambuf &sb)
-{
-  std::streambuf::traits_type::int_type  t;
-  int i;
-
-  t = sb.sbumpc();
-  i = t & 0xff;
-
-  t = sb.sbumpc();
-  i = (i << 8) | (t & 0xff);
-  t = sb.sbumpc();
-  i = (i << 8) | (t & 0xff);
-  t = sb.sbumpc();
-  i = (i << 8) | (t & 0xff);
-
-  *ip = i;
-  return t != std::streambuf::traits_type::eof();
-}
-
-// always reads big-endian
-static bool
-deserialize_untagged_u64(uint64_t *ip, std::streambuf &sb)
-{
-  std::streambuf::traits_type::int_type  t;
-  uint64_t i;
-
-  t = sb.sbumpc();
-  i = t & 0xff;
-
-  t = sb.sbumpc();
-  i = (i << 8) | (t & 0xff);
-  t = sb.sbumpc();
-  i = (i << 8) | (t & 0xff);
-  t = sb.sbumpc();
-  i = (i << 8) | (t & 0xff);
-  t = sb.sbumpc();
-  i = (i << 8) | (t & 0xff);
-  t = sb.sbumpc();
-  i = (i << 8) | (t & 0xff);
-  t = sb.sbumpc();
-  i = (i << 8) | (t & 0xff);
-  t = sb.sbumpc();
-  i = (i << 8) | (t & 0xff);
-
-  *ip = i;
-  return t != std::streambuf::traits_type::eof();
-}
-
-static bool
-deserialize_untagged_f64(double *ip, std::streambuf &sb)
-{
-  std::streambuf::traits_type::int_type t;
-
-  typedef union {
-    double id;
-    uint64_t ii;
-  } iu_t;
-
-  iu_t iu;
-
-  t = sb.sbumpc();
-  iu.ii = t & 0xff;
-
-  t = sb.sbumpc();
-  iu.ii = (iu.ii<<8) | (t & 0xff);
-  t = sb.sbumpc();
-  iu.ii = (iu.ii<<8) | (t & 0xff);
-  t = sb.sbumpc();
-  iu.ii = (iu.ii<<8) | (t & 0xff);
-  t = sb.sbumpc();
-  iu.ii = (iu.ii<<8) | (t & 0xff);
-  t = sb.sbumpc();
-  iu.ii = (iu.ii<<8) | (t & 0xff);
-  t = sb.sbumpc();
-  iu.ii = (iu.ii<<8) | (t & 0xff);
-  t = sb.sbumpc();
-  iu.ii = (iu.ii<<8) | (t & 0xff);
-
-  *ip = iu.id;
-  return t != std::streambuf::traits_type::eof();
-}
-
-static bool
-deserialize_tuple(pmt_t *tuple, std::streambuf &sb)
-{
-    uint32_t nitems;
-    bool ok = deserialize_untagged_u32(&nitems, sb);
-    pmt_t list(PMT_NIL);
-    for(uint32_t i=0; i<nitems; i++) {
-      pmt_t item = deserialize(sb);
-      if(eq(list, PMT_NIL)) {
-	list = list1(item);
-      }
-      else {
-	list = list_add(list, item);
-      }
-    }
-    (*tuple) = to_tuple(list);
-    return ok;
-}
-
-
-/*
- * Write portable byte-serial representation of \p obj to \p sb
- *
- * N.B., Circular structures cause infinite recursion.
- */
-bool
-serialize(pmt_t obj, std::streambuf &sb)
-{
-  bool ok = true;
-
- tail_recursion:
-
-  if(is_bool(obj)) {
-    if(eq(obj, PMT_T))
-      return serialize_untagged_u8(PST_TRUE, sb);
-    else
-      return serialize_untagged_u8(PST_FALSE, sb);
-  }
-
-  if(is_null(obj))
-    return serialize_untagged_u8(PST_NULL, sb);
-
-  if(is_symbol(obj)) {
-    const std::string s = symbol_to_string(obj);
-    size_t len = s.size();
-    ok = serialize_untagged_u8(PST_SYMBOL, sb);
-    ok &= serialize_untagged_u16(len, sb);
-    for(size_t i = 0; i < len; i++)
-      ok &= serialize_untagged_u8(s[i], sb);
-    return ok;
-  }
-
-  if(is_pair(obj)) {
-    ok = serialize_untagged_u8(PST_PAIR, sb);
-    ok &= serialize(car(obj), sb);
-    if(!ok)
-      return false;
-    obj = cdr(obj);
-    goto tail_recursion;
-  }
-
-  if(is_number(obj)) {
-    
-    if(is_uint64(obj)) {
-        uint64_t i = to_uint64(obj);
-        ok = serialize_untagged_u8(PST_UINT64, sb);
-        ok &= serialize_untagged_u64(i, sb);
-        return ok;
-    }
-    else { 
-      if(is_integer(obj)) {
-	long i = to_long(obj);
-	if(sizeof(long) > 4) {
-	  if(i < -2147483647 || i > 2147483647)
-	    throw notimplemented("pmt::serialize (64-bit integers)", obj);
-	}
-	ok = serialize_untagged_u8(PST_INT32, sb);
-	ok &= serialize_untagged_u32(i, sb);
-	return ok;
-      }
-    }
-
-    if(is_real(obj)) {
-      float i = to_double(obj);
-      ok = serialize_untagged_u8(PST_DOUBLE, sb);
-      ok &= serialize_untagged_f64(i, sb);
-      return ok;
-    }
-
-    if(is_complex(obj)) {
-      std::complex<double> i = to_complex(obj);
-      ok = serialize_untagged_u8(PST_COMPLEX, sb);
-      ok &= serialize_untagged_f64(i.real(), sb);
-      ok &= serialize_untagged_f64(i.imag(), sb);
-      return ok;
-    }
-  }
-
-  if(is_vector(obj)) {
-    size_t vec_len = pmt::length(obj);
-    ok = serialize_untagged_u8(PST_VECTOR, sb);
-    ok &= serialize_untagged_u32(vec_len, sb);
-    for(size_t i=0; i<vec_len; i++) {
-      ok &= serialize(vector_ref(obj, i), sb);
-    }
-    return ok;
-  }
-
-  if(is_uniform_vector(obj)) {
-    size_t npad = 1;
-    size_t vec_len = pmt::length(obj);
-
-    if(is_u8vector(obj)) {
-      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
-      ok &= serialize_untagged_u8(UVI_U8, sb);
-      ok &= serialize_untagged_u32(vec_len, sb);
-      ok &= serialize_untagged_u8(npad, sb);
-      for(size_t i=0; i<npad; i++) {
-	ok &= serialize_untagged_u8(0, sb);
-      }
-      for(size_t i=0; i<vec_len; i++) {
-	ok &= serialize_untagged_u8(u8vector_ref(obj, i), sb);
-      }
-      return ok;
-    }
-
-    if(is_s8vector(obj)) {
-      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
-      ok &= serialize_untagged_u8(UVI_S8, sb);
-      ok &= serialize_untagged_u32(vec_len, sb);
-      ok &= serialize_untagged_u8(npad, sb);
-      for(size_t i=0; i<npad; i++) {
-	ok &= serialize_untagged_u8(0, sb);
-      }
-      for(size_t i=0; i<vec_len; i++) {
-	ok &= serialize_untagged_u8(s8vector_ref(obj, i), sb);
-      }
-      return ok;
-    }
-
-    if(is_u16vector(obj)) {
-      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
-      ok &= serialize_untagged_u8(UVI_U16, sb);
-      ok &= serialize_untagged_u32(vec_len, sb);
-      ok &= serialize_untagged_u8(npad, sb);
-      for(size_t i=0; i<npad; i++) {
-	ok &= serialize_untagged_u8(0, sb);
-      }
-      for(size_t i=0; i<vec_len; i++) {
-	ok &= serialize_untagged_u16(u16vector_ref(obj, i), sb);
-      }
-      return ok;
-    }
-
-    if(is_s16vector(obj)) {
-      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
-      ok &= serialize_untagged_u8(UVI_S16, sb);
-      ok &= serialize_untagged_u32(vec_len, sb);
-      ok &= serialize_untagged_u8(npad, sb);
-      for(size_t i=0; i<npad; i++) {
-	ok &= serialize_untagged_u8(0, sb);
-      }
-      for(size_t i=0; i<vec_len; i++) {
-	ok &= serialize_untagged_u16(s16vector_ref(obj, i), sb);
-      }
-      return ok;
-    }
-
-    if(is_u32vector(obj)) {
-      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
-      ok &= serialize_untagged_u8(UVI_U32, sb);
-      ok &= serialize_untagged_u32(vec_len, sb);
-      ok &= serialize_untagged_u8(npad, sb);
-      for(size_t i=0; i<npad; i++) {
-	ok &= serialize_untagged_u8(0, sb);
-      }
-      for(size_t i=0; i<vec_len; i++) {
-	ok &= serialize_untagged_u32(u32vector_ref(obj, i), sb);
-      }
-      return ok;
-    }
-
-    if(is_s32vector(obj)) {
-      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
-      ok &= serialize_untagged_u8(UVI_S32, sb);
-      ok &= serialize_untagged_u32(vec_len, sb);
-      ok &= serialize_untagged_u8(npad, sb);
-      for(size_t i=0; i<npad; i++) {
-	ok &= serialize_untagged_u8(0, sb);
-      }
-      for(size_t i=0; i<vec_len; i++) {
-	ok &= serialize_untagged_u32(s32vector_ref(obj, i), sb);
-      }
-      return ok;
-    }
-
-    if(is_u64vector(obj)) {
-      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
-      ok &= serialize_untagged_u8(UVI_U64, sb);
-      ok &= serialize_untagged_u32(vec_len, sb);
-      ok &= serialize_untagged_u8(npad, sb);
-      for(size_t i=0; i<npad; i++) {
-	ok &= serialize_untagged_u8(0, sb);
-      }
-      for(size_t i=0; i<vec_len; i++) {
-	ok &= serialize_untagged_u64(u64vector_ref(obj, i), sb);
-      }
-      return ok;
-    }
-
-    if(is_s64vector(obj)) {
-      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
-      ok &= serialize_untagged_u8(UVI_S64, sb);
-      ok &= serialize_untagged_u32(vec_len, sb);
-      ok &= serialize_untagged_u8(npad, sb);
-      for(size_t i=0; i<npad; i++) {
-	ok &= serialize_untagged_u8(0, sb);
-      }
-      for(size_t i=0; i<vec_len; i++) {
-	ok &= serialize_untagged_u64(s64vector_ref(obj, i), sb);
-      }
-      return ok;
-    }
-
-    if(is_f32vector(obj)) {
-      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
-      ok &= serialize_untagged_u8(UVI_F32, sb);
-      ok &= serialize_untagged_u32(vec_len, sb);
-      ok &= serialize_untagged_u8(npad, sb);
-      for(size_t i=0; i<npad; i++) {
-	ok &= serialize_untagged_u8(0, sb);
-      }
-      for(size_t i=0; i<vec_len; i++) {
-	ok &= serialize_untagged_f64(f32vector_ref(obj, i), sb);
-      }
-      return ok;
-    }
-
-    if(is_f64vector(obj)) {
-      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
-      ok &= serialize_untagged_u8(UVI_F64, sb);
-      ok &= serialize_untagged_u32(vec_len, sb);
-      ok &= serialize_untagged_u8(npad, sb);
-      for(size_t i=0; i<npad; i++) {
-	ok &= serialize_untagged_u8(0, sb);
-      }
-      for(size_t i=0; i<vec_len; i++) {
-	ok &= serialize_untagged_f64(f64vector_ref(obj, i), sb);
-      }
-      return ok;
-    }
-
-    if(is_c32vector(obj)) {
-      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
-      ok &= serialize_untagged_u8(UVI_C32, sb);
-      ok &= serialize_untagged_u32(vec_len, sb);
-      ok &= serialize_untagged_u8(npad, sb);
-      for(size_t i=0; i<npad; i++) {
-	ok &= serialize_untagged_u8(0, sb);
-      }
-      for(size_t i=0; i<vec_len; i++) {
-	std::complex<float> c = c32vector_ref(obj, i);
-	ok &= serialize_untagged_f64(c.real(), sb);
-	ok &= serialize_untagged_f64(c.imag(), sb);
-      }
-      return ok;
-    }
-
-    if(is_c64vector(obj)) {
-      ok = serialize_untagged_u8(PST_UNIFORM_VECTOR, sb);
-      ok &= serialize_untagged_u8(UVI_C64, sb);
-      ok &= serialize_untagged_u32(vec_len, sb);
-      ok &= serialize_untagged_u8(npad, sb);
-      for(size_t i=0; i<npad; i++) {
-	ok &= serialize_untagged_u8(0, sb);
-      }
-      for(size_t i=0; i<vec_len; i++) {
-	std::complex<double> c = c64vector_ref(obj, i);
-	ok &= serialize_untagged_f64(c.real(), sb);
-	ok &= serialize_untagged_f64(c.imag(), sb);
-      }
-      return ok;
-    }
-  }
-
-  if (is_dict(obj))
-    throw notimplemented("pmt::serialize (dict)", obj);
-
-  if (is_tuple(obj)){
-    size_t tuple_len = pmt::length(obj);
-    ok = serialize_untagged_u8(PST_TUPLE, sb);
-    ok &= serialize_untagged_u32(tuple_len, sb);
-    for(size_t i=0; i<tuple_len; i++){
-        ok &= serialize(tuple_ref(obj, i), sb);
-    }
-    return ok;
-  }
-  //throw pmt_notimplemented("pmt::serialize (tuple)", obj);
-
-  throw notimplemented("pmt::serialize (?)", obj);
-}
-
-/*
- * Create obj from portable byte-serial representation
- *
- * Returns next obj from streambuf, or PMT_EOF at end of file.
- * Throws exception on malformed input.
- */
-pmt_t
-deserialize(std::streambuf &sb)
-{
-  uint8_t	tag;
-  uint8_t	u8;
-  uint16_t	u16;
-  uint32_t	u32;
-  uint64_t	u64;
-  double	f64;
-  static char   tmpbuf[1024];
-
-  if (!deserialize_untagged_u8(&tag, sb))
-    return PMT_EOF;
-
-  switch (tag){
-  case PST_TRUE:
-    return PMT_T;
-
-  case PST_FALSE:
-    return PMT_F;
-
-  case PST_NULL:
-    return PMT_NIL;
-
-  case PST_SYMBOL:
-    if (!deserialize_untagged_u16(&u16, sb))
-      goto error;
-    if (u16 > sizeof(tmpbuf))
-      throw notimplemented("pmt::deserialize: very long symbol",
-			   PMT_F);
-    if (sb.sgetn(tmpbuf, u16) != u16)
-      goto error;
-    return intern(std::string(tmpbuf, u16));
-
-  case PST_INT32:
-    if (!deserialize_untagged_u32(&u32, sb))
-      goto error;
-    return from_long((int32_t) u32);
-
-  case PST_UINT64:
-    if(!deserialize_untagged_u64(&u64, sb))
-        goto error;
-    return from_uint64(u64);
-
-  case PST_PAIR:
-    return parse_pair(sb);
-
-  case PST_DOUBLE:
-    if(!deserialize_untagged_f64(&f64, sb))
-      goto error;
-    return from_double( f64 );
-
-  case PST_COMPLEX:
-    {
-    double r,i;
-    if(!deserialize_untagged_f64(&r, sb) && !deserialize_untagged_f64(&i, sb))
-      goto error;
-    return make_rectangular( r,i );
-    }
-    
-  case PST_TUPLE:
-    {
-    pmt_t tuple;
-    if(!deserialize_tuple(&tuple, sb)){
-      goto error;
-    }
-    return tuple;
-    }
-
-  case PST_VECTOR:
-    {
-    uint32_t nitems;
-    if(!deserialize_untagged_u32(&nitems, sb))
-      goto error;
-    pmt_t vec = make_vector(nitems, PMT_NIL);
-    for(uint32_t i=0; i<nitems; i++) {
-      pmt_t item = deserialize(sb);
-      vector_set(vec, i, item);
-    }
-    return vec;
-    }
-
-  case PST_UNIFORM_VECTOR:
-    {
-      uint8_t utag, npad;
-      uint32_t nitems;
-
-      if(!deserialize_untagged_u8(&utag, sb))
-	return PMT_EOF;
-
-      if(!deserialize_untagged_u32(&nitems, sb))
-	goto error;
-      
-      deserialize_untagged_u8(&npad, sb);
-      for(size_t i; i < npad; i++)
-	deserialize_untagged_u8(&u8, sb);
-
-      switch(utag) {
-      case(UVI_U8):
-	{
-	  pmt_t vec = make_u8vector(nitems, 0);
-	  for(uint32_t i=0; i<nitems; i++) {
-	    deserialize_untagged_u8(&u8, sb);
-	    u8vector_set(vec, i, u8);
-	  }
-	  return vec;
-	}
-      case(UVI_S8):
-	{
-	  pmt_t vec = make_s8vector(nitems, 0);
-	  for(uint32_t i=0; i<nitems; i++) {
-	    deserialize_untagged_u8(&u8, sb);
-	    s8vector_set(vec, i, u8);
-	  }
-	  return vec;
-	}
-      case(UVI_U16):
-	{
-	  pmt_t vec = make_u16vector(nitems, 0);
-	  for(uint32_t i=0; i<nitems; i++) {
-	    deserialize_untagged_u16(&u16, sb);
-	    u16vector_set(vec, i, u16);
-	  }
-	  return vec;
-	}
-      case(UVI_S16):
-	{
-	  pmt_t vec = make_s16vector(nitems, 0);
-	  for(uint32_t i=0; i<nitems; i++) {
-	    deserialize_untagged_u16(&u16, sb);
-	    s16vector_set(vec, i, u16);
-	  }
-	  return vec;
-	}
-      case(UVI_U32):
-	{
-	  pmt_t vec = make_u32vector(nitems, 0);
-	  for(uint32_t i=0; i<nitems; i++) {
-	    deserialize_untagged_u32(&u32, sb);
-	    u32vector_set(vec, i, u32);
-	  }
-	  return vec;
-	}
-      case(UVI_S32):
-	{
-	  pmt_t vec = make_s32vector(nitems, 0);
-	  for(uint32_t i=0; i<nitems; i++) {
-	    deserialize_untagged_u32(&u32, sb);
-	    s32vector_set(vec, i, u32);
-	  }
-	  return vec;
-	}
-      case(UVI_U64):
-	{
-	  pmt_t vec = make_u64vector(nitems, 0);
-	  for(uint32_t i=0; i<nitems; i++) {
-	    deserialize_untagged_u64(&u64, sb);
-	    u64vector_set(vec, i, u64);
-	  }
-	  return vec;
-	}
-      case(UVI_S64):
-	{
-	  pmt_t vec = make_s64vector(nitems, 0);
-	  for(uint32_t i=0; i<nitems; i++) {
-	    deserialize_untagged_u64(&u64, sb);
-	    s64vector_set(vec, i, u64);
-	  }
-	  return vec;
-	}
-      case(UVI_F32):
-	{
-	  pmt_t vec = make_f32vector(nitems, 0);
-	  for(uint32_t i=0; i<nitems; i++) {
-	    deserialize_untagged_f64(&f64, sb);
-	    f32vector_set(vec, i, static_cast<float>(f64));
-	  }
-	  return vec;
-	}
-      case(UVI_F64):
-	{
-	  pmt_t vec = make_f64vector(nitems, 0);
-	  for(uint32_t i=0; i<nitems; i++) {
-	    deserialize_untagged_f64(&f64, sb);
-	    f64vector_set(vec, i, f64);
-	  }
-	  return vec;
-	}
-      case(UVI_C32):
-	{
-	  pmt_t vec = make_c32vector(nitems, 0);
-	  for(uint32_t i=0; i<nitems; i++) {
-	    float re, im;
-	    deserialize_untagged_f64(&f64, sb);
-	    re = static_cast<float>(f64);
-	    deserialize_untagged_f64(&f64, sb);
-	    im = static_cast<float>(f64);
-	    c32vector_set(vec, i, std::complex<float>(re, im));
-	  }
-	  return vec;
-	}
-
-      case(UVI_C64):
-	{
-	  pmt_t vec = make_c64vector(nitems, 0);
-	  for(uint32_t i=0; i<nitems; i++) {
-	    double re, im;
-	    deserialize_untagged_f64(&f64, sb);
-	    re = f64;
-	    deserialize_untagged_f64(&f64, sb);
-	    im = f64;
-	    c64vector_set(vec, i, std::complex<double>(re, im));
-	  }
-	  return vec;
-	}
-
-      default:
-	throw exception("pmt::deserialize: malformed input stream, tag value = ",
-			from_long(tag));
-      }
-    }
-
-  case PST_DICT:
-  case PST_COMMENT:
-    throw notimplemented("pmt::deserialize: tag value = ",
-			 from_long(tag));
-
-  default:
-    throw exception("pmt::deserialize: malformed input stream, tag value = ",
-		    from_long(tag));
-  }
-
- error:
-  throw exception("pmt::deserialize: malformed input stream", PMT_F);
-}
-
-
-/*
- * provide a simple string accessor to the serialized pmt form
- */
-std::string
-serialize_str(pmt_t obj){
-  std::stringbuf sb;
-  serialize(obj, sb);
-  return sb.str();
-}
-
-
-/*
- * provide a simple string accessor to the deserialized pmt form
- */
-pmt_t
-deserialize_str(std::string s){
-  std::stringbuf sb(s);
-  return deserialize(sb);
-}
-
-
-/*
- * This is a mostly non-recursive implementation that allows us to
- * deserialize very long lists w/o exhausting the evaluation stack.
- *
- * On entry we've already eaten the PST_PAIR tag.
- */
-pmt_t
-parse_pair(std::streambuf &sb)
-{
-  uint8_t tag;
-  pmt_t	val, expr, lastnptr, nptr;
-
-  //
-  // Keep appending nodes until we get a non-PAIR cdr.
-  //
-  lastnptr = PMT_NIL;
-  while (1){
-    expr = deserialize(sb);		// read the car
-
-    nptr = cons(expr, PMT_NIL);	// build new cell
-    if (is_null(lastnptr))
-      val = nptr;
-    else
-      set_cdr(lastnptr, nptr);
-    lastnptr = nptr;
-
-    if (!deserialize_untagged_u8(&tag, sb))  // get tag of cdr
-      throw exception("pmt::deserialize: malformed input stream", PMT_F);
-
-    if (tag == PST_PAIR)
-      continue;			// keep on looping...
-
-    if (tag == PST_NULL){
-      expr = PMT_NIL;
-      break;
-    }
-
-    //
-    // default: push tag back and use pmt_deserialize to get the cdr
-    //
-    sb.sungetc();
-    expr = deserialize(sb);
-    break;
-  }
-
-  //
-  // At this point, expr contains the value of the final cdr in the list.
-  //
-  set_cdr(lastnptr, expr);
-  return val;
-}
-
-} /* namespace pmt */
diff --git a/gruel/src/lib/pmt/qa_pmt.cc b/gruel/src/lib/pmt/qa_pmt.cc
deleted file mode 100644
index 27c617e747..0000000000
--- a/gruel/src/lib/pmt/qa_pmt.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2006 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/*
- * This class gathers together all the test cases for pmt into
- * a single test suite.  As you create new test cases, add them here.
- */
-
-#include <qa_pmt.h>
-#include <qa_pmt_prims.h>
-#include <qa_pmt_unv.h>
-
-CppUnit::TestSuite *
-qa_pmt::suite ()
-{
-  CppUnit::TestSuite	*s = new CppUnit::TestSuite ("pmt");
-
-  s->addTest (qa_pmt_prims::suite ());
-  s->addTest (qa_pmt_unv::suite ());
-
-  return s;
-}
diff --git a/gruel/src/lib/pmt/qa_pmt.h b/gruel/src/lib/pmt/qa_pmt.h
deleted file mode 100644
index 3de5872c74..0000000000
--- a/gruel/src/lib/pmt/qa_pmt.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_QA_PMT_H
-#define INCLUDED_QA_PMT_H
-
-#include <gruel/attributes.h>
-#include <cppunit/TestSuite.h>
-
-//! collect all the tests for pmt
-
-class __GR_ATTR_EXPORT qa_pmt {
- public:
-  //! return suite of tests for all of pmt
-  static CppUnit::TestSuite *suite ();
-};
-
-#endif /* INCLUDED_QA_PMT_H */
diff --git a/gruel/src/lib/pmt/qa_pmt_prims.cc b/gruel/src/lib/pmt/qa_pmt_prims.cc
deleted file mode 100644
index 85d29cf78f..0000000000
--- a/gruel/src/lib/pmt/qa_pmt_prims.cc
+++ /dev/null
@@ -1,601 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2009,2010 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#include <qa_pmt_prims.h>
-#include <cppunit/TestAssert.h>
-#include <gruel/msg_passing.h>
-#include <boost/format.hpp>
-#include <cstdio>
-#include <cstring>
-#include <sstream>
-
-void
-qa_pmt_prims::test_symbols()
-{
-  CPPUNIT_ASSERT(!pmt::is_symbol(pmt::PMT_T));
-  CPPUNIT_ASSERT(!pmt::is_symbol(pmt::PMT_F));
-  CPPUNIT_ASSERT_THROW(pmt::symbol_to_string(pmt::PMT_F), pmt::wrong_type);
-
-  pmt::pmt_t sym1 = pmt::mp("test");
-  CPPUNIT_ASSERT(pmt::is_symbol(sym1));
-  CPPUNIT_ASSERT_EQUAL(std::string("test"), pmt::symbol_to_string(sym1));
-  CPPUNIT_ASSERT(pmt::is_true(sym1));
-  CPPUNIT_ASSERT(!pmt::is_false(sym1));
-
-  pmt::pmt_t sym2 = pmt::mp("foo");
-  pmt::pmt_t sym3 = pmt::mp("test");
-  CPPUNIT_ASSERT_EQUAL(sym1, sym3);
-  CPPUNIT_ASSERT(sym1 != sym2);
-  CPPUNIT_ASSERT(sym1 == sym3);
-
-  static const int N = 2048;
-  std::vector<pmt::pmt_t> v1(N);
-  std::vector<pmt::pmt_t> v2(N);
-
-  // generate a bunch of symbols
-  for (int i = 0; i < N; i++){
-    std::string buf = str(boost::format("test-%d") % i);
-    v1[i] = pmt::mp(buf.c_str());
-  }
-
-  // confirm that they are all unique
-  for (int i = 0; i < N; i++)
-    for (int j = i + 1; j < N; j++)
-      CPPUNIT_ASSERT(v1[i] != v1[j]);
-
-  // generate the same symbols again
-  for (int i = 0; i < N; i++){
-    std::string buf = str(boost::format("test-%d") % i);
-    v2[i] = pmt::mp(buf.c_str());
-  }
-
-  // confirm that we get the same ones back
-  for (int i = 0; i < N; i++)
-    CPPUNIT_ASSERT(v1[i] == v2[i]);
-}
-
-void
-qa_pmt_prims::test_booleans()
-{
-  pmt::pmt_t sym = pmt::mp("test");
-  CPPUNIT_ASSERT(pmt::is_bool(pmt::PMT_T));
-  CPPUNIT_ASSERT(pmt::is_bool(pmt::PMT_F));
-  CPPUNIT_ASSERT(!pmt::is_bool(sym));
-  CPPUNIT_ASSERT_EQUAL(pmt::from_bool(false), pmt::PMT_F);
-  CPPUNIT_ASSERT_EQUAL(pmt::from_bool(true), pmt::PMT_T);
-  CPPUNIT_ASSERT_EQUAL(false, pmt::to_bool(pmt::PMT_F));
-  CPPUNIT_ASSERT_EQUAL(true, pmt::to_bool(pmt::PMT_T));
-  CPPUNIT_ASSERT_THROW(pmt::to_bool(sym), pmt::wrong_type);
-}
-
-void
-qa_pmt_prims::test_integers()
-{
-  pmt::pmt_t p1 = pmt::from_long(1);
-  pmt::pmt_t m1 = pmt::from_long(-1);
-  CPPUNIT_ASSERT(!pmt::is_integer(pmt::PMT_T));
-  CPPUNIT_ASSERT(pmt::is_integer(p1));
-  CPPUNIT_ASSERT(pmt::is_integer(m1));
-  CPPUNIT_ASSERT_THROW(pmt::to_long(pmt::PMT_T), pmt::wrong_type);
-  CPPUNIT_ASSERT_EQUAL(-1L, pmt::to_long(m1));
-  CPPUNIT_ASSERT_EQUAL(1L, pmt::to_long(p1));
-}
-
-void
-qa_pmt_prims::test_uint64s()
-{
-  pmt::pmt_t p1 = pmt::from_uint64((uint64_t)1);
-  pmt::pmt_t m1 = pmt::from_uint64((uint64_t)8589934592ULL);
-  CPPUNIT_ASSERT(!pmt::is_uint64(pmt::PMT_T));
-  CPPUNIT_ASSERT(pmt::is_uint64(p1));
-  CPPUNIT_ASSERT(pmt::is_uint64(m1));
-  CPPUNIT_ASSERT_THROW(pmt::to_uint64(pmt::PMT_T), pmt::wrong_type);
-  CPPUNIT_ASSERT_EQUAL((uint64_t)8589934592ULL, (uint64_t)pmt::to_uint64(m1));
-  CPPUNIT_ASSERT_EQUAL((uint64_t)1ULL, (uint64_t)pmt::to_uint64(p1));
-}
-
-void
-qa_pmt_prims::test_reals()
-{
-  pmt::pmt_t p1 = pmt::from_double(1);
-  pmt::pmt_t m1 = pmt::from_double(-1);
-  CPPUNIT_ASSERT(!pmt::is_real(pmt::PMT_T));
-  CPPUNIT_ASSERT(pmt::is_real(p1));
-  CPPUNIT_ASSERT(pmt::is_real(m1));
-  CPPUNIT_ASSERT_THROW(pmt::to_double(pmt::PMT_T), pmt::wrong_type);
-  CPPUNIT_ASSERT_EQUAL(-1.0, pmt::to_double(m1));
-  CPPUNIT_ASSERT_EQUAL(1.0, pmt::to_double(p1));
-  CPPUNIT_ASSERT_EQUAL(1.0, pmt::to_double(pmt::from_long(1)));
-}
-
-void
-qa_pmt_prims::test_complexes()
-{
-  pmt::pmt_t p1 = pmt::make_rectangular(2, -3);
-  pmt::pmt_t m1 = pmt::make_rectangular(-3, 2);
-  pmt::pmt_t p2 = pmt::from_complex(2, -3);
-  pmt::pmt_t m2 = pmt::from_complex(-3, 2);
-  pmt::pmt_t p3 = pmt::from_complex(std::complex<double>(2, -3));
-  pmt::pmt_t m3 = pmt::from_complex(std::complex<double>(-3, 2));
-  CPPUNIT_ASSERT(!pmt::is_complex(pmt::PMT_T));
-  CPPUNIT_ASSERT(pmt::is_complex(p1));
-  CPPUNIT_ASSERT(pmt::is_complex(m1));
-  CPPUNIT_ASSERT(pmt::is_complex(p2));
-  CPPUNIT_ASSERT(pmt::is_complex(m2));
-  CPPUNIT_ASSERT(pmt::is_complex(p3));
-  CPPUNIT_ASSERT(pmt::is_complex(m3));
-  CPPUNIT_ASSERT_THROW(pmt::to_complex(pmt::PMT_T), pmt::wrong_type);
-  CPPUNIT_ASSERT_EQUAL(std::complex<double>(2, -3), pmt::to_complex(p1));
-  CPPUNIT_ASSERT_EQUAL(std::complex<double>(-3, 2), pmt::to_complex(m1));
-  CPPUNIT_ASSERT_EQUAL(std::complex<double>(2, -3), pmt::to_complex(p2));
-  CPPUNIT_ASSERT_EQUAL(std::complex<double>(-3, 2), pmt::to_complex(m2));
-  CPPUNIT_ASSERT_EQUAL(std::complex<double>(2, -3), pmt::to_complex(p3));
-  CPPUNIT_ASSERT_EQUAL(std::complex<double>(-3, 2), pmt::to_complex(m3));
-  CPPUNIT_ASSERT_EQUAL(std::complex<double>(1.0, 0), pmt::to_complex(pmt::from_long(1)));
-  CPPUNIT_ASSERT_EQUAL(std::complex<double>(1.0, 0), pmt::to_complex(pmt::from_double(1.0)));
-}
-
-void
-qa_pmt_prims::test_pairs()
-{
-  CPPUNIT_ASSERT(pmt::is_null(pmt::PMT_NIL));
-  CPPUNIT_ASSERT(!pmt::is_pair(pmt::PMT_NIL));
-  pmt::pmt_t s1 = pmt::mp("s1");
-  pmt::pmt_t s2 = pmt::mp("s2");
-  pmt::pmt_t s3 = pmt::mp("s3");
-
-
-  CPPUNIT_ASSERT_EQUAL((size_t)0, pmt::length(pmt::PMT_NIL));
-  CPPUNIT_ASSERT_THROW(pmt::length(s1), pmt::wrong_type);
-  CPPUNIT_ASSERT_THROW(pmt::length(pmt::from_double(42)), pmt::wrong_type);
-
-  pmt::pmt_t c1 = pmt::cons(s1, pmt::PMT_NIL);
-  CPPUNIT_ASSERT(pmt::is_pair(c1));
-  CPPUNIT_ASSERT(!pmt::is_pair(s1));
-  CPPUNIT_ASSERT_EQUAL(s1, pmt::car(c1));
-  CPPUNIT_ASSERT_EQUAL(pmt::PMT_NIL, pmt::cdr(c1));
-  CPPUNIT_ASSERT_EQUAL((size_t) 1, pmt::length(c1));
-
-  pmt::pmt_t c3 = pmt::cons(s3, pmt::PMT_NIL);
-  pmt::pmt_t c2 = pmt::cons(s2, c3);
-  pmt::set_cdr(c1, c2);
-  CPPUNIT_ASSERT_EQUAL(c2, pmt::cdr(c1));
-  pmt::set_car(c1, s3);
-  CPPUNIT_ASSERT_EQUAL(s3, pmt::car(c1));
-  CPPUNIT_ASSERT_EQUAL((size_t)1, pmt::length(c3));
-  CPPUNIT_ASSERT_EQUAL((size_t)2, pmt::length(c2));
-
-  CPPUNIT_ASSERT_THROW(pmt::cdr(pmt::PMT_NIL), pmt::wrong_type);
-  CPPUNIT_ASSERT_THROW(pmt::car(pmt::PMT_NIL), pmt::wrong_type);
-  CPPUNIT_ASSERT_THROW(pmt::set_car(s1, pmt::PMT_NIL), pmt::wrong_type);
-  CPPUNIT_ASSERT_THROW(pmt::set_cdr(s1, pmt::PMT_NIL), pmt::wrong_type);
-}
-
-void
-qa_pmt_prims::test_vectors()
-{
-  static const size_t N = 3;
-  pmt::pmt_t v1 = pmt::make_vector(N, pmt::PMT_NIL);
-  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
-  pmt::pmt_t s0 = pmt::mp("s0");
-  pmt::pmt_t s1 = pmt::mp("s1");
-  pmt::pmt_t s2 = pmt::mp("s2");
-
-  pmt::vector_set(v1, 0, s0);
-  pmt::vector_set(v1, 1, s1);
-  pmt::vector_set(v1, 2, s2);
-
-  CPPUNIT_ASSERT_EQUAL(s0, pmt::vector_ref(v1, 0));
-  CPPUNIT_ASSERT_EQUAL(s1, pmt::vector_ref(v1, 1));
-  CPPUNIT_ASSERT_EQUAL(s2, pmt::vector_ref(v1, 2));
-
-  CPPUNIT_ASSERT_THROW(pmt::vector_ref(v1, N), pmt::out_of_range);
-  CPPUNIT_ASSERT_THROW(pmt::vector_set(v1, N, pmt::PMT_NIL), pmt::out_of_range);
-
-  pmt::vector_fill(v1, s0);
-  for (size_t i = 0; i < N; i++)
-    CPPUNIT_ASSERT_EQUAL(s0, pmt::vector_ref(v1, i));
-}
-
-static void
-check_tuple(size_t len, const std::vector<pmt::pmt_t> &s, pmt::pmt_t t)
-{
-  CPPUNIT_ASSERT_EQUAL(true, pmt::is_tuple(t));
-  CPPUNIT_ASSERT_EQUAL(len, pmt::length(t));
-
-  for (size_t i = 0; i < len; i++)
-    CPPUNIT_ASSERT_EQUAL(s[i], pmt::tuple_ref(t, i));
-
-}
-
-void
-qa_pmt_prims::test_tuples()
-{
-  pmt::pmt_t v = pmt::make_vector(10, pmt::PMT_NIL);
-  std::vector<pmt::pmt_t> s(10);
-  for (size_t i = 0; i < 10; i++){
-    std::ostringstream os;
-    os << "s" << i;
-    s[i] = pmt::mp(os.str());
-    pmt::vector_set(v, i, s[i]);
-  }
-
-
-  pmt::pmt_t t;
-
-  t = pmt::make_tuple();
-  check_tuple(0, s, t);
-
-  t = pmt::make_tuple(s[0]);
-  check_tuple(1, s, t);
-
-  CPPUNIT_ASSERT(pmt::is_vector(v));
-  CPPUNIT_ASSERT(!pmt::is_tuple(v));
-  CPPUNIT_ASSERT(pmt::is_tuple(t));
-  CPPUNIT_ASSERT(!pmt::is_vector(t));
-
-  t = pmt::make_tuple(s[0], s[1]);
-  check_tuple(2, s, t);
-
-  t = pmt::make_tuple(s[0], s[1], s[2]);
-  check_tuple(3, s, t);
-
-  t = pmt::make_tuple(s[0], s[1], s[2], s[3]);
-  check_tuple(4, s, t);
-
-  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4]);
-  check_tuple(5, s, t);
-
-  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4], s[5]);
-  check_tuple(6, s, t);
-
-  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4], s[5], s[6]);
-  check_tuple(7, s, t);
-
-  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7]);
-  check_tuple(8, s, t);
-
-  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[8]);
-  check_tuple(9, s, t);
-
-  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[8], s[9]);
-  check_tuple(10, s, t);
-
-  t = pmt::make_tuple(s[0], s[1], s[2]);
-  CPPUNIT_ASSERT_THROW(pmt::tuple_ref(t, 3), pmt::out_of_range);
-  CPPUNIT_ASSERT_THROW(pmt::vector_ref(t, 0), pmt::wrong_type);
-  CPPUNIT_ASSERT_THROW(pmt::tuple_ref(v, 0), pmt::wrong_type);
-
-  t = pmt::make_tuple(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[8], s[9]);
-  pmt::pmt_t t2 = pmt::to_tuple(v);
-  CPPUNIT_ASSERT_EQUAL(size_t(10), pmt::length(v));
-  CPPUNIT_ASSERT(pmt::equal(t, t2));
-  //std::cout << v << std::endl;
-  //std::cout << t2 << std::endl;
-
-
-  t = pmt::make_tuple(s[0], s[1], s[2]);
-  pmt::pmt_t list0 = pmt::list3(s[0], s[1], s[2]);
-  CPPUNIT_ASSERT_EQUAL(size_t(3), pmt::length(list0));
-  t2 = pmt::to_tuple(list0);
-  CPPUNIT_ASSERT_EQUAL(size_t(3), pmt::length(t2));
-  CPPUNIT_ASSERT(pmt::equal(t, t2));
-}
-
-void
-qa_pmt_prims::test_equivalence()
-{
-  pmt::pmt_t s0 = pmt::mp("s0");
-  pmt::pmt_t s1 = pmt::mp("s1");
-  pmt::pmt_t s2 = pmt::mp("s2");
-  pmt::pmt_t list0 = pmt::cons(s0, pmt::cons(s1, pmt::cons(s2, pmt::PMT_NIL)));
-  pmt::pmt_t list1 = pmt::cons(s0, pmt::cons(s1, pmt::cons(s2, pmt::PMT_NIL)));
-  pmt::pmt_t i0 = pmt::from_long(42);
-  pmt::pmt_t i1 = pmt::from_long(42);
-  pmt::pmt_t r0 = pmt::from_double(42);
-  pmt::pmt_t r1 = pmt::from_double(42);
-  pmt::pmt_t r2 = pmt::from_double(43);
-
-  CPPUNIT_ASSERT(pmt::eq(s0, s0));
-  CPPUNIT_ASSERT(!pmt::eq(s0, s1));
-  CPPUNIT_ASSERT(pmt::eqv(s0, s0));
-  CPPUNIT_ASSERT(!pmt::eqv(s0, s1));
-
-  CPPUNIT_ASSERT(pmt::eqv(i0, i1));
-  CPPUNIT_ASSERT(pmt::eqv(r0, r1));
-  CPPUNIT_ASSERT(!pmt::eqv(r0, r2));
-  CPPUNIT_ASSERT(!pmt::eqv(i0, r0));
-
-  CPPUNIT_ASSERT(!pmt::eq(list0, list1));
-  CPPUNIT_ASSERT(!pmt::eqv(list0, list1));
-  CPPUNIT_ASSERT(pmt::equal(list0, list1));
-
-  pmt::pmt_t v0 = pmt::make_vector(3, s0);
-  pmt::pmt_t v1 = pmt::make_vector(3, s0);
-  pmt::pmt_t v2 = pmt::make_vector(4, s0);
-  CPPUNIT_ASSERT(!pmt::eqv(v0, v1));
-  CPPUNIT_ASSERT(pmt::equal(v0, v1));
-  CPPUNIT_ASSERT(!pmt::equal(v0, v2));
-
-  pmt::vector_set(v0, 0, list0);
-  pmt::vector_set(v0, 1, list0);
-  pmt::vector_set(v1, 0, list1);
-  pmt::vector_set(v1, 1, list1);
-  CPPUNIT_ASSERT(pmt::equal(v0, v1));
-}
-
-void
-qa_pmt_prims::test_misc()
-{
-  pmt::pmt_t k0 = pmt::mp("k0");
-  pmt::pmt_t k1 = pmt::mp("k1");
-  pmt::pmt_t k2 = pmt::mp("k2");
-  pmt::pmt_t k3 = pmt::mp("k3");
-  pmt::pmt_t v0 = pmt::mp("v0");
-  pmt::pmt_t v1 = pmt::mp("v1");
-  pmt::pmt_t v2 = pmt::mp("v2");
-  pmt::pmt_t p0 = pmt::cons(k0, v0);
-  pmt::pmt_t p1 = pmt::cons(k1, v1);
-  pmt::pmt_t p2 = pmt::cons(k2, v2);
-
-  pmt::pmt_t alist = pmt::cons(p0, pmt::cons(p1, pmt::cons(p2, pmt::PMT_NIL)));
-  CPPUNIT_ASSERT(pmt::eq(p1, pmt::assv(k1, alist)));
-  CPPUNIT_ASSERT(pmt::eq(pmt::PMT_F, pmt::assv(k3, alist)));
-
-  pmt::pmt_t keys = pmt::cons(k0, pmt::cons(k1, pmt::cons(k2, pmt::PMT_NIL)));
-  pmt::pmt_t vals = pmt::cons(v0, pmt::cons(v1, pmt::cons(v2, pmt::PMT_NIL)));
-  CPPUNIT_ASSERT(pmt::equal(keys, pmt::map(pmt::car, alist)));
-  CPPUNIT_ASSERT(pmt::equal(vals, pmt::map(pmt::cdr, alist)));
-}
-
-void
-qa_pmt_prims::test_dict()
-{
-  pmt::pmt_t dict = pmt::make_dict();
-  CPPUNIT_ASSERT(pmt::is_dict(dict));
-
-  pmt::pmt_t k0 = pmt::mp("k0");
-  pmt::pmt_t k1 = pmt::mp("k1");
-  pmt::pmt_t k2 = pmt::mp("k2");
-  pmt::pmt_t k3 = pmt::mp("k3");
-  pmt::pmt_t v0 = pmt::mp("v0");
-  pmt::pmt_t v1 = pmt::mp("v1");
-  pmt::pmt_t v2 = pmt::mp("v2");
-  pmt::pmt_t v3 = pmt::mp("v3");
-  pmt::pmt_t not_found = pmt::cons(pmt::PMT_NIL, pmt::PMT_NIL);
-
-  CPPUNIT_ASSERT(!pmt::dict_has_key(dict, k0));
-  dict = pmt::dict_add(dict, k0, v0);
-  CPPUNIT_ASSERT(pmt::dict_has_key(dict, k0));
-  CPPUNIT_ASSERT(pmt::eqv(pmt::dict_ref(dict, k0, not_found), v0));
-  CPPUNIT_ASSERT(pmt::eqv(pmt::dict_ref(dict, k1, not_found), not_found));
-  dict = pmt::dict_add(dict, k1, v1);
-  dict = pmt::dict_add(dict, k2, v2);
-  CPPUNIT_ASSERT(pmt::eqv(pmt::dict_ref(dict, k1, not_found), v1));
-  dict = pmt::dict_add(dict, k1, v3);
-  CPPUNIT_ASSERT(pmt::eqv(pmt::dict_ref(dict, k1, not_found), v3));
-
-  pmt::pmt_t keys = pmt::list3(k1, k2, k0);
-  pmt::pmt_t vals = pmt::list3(v3, v2, v0);
-  //std::cout << "pmt::dict_keys:   " << pmt::dict_keys(dict) << std::endl;
-  //std::cout << "pmt::dict_values: " << pmt::dict_values(dict) << std::endl;
-  CPPUNIT_ASSERT(pmt::equal(keys, pmt::dict_keys(dict)));
-  CPPUNIT_ASSERT(pmt::equal(vals, pmt::dict_values(dict)));
-}
-
-void
-qa_pmt_prims::test_io()
-{
-  pmt::pmt_t k0 = pmt::mp("k0");
-  pmt::pmt_t k1 = pmt::mp("k1");
-  pmt::pmt_t k2 = pmt::mp("k2");
-  pmt::pmt_t k3 = pmt::mp("k3");
-
-  CPPUNIT_ASSERT_EQUAL(std::string("k0"), pmt::write_string(k0));
-}
-
-void
-qa_pmt_prims::test_lists()
-{
-  pmt::pmt_t s0 = pmt::mp("s0");
-  pmt::pmt_t s1 = pmt::mp("s1");
-  pmt::pmt_t s2 = pmt::mp("s2");
-  pmt::pmt_t s3 = pmt::mp("s3");
-
-  pmt::pmt_t l1 = pmt::list4(s0, s1, s2, s3);
-  pmt::pmt_t l2 = pmt::list3(s0, s1, s2);
-  pmt::pmt_t l3 = pmt::list_add(l2, s3);
-  CPPUNIT_ASSERT(pmt::equal(l1, l3));
-}
-
-// ------------------------------------------------------------------------
-
-// class foo is used in test_any below.
-// It can't be declared in the scope of test_any because of template
-// namespace problems.
-
-class foo {
-public:
-  double	d_double;
-  int		d_int;
-  foo(double d=0, int i=0) : d_double(d), d_int(i) {}
-};
-
-bool operator==(const foo &a, const foo &b)
-{
-  return a.d_double == b.d_double && a.d_int == b.d_int;
-}
-
-std::ostream& operator<<(std::ostream &os, const foo obj)
-{
-  os << "<foo: " << obj.d_double << ", " << obj.d_int << ">";
-  return os;
-}
-
-void
-qa_pmt_prims::test_any()
-{
-  boost::any a0;
-  boost::any a1;
-  boost::any a2;
-
-  a0 = std::string("Hello!");
-  a1 = 42;
-  a2 = foo(3.250, 21);
-
-  pmt::pmt_t p0 = pmt::make_any(a0);
-  pmt::pmt_t p1 = pmt::make_any(a1);
-  pmt::pmt_t p2 = pmt::make_any(a2);
-
-  CPPUNIT_ASSERT_EQUAL(std::string("Hello!"),
-		       boost::any_cast<std::string>(pmt::any_ref(p0)));
-
-  CPPUNIT_ASSERT_EQUAL(42,
-		       boost::any_cast<int>(pmt::any_ref(p1)));
-
-  CPPUNIT_ASSERT_EQUAL(foo(3.250, 21),
-		       boost::any_cast<foo>(pmt::any_ref(p2)));
-}
-
-// ------------------------------------------------------------------------
-
-class qa_pmt_msg_accepter_nop : public gruel::msg_accepter {
-public:
-  qa_pmt_msg_accepter_nop(){};
-  ~qa_pmt_msg_accepter_nop();
-  void post(pmt::pmt_t,pmt::pmt_t){};
-};
-
-qa_pmt_msg_accepter_nop::~qa_pmt_msg_accepter_nop(){}
-
-void
-qa_pmt_prims::test_msg_accepter()
-{
-  pmt::pmt_t sym = pmt::mp("my-symbol");
-
-  boost::any a0;
-  a0 = std::string("Hello!");
-  pmt::pmt_t p0 = pmt::make_any(a0);
-
-  gruel::msg_accepter_sptr ma0 = gruel::msg_accepter_sptr(new qa_pmt_msg_accepter_nop());
-  pmt::pmt_t p1 = pmt::make_msg_accepter(ma0);
-
-  CPPUNIT_ASSERT_EQUAL(ma0.get(), pmt::msg_accepter_ref(p1).get());
-
-  CPPUNIT_ASSERT_THROW(pmt::msg_accepter_ref(sym), pmt::wrong_type);
-  CPPUNIT_ASSERT_THROW(pmt::msg_accepter_ref(p0),  pmt::wrong_type);
-
-  // just confirm interfaces on send are OK
-  pmt::pmt_t port(pmt::intern("port"));
-  gruel::send(ma0.get(), port, sym);
-  gruel::send(ma0, port, sym);
-  gruel::send(p1, port, sym);
-
-}
-
-// ------------------------------------------------------------------------
-
-void
-qa_pmt_prims::test_serialize()
-{
-  std::stringbuf sb;		// fake channel
-  pmt::pmt_t a = pmt::mp("a");
-  pmt::pmt_t b = pmt::mp("b");
-  pmt::pmt_t c = pmt::mp("c");
-
-  sb.str("");			// reset channel to empty
-
-  // write stuff to channel
-
-  pmt::serialize(pmt::PMT_NIL, sb);
-  pmt::serialize(pmt::mp("foobarvia"), sb);
-  pmt::serialize(pmt::from_long(123456789), sb);
-  pmt::serialize(pmt::from_long(-123456789), sb);
-  pmt::serialize(pmt::cons(pmt::PMT_NIL, pmt::PMT_NIL), sb);
-  pmt::serialize(pmt::cons(a, b), sb);
-  pmt::serialize(pmt::list1(a), sb);
-  pmt::serialize(pmt::list2(a, b), sb);
-  pmt::serialize(pmt::list3(a, b, c), sb);
-  pmt::serialize(pmt::list3(a, pmt::list3(c, b, a), c), sb);
-  pmt::serialize(pmt::PMT_T, sb);
-  pmt::serialize(pmt::PMT_F, sb);
-
-  // read it back
-
-  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::PMT_NIL));
-  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::mp("foobarvia")));
-  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::from_long(123456789)));
-  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::from_long(-123456789)));
-  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::cons(pmt::PMT_NIL, pmt::PMT_NIL)));
-  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::cons(a, b)));
-  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::list1(a)));
-  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::list2(a, b)));
-  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::list3(a, b, c)));
-  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::list3(a, pmt::list3(c, b, a), c)));
-  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::PMT_T));
-  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::PMT_F));
-
-  CPPUNIT_ASSERT(pmt::equal(pmt::deserialize(sb), pmt::PMT_EOF));	// last item
-
-
-  // FIXME add tests for real, complex, vector, uniform-vector, dict
-  // FIXME add tests for malformed input too.
-
-}
-
-void
-qa_pmt_prims::test_sets()
-{
-  pmt::pmt_t s1 = pmt::mp("s1");
-  pmt::pmt_t s2 = pmt::mp("s2");
-  pmt::pmt_t s3 = pmt::mp("s3");
-
-  pmt::pmt_t l1 = pmt::list1(s1);
-  pmt::pmt_t l2 = pmt::list2(s2,s3);
-  pmt::pmt_t l3 = pmt::list3(s1,s2,s3);
-
-  CPPUNIT_ASSERT(pmt::is_pair(pmt::memq(s1,l1)));
-  CPPUNIT_ASSERT(pmt::is_false(pmt::memq(s3,l1)));
-
-  CPPUNIT_ASSERT(pmt::subsetp(l1,l3));
-  CPPUNIT_ASSERT(pmt::subsetp(l2,l3));
-  CPPUNIT_ASSERT(!pmt::subsetp(l1,l2));
-  CPPUNIT_ASSERT(!pmt::subsetp(l2,l1));
-  CPPUNIT_ASSERT(!pmt::subsetp(l3,l2));
-}
-
-void
-qa_pmt_prims::test_sugar()
-{
-  CPPUNIT_ASSERT(pmt::is_symbol(pmt::mp("my-symbol")));
-  CPPUNIT_ASSERT_EQUAL((long) 10, pmt::to_long(pmt::mp(10)));
-  CPPUNIT_ASSERT_EQUAL((double) 1e6, pmt::to_double(pmt::mp(1e6)));
-  CPPUNIT_ASSERT_EQUAL(std::complex<double>(2, 3),
-		       pmt::to_complex(pmt::mp(std::complex<double>(2, 3))));
-
-  int buf[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
-  pmt::pmt_t blob = pmt::mp(buf, sizeof(buf));
-  const void *data = pmt::blob_data(blob);
-  size_t nbytes = pmt::blob_length(blob);
-  CPPUNIT_ASSERT_EQUAL(sizeof(buf), nbytes);
-  CPPUNIT_ASSERT(memcmp(buf, data, nbytes) == 0);
-}
diff --git a/gruel/src/lib/pmt/qa_pmt_prims.h b/gruel/src/lib/pmt/qa_pmt_prims.h
deleted file mode 100644
index a407509b2c..0000000000
--- a/gruel/src/lib/pmt/qa_pmt_prims.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-#ifndef INCLUDED_QA_PMT_PRIMS_H
-#define INCLUDED_QA_PMT_PRIMS_H
-
-#include <gruel/attributes.h>
-#include <gruel/api.h> //reason: suppress warnings
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/TestCase.h>
-
-class __GR_ATTR_EXPORT qa_pmt_prims : public CppUnit::TestCase {
-
-  CPPUNIT_TEST_SUITE(qa_pmt_prims);
-  CPPUNIT_TEST(test_symbols);
-  CPPUNIT_TEST(test_booleans);
-  CPPUNIT_TEST(test_integers);
-  CPPUNIT_TEST(test_uint64s);
-  CPPUNIT_TEST(test_reals);
-  CPPUNIT_TEST(test_complexes);
-  CPPUNIT_TEST(test_pairs);
-  CPPUNIT_TEST(test_vectors);
-  CPPUNIT_TEST(test_tuples);
-  CPPUNIT_TEST(test_equivalence);
-  CPPUNIT_TEST(test_misc);
-  CPPUNIT_TEST(test_dict);
-  CPPUNIT_TEST(test_any);
-  CPPUNIT_TEST(test_msg_accepter);
-  CPPUNIT_TEST(test_io);
-  CPPUNIT_TEST(test_lists);
-  CPPUNIT_TEST(test_serialize);
-  CPPUNIT_TEST(test_sets);
-  CPPUNIT_TEST(test_sugar);
-  CPPUNIT_TEST_SUITE_END();
-
- private:
-  void test_symbols();
-  void test_booleans();
-  void test_integers();
-  void test_uint64s();
-  void test_reals();
-  void test_complexes();
-  void test_pairs();
-  void test_vectors();
-  void test_tuples();
-  void test_equivalence();
-  void test_misc();
-  void test_dict();
-  void test_any();
-  void test_msg_accepter();
-  void test_io();
-  void test_lists();
-  void test_serialize();
-  void test_sets();
-  void test_sugar();
-};
-
-#endif /* INCLUDED_QA_PMT_PRIMS_H */
-
diff --git a/gruel/src/lib/pmt/unv_qa_template.cc.t b/gruel/src/lib/pmt/unv_qa_template.cc.t
deleted file mode 100644
index a04d532b4e..0000000000
--- a/gruel/src/lib/pmt/unv_qa_template.cc.t
+++ /dev/null
@@ -1,35 +0,0 @@
-void
-qa_pmt_unv::test_@TAG@vector()
-{
-  static const size_t N = 3;
-  pmt_t v1 = pmt::make_@TAG@vector(N, 0);
-  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
-  @TYPE@ s0 = @TYPE@(10);
-  @TYPE@ s1 = @TYPE@(20);
-  @TYPE@ s2 = @TYPE@(30);
-
-  pmt::@TAG@vector_set(v1, 0, s0);
-  pmt::@TAG@vector_set(v1, 1, s1);
-  pmt::@TAG@vector_set(v1, 2, s2);
-
-  CPPUNIT_ASSERT_EQUAL(s0, pmt::@TAG@vector_ref(v1, 0));
-  CPPUNIT_ASSERT_EQUAL(s1, pmt::@TAG@vector_ref(v1, 1));
-  CPPUNIT_ASSERT_EQUAL(s2, pmt::@TAG@vector_ref(v1, 2));
-
-  CPPUNIT_ASSERT_THROW(pmt::@TAG@vector_ref(v1, N), pmt::out_of_range);
-  CPPUNIT_ASSERT_THROW(pmt::@TAG@vector_set(v1, N, @TYPE@(0)), pmt::out_of_range);
-
-  size_t	len;
-  const @TYPE@ *rd = pmt::@TAG@vector_elements(v1, len);
-  CPPUNIT_ASSERT_EQUAL(len, N);
-  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
-  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
-  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
-
-  @TYPE@ *wr = pmt::@TAG@vector_writable_elements(v1, len);
-  CPPUNIT_ASSERT_EQUAL(len, N);
-  wr[0] = @TYPE@(0);
-  CPPUNIT_ASSERT_EQUAL(@TYPE@(0), wr[0]);
-  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
-  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
-}
diff --git a/gruel/src/lib/pmt/unv_template.cc.t b/gruel/src/lib/pmt/unv_template.cc.t
deleted file mode 100644
index 8678894973..0000000000
--- a/gruel/src/lib/pmt/unv_template.cc.t
+++ /dev/null
@@ -1,141 +0,0 @@
-////////////////////////////////////////////////////////////////////////////
-//                           pmt_@TAG@vector
-////////////////////////////////////////////////////////////////////////////
-
-namespace pmt {
-
-static pmt_@TAG@vector *
-_@TAG@vector(pmt_t x)
-{
-  return dynamic_cast<pmt_@TAG@vector*>(x.get());
-}
-
-
-pmt_@TAG@vector::pmt_@TAG@vector(size_t k, @TYPE@ fill)
-  : d_v(k)
-{
-  for (size_t i = 0; i < k; i++)
-    d_v[i] = fill;
-}
-
-pmt_@TAG@vector::pmt_@TAG@vector(size_t k, const @TYPE@ *data)
-  : d_v(k)
-{
-  for (size_t i = 0; i < k; i++)
-    d_v[i] = data[i];
-}
-
-@TYPE@
-pmt_@TAG@vector::ref(size_t k) const
-{
-  if (k >= length())
-    throw out_of_range("pmt_@TAG@vector_ref", from_long(k));
-  return d_v[k];
-}
-
-void
-pmt_@TAG@vector::set(size_t k, @TYPE@ x)
-{
-  if (k >= length())
-    throw out_of_range("pmt_@TAG@vector_set", from_long(k));
-  d_v[k] = x;
-}
-
-const @TYPE@ *
-pmt_@TAG@vector::elements(size_t &len)
-{
-  len = length();
-  return &d_v[0];
-}
-
-@TYPE@ *
-pmt_@TAG@vector::writable_elements(size_t &len)
-{
-  len = length();
-  return &d_v[0];
-}
-
-const void*
-pmt_@TAG@vector::uniform_elements(size_t &len)
-{
-  len = length() * sizeof(@TYPE@);
-  return &d_v[0];
-}
-
-void*
-pmt_@TAG@vector::uniform_writable_elements(size_t &len)
-{
-  len = length() * sizeof(@TYPE@);
-  return &d_v[0];
-}
-
-bool
-is_@TAG@vector(pmt_t obj)
-{
-  return obj->is_@TAG@vector();
-}
-
-pmt_t
-make_@TAG@vector(size_t k, @TYPE@ fill)
-{
-  return pmt_t(new pmt_@TAG@vector(k, fill));
-}
-
-pmt_t
-init_@TAG@vector(size_t k, const @TYPE@ *data)
-{
-  return pmt_t(new pmt_@TAG@vector(k, data));
-}
-
-pmt_t
-init_@TAG@vector(size_t k, const std::vector< @TYPE@ > &data)
-{
-  
-  return pmt_t(new pmt_@TAG@vector(k, &data[0]));
-}
-
-@TYPE@
-@TAG@vector_ref(pmt_t vector, size_t k)
-{
-  if (!vector->is_@TAG@vector())
-    throw wrong_type("pmt_@TAG@vector_ref", vector);
-  return _@TAG@vector(vector)->ref(k);
-}
-
-void
-@TAG@vector_set(pmt_t vector, size_t k, @TYPE@ obj)
-{
-  if (!vector->is_@TAG@vector())
-    throw wrong_type("pmt_@TAG@vector_set", vector);
-  _@TAG@vector(vector)->set(k, obj);
-}
-
-const @TYPE@ *
-@TAG@vector_elements(pmt_t vector, size_t &len)
-{
-  if (!vector->is_@TAG@vector())
-    throw wrong_type("pmt_@TAG@vector_elements", vector);
-  return _@TAG@vector(vector)->elements(len);
-}
-
-const std::vector< @TYPE@ >
-@TAG@vector_elements(pmt_t vector)
-{
-  if (!vector->is_@TAG@vector())
-    throw wrong_type("pmt_@TAG@vector_elements", vector);
-  size_t len;
-  const @TYPE@ *array = _@TAG@vector(vector)->elements(len);
-  const std::vector< @TYPE@ > vec(array, array+len);
-  return vec;
-}
-
-
-@TYPE@ *
-@TAG@vector_writable_elements(pmt_t vector, size_t &len)
-{
-  if (!vector->is_@TAG@vector())
-    throw wrong_type("pmt_@TAG@vector_writable_elements", vector);
-  return _@TAG@vector(vector)->writable_elements(len);
-}
-
-} /* namespace pmt */
diff --git a/gruel/src/lib/pmt/unv_template.h.t b/gruel/src/lib/pmt/unv_template.h.t
deleted file mode 100644
index 83ba0be0f4..0000000000
--- a/gruel/src/lib/pmt/unv_template.h.t
+++ /dev/null
@@ -1,23 +0,0 @@
-
-////////////////////////////////////////////////////////////////////////////
-//                           pmt_@TAG@vector
-////////////////////////////////////////////////////////////////////////////
-
-class pmt_@TAG@vector : public pmt_uniform_vector
-{
-  std::vector< @TYPE@ >	d_v;
-
-public:
-  pmt_@TAG@vector(size_t k, @TYPE@ fill);
-  pmt_@TAG@vector(size_t k, const @TYPE@ *data);
-  // ~pmt_@TAG@vector();
-
-  bool is_@TAG@vector() const { return true; }
-  size_t length() const { return d_v.size(); }
-  @TYPE@ ref(size_t k) const;
-  void set(size_t k, @TYPE@ x);
-  const @TYPE@ *elements(size_t &len);
-  @TYPE@ *writable_elements(size_t &len);
-  const void *uniform_elements(size_t &len);
-  void *uniform_writable_elements(size_t &len);
-};
diff --git a/gruel/src/lib/realtime.cc b/gruel/src/lib/realtime.cc
deleted file mode 100644
index e01c6c53d4..0000000000
--- a/gruel/src/lib/realtime.cc
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2007,2008 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gruel/realtime.h>
-
-#ifdef HAVE_SCHED_H
-#include <sched.h>
-#endif
-
-#include <algorithm>
-#include <math.h>
-#include <string.h>
-#include <errno.h>
-#include <stdio.h>
-
-#if defined(HAVE_PTHREAD_SETSCHEDPARAM) || defined(HAVE_SCHED_SETSCHEDULER)
-#include <pthread.h>
-
-namespace gruel {
-
-  /*!
-   * Rescale our virtual priority so that it maps to the middle 1/2 of
-   * the priorities given by min_real_pri and max_real_pri.
-   */
-  static int
-  rescale_virtual_pri(int virtual_pri, int min_real_pri, int max_real_pri)
-  {
-    float rmin = min_real_pri + (0.25 * (max_real_pri - min_real_pri));
-    float rmax = min_real_pri + (0.75 * (max_real_pri - min_real_pri));
-    float m = (rmax - rmin) / (rt_priority_max() - rt_priority_min());
-    float y = m * (virtual_pri - rt_priority_min()) + rmin;
-    int   y_int = static_cast<int>(rint(y));
-    return std::max(min_real_pri, std::min(max_real_pri, y_int));
-  }
-
-}  // namespace gruel
-
-#endif
-
-
-#if defined(HAVE_PTHREAD_SETSCHEDPARAM)
-
-namespace gruel {
-
-  rt_status_t
-  enable_realtime_scheduling(rt_sched_param p)
-  {
-    int policy = p.policy == RT_SCHED_FIFO ? SCHED_FIFO : SCHED_RR;
-    int min_real_pri = sched_get_priority_min(policy);
-    int max_real_pri = sched_get_priority_max(policy);
-    int pri = rescale_virtual_pri(p.priority, min_real_pri, max_real_pri);
-
-    // FIXME check hard and soft limits with getrlimit, and limit the value we ask for.
-    // fprintf(stderr, "pthread_setschedparam: policy = %d, pri = %d\n", policy, pri);
-
-    struct sched_param param;
-    memset (&param, 0, sizeof (param));
-    param.sched_priority = pri;
-    int result = pthread_setschedparam (pthread_self(), policy, &param);
-    if (result != 0) {
-      if (result == EPERM)	// N.B., return value, not errno
-        return RT_NO_PRIVS;
-      else {
-	fprintf(stderr,
-		"pthread_setschedparam: failed to set real time priority: %s\n",
-		strerror(result));
-        return RT_OTHER_ERROR;
-      }
-    }
-
-    //printf("SCHED_FIFO enabled with priority = %d\n", pri);
-    return RT_OK;
-  }
-} // namespace gruel
-
-
-#elif defined(HAVE_SCHED_SETSCHEDULER)
-
-namespace gruel {
-
-  rt_status_t
-  enable_realtime_scheduling(rt_sched_param p)
-  {
-    int policy = p.policy == RT_SCHED_FIFO ? SCHED_FIFO : SCHED_RR;
-    int min_real_pri = sched_get_priority_min(policy);
-    int max_real_pri = sched_get_priority_max(policy);
-    int pri = rescale_virtual_pri(p.priority, min_real_pri, max_real_pri);
-
-    // FIXME check hard and soft limits with getrlimit, and limit the value we ask for.
-    // fprintf(stderr, "sched_setscheduler: policy = %d, pri = %d\n", policy, pri);
-
-    int pid = 0;  // this process
-    struct sched_param param;
-    memset(&param, 0, sizeof(param));
-    param.sched_priority = pri;
-    int result = sched_setscheduler(pid, policy, &param);
-    if (result != 0){
-      if (errno == EPERM)
-        return RT_NO_PRIVS;
-      else {
-        perror ("sched_setscheduler: failed to set real time priority");
-        return RT_OTHER_ERROR;
-      }
-    }
-
-    //printf("SCHED_FIFO enabled with priority = %d\n", pri);
-    return RT_OK;
-  }
-
-} // namespace gruel
-
-#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
-
-#include <windows.h>
-
-namespace gruel {
-
-    rt_status_t enable_realtime_scheduling(rt_sched_param p){
-
-        //set the priority class on the process
-        int pri_class = (true)? REALTIME_PRIORITY_CLASS : NORMAL_PRIORITY_CLASS;
-        if (SetPriorityClass(GetCurrentProcess(), pri_class) == 0)
-            return RT_OTHER_ERROR;
-
-        //scale the priority value to the constants
-        int priorities[] = {
-            THREAD_PRIORITY_IDLE, THREAD_PRIORITY_LOWEST, THREAD_PRIORITY_BELOW_NORMAL, THREAD_PRIORITY_NORMAL,
-            THREAD_PRIORITY_ABOVE_NORMAL, THREAD_PRIORITY_HIGHEST, THREAD_PRIORITY_TIME_CRITICAL
-        };
-        const double priority = double(p.priority)/(rt_priority_max() - rt_priority_min());
-        size_t pri_index = size_t((priority+1.0)*6/2.0); // -1 -> 0, +1 -> 6
-        pri_index %= sizeof(priorities)/sizeof(*priorities); //range check
-
-        //set the thread priority on the thread
-        if (SetThreadPriority(GetCurrentThread(), priorities[pri_index]) == 0)
-            return RT_OTHER_ERROR;
-
-        //printf("SetPriorityClass + SetThreadPriority\n");
-        return RT_OK;
-    }
-
-} // namespace gruel
-
-#else
-
-namespace gruel {
-
-  rt_status_t
-  enable_realtime_scheduling(rt_sched_param p)
-  {
-    return RT_NOT_IMPLEMENTED;
-  }
-} // namespace gruel
-
-#endif
diff --git a/gruel/src/lib/sys_pri.cc b/gruel/src/lib/sys_pri.cc
deleted file mode 100644
index c8a505341f..0000000000
--- a/gruel/src/lib/sys_pri.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <gruel/sys_pri.h>
-
-namespace gruel {
-
-  /*
-   * These may need per-OS tweaking.
-   *
-   * Under linux virtual_pri ->	system_pri
-   *   0 ->   0
-   *   1 ->   5
-   *   2 ->  10
-   *   3 ->  15
-   *   4 ->  20		// typically used by jack and pulse audio
-   *   5 ->  25
-   *   6 ->  30
-   *   7 ->  35
-   *   8 ->  40
-   *   9 ->  45
-   *  10 ->  50
-   *  11 ->  54
-   *  12 ->  59
-   *  13 ->  64
-   *  14 ->  69
-   *  15 ->  74
-   */
-  rt_sched_param
-  sys_pri::python()		{ return rt_sched_param(0, RT_SCHED_RR); }
-
-  rt_sched_param
-  sys_pri::normal()		{ return rt_sched_param(2, RT_SCHED_RR); }
-
-  rt_sched_param
-  sys_pri::gcell_event_handler(){ return rt_sched_param(5, RT_SCHED_FIFO); }
-
-  rt_sched_param
-  sys_pri::usrp2_backend()	{ return rt_sched_param(6, RT_SCHED_FIFO); }
-}
diff --git a/gruel/src/lib/thread.cc b/gruel/src/lib/thread.cc
deleted file mode 100644
index a5116b687b..0000000000
--- a/gruel/src/lib/thread.cc
+++ /dev/null
@@ -1,226 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gruel/thread.h>
-
-#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
-
-#include <Windows.h>
-
-namespace gruel {
-
-  gr_thread_t
-  get_current_thread_id()
-  {
-    return GetCurrentThread();
-  }
-
-  void
-  thread_bind_to_processor(int n)
-  {
-    std::vector<int> mask(1, n);
-    thread_bind_to_processor(get_current_thread_id(), mask);
-  }
-
-  void
-  thread_bind_to_processor(const std::vector<int> &mask)
-  {
-    thread_bind_to_processor(get_current_thread_id(), mask);
-  }
-
-  void
-  thread_bind_to_processor(gr_thread_t thread, int n)
-  {
-    std::vector<int> mask(1, n);
-    thread_bind_to_processor(thread, mask);
-  }
-
-  void
-  thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask)
-  {
-    //DWORD_PTR mask = (1 << n);
-    DWORD_PTR dword_mask = 0;
-
-    std::vector<int> _mask = mask;
-    std::vector<int>::iterator itr;
-    for(itr = _mask.begin(); itr != _mask.end(); itr++)
-      dword_mask |= (1 << (*itr));
-
-    DWORD_PTR ret = SetThreadAffinityMask(thread, dword_mask);
-    if(ret == 0) {
-      std::stringstream s;
-      s << "thread_bind_to_processor failed with error: " << GetLastError() << std::endl;
-      throw std::runtime_error(s.str());
-    }
-  }
-
-  void
-  thread_unbind()
-  {
-    thread_unbind(get_current_thread_id());
-  }
-
-  void
-  thread_unbind(gr_thread_t thread)
-  {
-    DWORD_PTR dword_mask = sizeof(DWORD_PTR) - 1;
-    DWORD_PTR ret = SetThreadAffinityMask(thread, dword_mask);
-    if(ret == 0) {
-      std::stringstream s;
-      s << "thread_unbind failed with error: " << GetLastError() << std::endl;
-      throw std::runtime_error(s.str());
-    }
-  }
-} /* namespace gruel */
-
-#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
-
-namespace gruel {
-
-  gr_thread_t
-  get_current_thread_id()
-  {
-    // Not implemented on OSX
-  }
-
-  void
-  thread_bind_to_processor(int n)
-  {
-    // Not implemented on OSX
-  }
-
-  void
-  thread_bind_to_processor(gr_thread_t thread, int n)
-  {
-    // Not implemented on OSX
-  }
-
-  void
-  thread_bind_to_processor(const std::vector<int> &mask)
-  {
-    // Not implemented on OSX
-  }
-
-  void
-  thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask)
-  {
-    // Not implemented on OSX
-  }
-
-  void
-  thread_unbind()
-  {
-    // Not implemented on OSX
-  }
-
-  void
-  thread_unbind(gr_thread_t thread)
-  {
-    // Not implemented on OSX
-  }
-} /* namespace gruel */
-
-#else
-
-#include <sstream>
-#include <stdexcept>
-#include <pthread.h>
-
-namespace gruel {
-
-  gr_thread_t
-  get_current_thread_id()
-  {
-    return pthread_self();
-  }
-
-  void
-  thread_bind_to_processor(int n)
-  {
-    std::vector<int> mask(1, n);
-    thread_bind_to_processor(get_current_thread_id(), mask);
-  }
-
-  void
-  thread_bind_to_processor(const std::vector<int> &mask)
-  {
-    thread_bind_to_processor(get_current_thread_id(), mask);
-  }
-
-  void
-  thread_bind_to_processor(gr_thread_t thread, int n)
-  {
-    std::vector<int> mask(1, n);
-    thread_bind_to_processor(thread, mask);
-  }
-
-  void
-  thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask)
-  {
-    cpu_set_t set;
-    size_t len = sizeof(cpu_set_t);
-    std::vector<int> _mask = mask;
-    std::vector<int>::iterator itr;
-
-    CPU_ZERO(&set);
-    for(itr = _mask.begin(); itr != _mask.end(); itr++)
-      CPU_SET(*itr, &set);
-
-    int ret = pthread_setaffinity_np(thread, len, &set);
-    if(ret != 0) {
-      std::stringstream s;
-      s << "thread_bind_to_processor failed with error: " << ret << std::endl;
-      throw std::runtime_error(s.str());
-    }
-  }
-
-  void
-  thread_unbind()
-  {
-    thread_unbind(get_current_thread_id());
-  }
-
-  void
-  thread_unbind(gr_thread_t thread)
-  {
-    cpu_set_t set;
-    size_t len = sizeof(cpu_set_t);
-
-    CPU_ZERO(&set);
-    long ncpus = sysconf(_SC_NPROCESSORS_ONLN);
-    for(long n = 0; n < ncpus; n++) {
-      CPU_SET(n, &set);
-    }
-
-    int ret = pthread_setaffinity_np(thread, len, &set);
-    if(ret != 0) {
-      std::stringstream s;
-      s << "thread_unbind failed with error: " << ret << std::endl;
-      throw std::runtime_error(s.str());
-    }
-  }
-} /* namespace gruel */
-
-#endif
diff --git a/gruel/src/lib/thread_body_wrapper.cc b/gruel/src/lib/thread_body_wrapper.cc
deleted file mode 100644
index 019eaa342a..0000000000
--- a/gruel/src/lib/thread_body_wrapper.cc
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <gruel/thread_body_wrapper.h>
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#include <stdio.h>
-
-namespace gruel {
-
-#if defined(HAVE_PTHREAD_SIGMASK) && defined(HAVE_SIGNAL_H)
-
-  void mask_signals()
-  {
-    sigset_t	new_set;
-    int r;
-
-    sigemptyset(&new_set);
-    sigaddset(&new_set, SIGHUP);	// block these...
-    sigaddset(&new_set, SIGINT);
-    sigaddset(&new_set, SIGPIPE);
-    sigaddset(&new_set, SIGALRM);
-    sigaddset(&new_set, SIGTERM);
-    sigaddset(&new_set, SIGUSR1);
-    sigaddset(&new_set, SIGCHLD);
-#ifdef SIGPOLL
-    sigaddset(&new_set, SIGPOLL);
-#endif
-#ifdef SIGPROF
-    sigaddset(&new_set, SIGPROF);
-#endif
-#ifdef SIGSYS
-    sigaddset(&new_set, SIGSYS);
-#endif
-#ifdef SIGTRAP
-    sigaddset(&new_set, SIGTRAP);
-#endif
-#ifdef SIGURG
-    sigaddset(&new_set, SIGURG);
-#endif
-#ifdef SIGVTALRM
-    sigaddset(&new_set, SIGVTALRM);
-#endif
-#ifdef SIGXCPU
-    sigaddset(&new_set, SIGXCPU);
-#endif
-#ifdef SIGXFSZ
-    sigaddset(&new_set, SIGXFSZ);
-#endif
-    r = pthread_sigmask(SIG_BLOCK, &new_set, 0);
-    if (r != 0)
-      perror("pthread_sigmask");
-  }
-
-#else
-
-  void mask_signals()
-  {
-  }
-
-#endif
-
-};
diff --git a/gruel/src/lib/thread_group.cc b/gruel/src/lib/thread_group.cc
deleted file mode 100644
index 9e8ded4dfc..0000000000
--- a/gruel/src/lib/thread_group.cc
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright (C) 2001-2003 William E. Kempf
- * Copyright (C) 2007 Anthony Williams
- * Copyright 2008 Free Software Foundation, Inc.
- *
- *  Distributed under the Boost Software License, Version 1.0. (See accompanying
- *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- */
-
-/*
- * This was extracted from Boost 1.35.0 and fixed.
- */
-
-#include <gruel/thread_group.h>
-
-namespace gruel
-{
-  thread_group::thread_group()
-  {
-  }
-
-  thread_group::~thread_group()
-  {
-    // We shouldn't have to scoped_lock here, since referencing this object
-    // from another thread while we're deleting it in the current thread is
-    // going to lead to undefined behavior any way.
-    for (std::list<boost::thread*>::iterator it = m_threads.begin();
-	 it != m_threads.end(); ++it)
-      {
-	delete (*it);
-      }
-  }
-
-  boost::thread* thread_group::create_thread(const boost::function0<void>& threadfunc)
-  {
-    // No scoped_lock required here since the only "shared data" that's
-    // modified here occurs inside add_thread which does scoped_lock.
-    std::auto_ptr<boost::thread> thrd(new boost::thread(threadfunc));
-    add_thread(thrd.get());
-    return thrd.release();
-  }
-
-  void thread_group::add_thread(boost::thread* thrd)
-  {
-    boost::lock_guard<boost::shared_mutex> guard(m_mutex);
-
-    // For now we'll simply ignore requests to add a thread object multiple
-    // times. Should we consider this an error and either throw or return an
-    // error value?
-    std::list<boost::thread*>::iterator it = std::find(m_threads.begin(),
-						       m_threads.end(), thrd);
-    BOOST_ASSERT(it == m_threads.end());
-    if (it == m_threads.end())
-      m_threads.push_back(thrd);
-  }
-
-  void thread_group::remove_thread(boost::thread* thrd)
-  {
-    boost::lock_guard<boost::shared_mutex> guard(m_mutex);
-
-    // For now we'll simply ignore requests to remove a thread object that's
-    // not in the group. Should we consider this an error and either throw or
-    // return an error value?
-    std::list<boost::thread*>::iterator it = std::find(m_threads.begin(),
-						       m_threads.end(), thrd);
-    BOOST_ASSERT(it != m_threads.end());
-    if (it != m_threads.end())
-      m_threads.erase(it);
-  }
-
-  void thread_group::join_all()
-  {
-    boost::shared_lock<boost::shared_mutex> guard(m_mutex);
-    for (std::list<boost::thread*>::iterator it = m_threads.begin();
-	 it != m_threads.end(); ++it)
-      {
-	(*it)->join();
-      }
-  }
-
-  void thread_group::interrupt_all()
-  {
-    boost::shared_lock<boost::shared_mutex> guard(m_mutex);
-    for(std::list<boost::thread*>::iterator it=m_threads.begin(),end=m_threads.end();
-	it!=end;
-	++it)
-      {
-	(*it)->interrupt();
-      }
-  }
-
-  size_t thread_group::size() const
-  {
-    boost::shared_lock<boost::shared_mutex> guard(m_mutex);
-    return m_threads.size();
-  }
-
-} // namespace gruel
diff --git a/gruel/src/python/CMakeLists.txt b/gruel/src/python/CMakeLists.txt
deleted file mode 100644
index e91a6babdf..0000000000
--- a/gruel/src/python/CMakeLists.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-include(GrPython)
-
-########################################################################
-# Install python files
-########################################################################
-GR_PYTHON_INSTALL(
-    FILES __init__.py
-    DESTINATION ${GR_PYTHON_DIR}/gruel
-    COMPONENT "gruel_python"
-)
-
-GR_PYTHON_INSTALL(FILES
-    pmt/__init__.py
-    pmt/pmt_to_python.py
-    DESTINATION ${GR_PYTHON_DIR}/pmt
-    COMPONENT "gruel_python"
-)
-
-########################################################################
-# Setup unit tests
-########################################################################
-if(ENABLE_TESTING)
-include(GrTest)
-file(GLOB py_qa_test_files "qa_*.py")
-foreach(py_qa_test_file ${py_qa_test_files})
-    get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    set(GR_TEST_PYTHON_DIRS
-        ${CMAKE_BINARY_DIR}/gruel/src/python
-        ${CMAKE_BINARY_DIR}/gruel/src/swig
-    )
-    set(GR_TEST_TARGET_DEPS gruel gnuradio-runtime)
-    GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
-endforeach(py_qa_test_file)
-endif(ENABLE_TESTING)
diff --git a/gruel/src/python/__init__.py b/gruel/src/python/__init__.py
deleted file mode 100644
index 976b2ed1ec..0000000000
--- a/gruel/src/python/__init__.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-# The presence of this file turns this directory into a Python package
-
-'''
-The GNU Radio Utility Etcetera Library.
-'''
-
-import pmt;
-
diff --git a/gruel/src/python/pmt/__init__.py b/gruel/src/python/pmt/__init__.py
deleted file mode 100644
index bc933e80a5..0000000000
--- a/gruel/src/python/pmt/__init__.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-# The presence of this file turns this directory into a Python package
-
-'''
-The GNU Radio Utility Etcetera Library's Polymorphic Types for Python.
-'''
-
-from pmt_swig import *
-from pmt_to_python import pmt_to_python as to_python
-from pmt_to_python import python_to_pmt as to_pmt
-
diff --git a/gruel/src/python/pmt/pmt_to_python.py b/gruel/src/python/pmt/pmt_to_python.py
deleted file mode 100644
index e551f4e983..0000000000
--- a/gruel/src/python/pmt/pmt_to_python.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 2012,2013 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-try: import pmt_swig as pmt
-except: import pmt
-import numpy
-
-#define missing
-def pmt_to_tuple(p):
-    elems = list()
-    for i in range(pmt.length(p)):
-        elem = pmt.tuple_ref(p, i)
-        elems.append(pmt_to_python(elem))
-    return tuple(elems)
-
-def pmt_from_tuple(p):
-    args = map(python_to_pmt, p)
-    return pmt.make_tuple(*args)
-
-def pmt_to_vector(p):
-    v = list()
-    for i in range(pmt.length(p)):
-        elem = pmt.vector_ref(p, i)
-        v.append(pmt_to_python(elem))
-    return v
-
-def pmt_from_vector(p):
-    v = pmt.make_vector(len(p), pmt.PMT_NIL)
-    for i, elem in enumerate(p):
-        pmt.vector_set(v, i, python_to_pmt(elem))
-    return v
-
-def pmt_to_dict(p):
-    d = dict()
-    items = pmt.dict_items(p)
-    for i in range(pmt.length(items)):
-        pair = pmt.nth(i, items)
-        k = pmt.car(pair)
-        v = pmt.cdr(pair)
-        d[pmt_to_python(k)] = pmt_to_python(v)
-    return d
-
-def pmt_from_dict(p):
-    d = pmt.make_dict()
-    for k, v in p.iteritems():
-        #dict is immutable -> therefore pmt_dict_add returns the new dict
-        d = pmt.dict_add(d, python_to_pmt(k), python_to_pmt(v))
-    return d
-
-def numpy_to_blob(p):
-    p = p.view(numpy.uint8)
-    b = pmt.make_blob(len(p))
-    pmt.blob_data(b)[:] = p
-    return b
-
-THE_TABLE = ( #python type, check pmt type, to python, from python
-    (None, pmt.is_null, lambda x: None, lambda x: pmt.PMT_NIL),
-    (bool, pmt.is_bool, pmt.to_bool, pmt.from_bool),
-    (str, pmt.is_symbol, pmt.symbol_to_string, pmt.string_to_symbol),
-    (int, pmt.is_integer, pmt.to_long, pmt.from_long),
-    (long, pmt.is_uint64, lambda x: long(pmt.to_uint64(x)), pmt.from_uint64),
-    (float, pmt.is_real, pmt.to_double, pmt.from_double),
-    (complex, pmt.is_complex, pmt.to_complex, pmt.from_complex),
-    (tuple, pmt.is_tuple, pmt_to_tuple, pmt_from_tuple),
-    (list, pmt.is_vector, pmt_to_vector, pmt_from_vector),
-    (dict, pmt.is_dict, pmt_to_dict, pmt_from_dict),
-    (numpy.ndarray, pmt.is_blob, pmt.blob_data, numpy_to_blob),
-)
-
-def pmt_to_python(p):
-    for python_type, pmt_check, to_python, from_python in THE_TABLE:
-        if pmt_check(p): return to_python(p)
-    return p #give up, we return the same
-
-def python_to_pmt(p):
-    for python_type, pmt_check, to_python, from_python in THE_TABLE:
-        if python_type is None:
-            if p == None: return from_python(p)
-        elif isinstance(p, python_type): return from_python(p)
-    return p #give up, we return the same
-
diff --git a/gruel/src/python/qa_pmt.py b/gruel/src/python/qa_pmt.py
deleted file mode 100755
index c8d3df93b2..0000000000
--- a/gruel/src/python/qa_pmt.py
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import unittest
-import pmt_swig as pmt
-
-class test_gruel_pmt(unittest.TestCase):
-
-    def test01(self):
-        a = pmt.intern("a")
-        b = pmt.from_double(123765)
-        d1 = pmt.make_dict()
-        d2 = pmt.dict_add(d1, a, b)
-        print d2
-
-    def test02(self):
-        const = 123765
-        x_pmt = pmt.from_double(const)
-        x_int = pmt.to_double(x_pmt)
-        self.assertEqual(x_int, const)
-
-    def test03(self):
-        v = pmt.init_f32vector(3, [11, -22, 33])
-        s = pmt.serialize_str(v)
-        d = pmt.deserialize_str(s)
-        self.assertTrue(pmt.equal(v, d))
-
-    def test04(self):
-        v = pmt.init_f64vector(3, [11, -22, 33])
-        s = pmt.serialize_str(v)
-        d = pmt.deserialize_str(s)
-        self.assertTrue(pmt.equal(v, d))
-
-    def test05(self):
-        v = pmt.init_u8vector(3, [11, 22, 33])
-        s = pmt.serialize_str(v)
-        d = pmt.deserialize_str(s)
-        self.assertTrue(pmt.equal(v, d))
-
-    def test06(self):
-        v = pmt.init_s8vector(3, [11, -22, 33])
-        s = pmt.serialize_str(v)
-        d = pmt.deserialize_str(s)
-        self.assertTrue(pmt.equal(v, d))
-
-    def test07(self):
-        v = pmt.init_u16vector(3, [11, 22, 33])
-        s = pmt.serialize_str(v)
-        d = pmt.deserialize_str(s)
-        self.assertTrue(pmt.equal(v, d))
-
-    def test08(self):
-        v = pmt.init_s16vector(3, [11, -22, 33])
-        s = pmt.serialize_str(v)
-        d = pmt.deserialize_str(s)
-        self.assertTrue(pmt.equal(v, d))
-
-    def test09(self):
-        v = pmt.init_u32vector(3, [11, 22, 33])
-        s = pmt.serialize_str(v)
-        d = pmt.deserialize_str(s)
-        self.assertTrue(pmt.equal(v, d))
-
-    def test10(self):
-        v = pmt.init_s32vector(3, [11, -22, 33])
-        s = pmt.serialize_str(v)
-        d = pmt.deserialize_str(s)
-        self.assertTrue(pmt.equal(v, d))
-
-    def test11(self):
-        v = pmt.init_c32vector(3, [11 + -101j, -22 + 202j, 33 + -303j])
-        s = pmt.serialize_str(v)
-        d = pmt.deserialize_str(s)
-        self.assertTrue(pmt.equal(v, d))
-
-    def test12(self):
-        v = pmt.init_c64vector(3, [11 + -101j, -22 + 202j, 33 + -303j])
-        s = pmt.serialize_str(v)
-        d = pmt.deserialize_str(s)
-        self.assertTrue(pmt.equal(v, d))
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/gruel/src/python/qa_pmt_to_python.py b/gruel/src/python/qa_pmt_to_python.py
deleted file mode 100755
index 71aa9000ea..0000000000
--- a/gruel/src/python/qa_pmt_to_python.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2013 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import unittest
-import pmt
-
-class test_gruel_pmt_to_python(unittest.TestCase):
-
-    def test01 (self):
-        b = pmt.from_double(123765)
-        self.assertEqual(pmt.to_python(b), 123765)
-        t = pmt.to_pmt(range(5))
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/gruel/src/swig/gr_intrusive_ptr.i b/gruel/src/swig/gr_intrusive_ptr.i
deleted file mode 100644
index 40c438d004..0000000000
--- a/gruel/src/swig/gr_intrusive_ptr.i
+++ /dev/null
@@ -1,102 +0,0 @@
-// This file was borrowed from the SWIG project to allow use to
-// wrap PMTs that use intrusive pointers. This is only necessary
-// to support backwards compatability with older distributions of
-// Linux that do not natively support a new enough version of SWIG.
-// We do this to prevent having to update our dependency on a new
-// SWIG. Eventually, the need for this should go away.
-
-// Allow for different namespaces for shared_ptr / intrusive_ptr - they could be boost or std or std::tr1
-// For example for std::tr1, use:
-// #define SWIG_SHARED_PTR_NAMESPACE std
-// #define SWIG_SHARED_PTR_SUBNAMESPACE tr1
-// #define SWIG_INTRUSIVE_PTR_NAMESPACE boost
-// #define SWIG_INTRUSIVE_PTR_SUBNAMESPACE
-
-#if !defined(SWIG_INTRUSIVE_PTR_NAMESPACE)
-# define SWIG_INTRUSIVE_PTR_NAMESPACE boost
-#endif
-
-#if defined(SWIG_INTRUSIVE_PTR_SUBNAMESPACE)
-# define SWIG_INTRUSIVE_PTR_QNAMESPACE SWIG_INTRUSIVE_PTR_NAMESPACE::SWIG_INTRUSIVE_PTR_SUBNAMESPACE
-#else
-# define SWIG_INTRUSIVE_PTR_QNAMESPACE SWIG_INTRUSIVE_PTR_NAMESPACE
-#endif
-
-namespace SWIG_INTRUSIVE_PTR_NAMESPACE {
-#if defined(SWIG_INTRUSIVE_PTR_SUBNAMESPACE)
-  namespace SWIG_INTRUSIVE_PTR_SUBNAMESPACE {
-#endif
-    template <class T> class intrusive_ptr {
-    };
-#if defined(SWIG_INTRUSIVE_PTR_SUBNAMESPACE)
-  }
-#endif
-}
-
-%fragment("SWIG_intrusive_deleter", "header") {
-template<class T> struct SWIG_intrusive_deleter {
-    void operator()(T *p) {
-        if (p)
-          intrusive_ptr_release(p);
-    }
-};
-}
-
-%fragment("SWIG_null_deleter", "header") {
-struct SWIG_null_deleter {
-  void operator() (void const *) const {
-  }
-};
-%#define SWIG_NO_NULL_DELETER_0 , SWIG_null_deleter()
-%#define SWIG_NO_NULL_DELETER_1
-}
-
-// Main user macro for defining intrusive_ptr typemaps for both const and non-const pointer types
-// For plain classes, do not use for derived classes
-%define SWIG_INTRUSIVE_PTR(PROXYCLASS, TYPE...)
-SWIG_INTRUSIVE_PTR_TYPEMAPS(PROXYCLASS, , TYPE)
-SWIG_INTRUSIVE_PTR_TYPEMAPS(PROXYCLASS, const, TYPE)
-%enddef
-
-// Main user macro for defining intrusive_ptr typemaps for both const and non-const pointer types
-// For derived classes
-%define SWIG_INTRUSIVE_PTR_DERIVED(PROXYCLASS, BASECLASSTYPE, TYPE...)
-SWIG_INTRUSIVE_PTR_TYPEMAPS(PROXYCLASS, , TYPE)
-SWIG_INTRUSIVE_PTR_TYPEMAPS(PROXYCLASS, const, TYPE)
-%types(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > = SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< BASECLASSTYPE >) %{
-  *newmemory = SWIG_CAST_NEW_MEMORY;
-  return (void *) new SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< BASECLASSTYPE >(*(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > *)$from);
-  %}
-%extend TYPE {
-  static SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< BASECLASSTYPE > SWIGSharedPtrUpcast(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > swigSharedPtrUpcast) {
-    return swigSharedPtrUpcast;
-  }
-}
-%enddef
-
-// Extra user macro for including classes in intrusive_ptr typemaps for both const and non-const pointer types
-// This caters for classes which cannot be wrapped by intrusive_ptrs but are still part of the class hierarchy
-// For plain classes, do not use for derived classes
-%define SWIG_INTRUSIVE_PTR_NO_WRAP(PROXYCLASS, TYPE...)
-SWIG_INTRUSIVE_PTR_TYPEMAPS_NO_WRAP(PROXYCLASS, , TYPE)
-SWIG_INTRUSIVE_PTR_TYPEMAPS_NO_WRAP(PROXYCLASS, const, TYPE)
-%enddef
-
-// Extra user macro for including classes in intrusive_ptr typemaps for both const and non-const pointer types
-// This caters for classes which cannot be wrapped by intrusive_ptrs but are still part of the class hierarchy
-// For derived classes
-%define SWIG_INTRUSIVE_PTR_DERIVED_NO_WRAP(PROXYCLASS, BASECLASSTYPE, TYPE...)
-SWIG_INTRUSIVE_PTR_TYPEMAPS_NO_WRAP(PROXYCLASS, , TYPE)
-SWIG_INTRUSIVE_PTR_TYPEMAPS_NO_WRAP(PROXYCLASS, const, TYPE)
-%types(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > = SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< BASECLASSTYPE >) %{
-  *newmemory = SWIG_CAST_NEW_MEMORY;
-  return (void *) new SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< BASECLASSTYPE >(*(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > *)$from);
-%}
-%extend TYPE {
-  static SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< BASECLASSTYPE > SWIGSharedPtrUpcast(SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< TYPE > swigSharedPtrUpcast) {
-    return swigSharedPtrUpcast;
-  }
-}
-%enddef
-
-
diff --git a/gruel/src/swig/gruel_common.i b/gruel/src/swig/gruel_common.i
deleted file mode 100644
index 3a4d841d61..0000000000
--- a/gruel/src/swig/gruel_common.i
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2011 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef GRUEL_COMMON_I
-#define GRUEL_COMMON_I
-
-////////////////////////////////////////////////////////////////////////
-// Language independent exception handler
-////////////////////////////////////////////////////////////////////////
-%include exception.i
-
-%exception {
-    try {
-        $action
-    }
-    catch(std::exception &e) {
-        SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-    catch(...) {
-        SWIG_exception(SWIG_RuntimeError, "Unknown exception");
-    }
-
-}
-
-////////////////////////////////////////////////////////////////////////
-// Wrapper for python calls that may block
-////////////////////////////////////////////////////////////////////////
-
-/*!
- * Use GR_PYTHON_BLOCKING_CODE when calling code that blocks.
- *
- * The try/catch is to save us from boost::thread::interrupt:
- * If a thread from the scheduler (or any other boost thread)
- * is blocking the routine and throws an interrupt exception.
- */
-%{
-
-#define GR_PYTHON_BLOCKING_CODE(code) {                                 \
-    PyThreadState *_save;                                               \
-    _save = PyEval_SaveThread();                                        \
-    try{code}                                                           \
-    catch(...){PyEval_RestoreThread(_save); throw;}                     \
-    PyEval_RestoreThread(_save);                                        \
-}
-
-%}
-
-#endif /*GRUEL_COMMON_I*/
diff --git a/gruel/src/swig/pmt_swig.i b/gruel/src/swig/pmt_swig.i
deleted file mode 100644
index ba16511114..0000000000
--- a/gruel/src/swig/pmt_swig.i
+++ /dev/null
@@ -1,295 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2011-2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-%include "std_string.i"
-%include "stdint.i"
-%{
-#include <boost/intrusive_ptr.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/any.hpp>
-#include <complex>
-#include <string>
-#include <stdint.h>
-#include <iosfwd>
-#include <stdexcept>
-#include <gruel/pmt.h>
-%}
-
-%include "gruel_common.i"
-//load generated python docstrings
-%include "pmt_swig_doc.i"
-
-%include <std_complex.i>
-%include <std_vector.i>
-%include <stl.i>
-
-namespace std {
-  %template()	  vector<unsigned char>;
-  %template()	  vector<uint8_t>;
-  %template()	  vector<char>;
-  %template()	  vector<int8_t>;
-  %template()	  vector<short>;
-  %template()	  vector<uint16_t>;
-  %template()	  vector<int16_t>;
-  %template()	  vector<int>;
-  %template()	  vector<int32_t>;
-  %template()	  vector<uint32_t>;
-  %template()	  vector<float>;
-  %template()	  vector<double>;
-  %template()	  vector< std::complex<float> >;
-  %template()	  vector< std::complex<double> >;
-};
-
-////////////////////////////////////////////////////////////////////////
-// Language independent exception handler
-////////////////////////////////////////////////////////////////////////
-
-// Template intrusive_ptr for Swig to avoid dereferencing issues
-namespace pmt{
-    class pmt_base;
-}
-//%import <intrusive_ptr.i>
-%import <gr_intrusive_ptr.i>
-%template(swig_int_ptr) boost::intrusive_ptr<pmt::pmt_base>;
-
-namespace pmt{
-
-  typedef boost::intrusive_ptr<pmt_base> pmt_t;
-
-  // Allows Python to directly print a PMT object
-  %pythoncode
-  %{
-    swig_int_ptr.__repr__ = lambda self: write_string(self)
-  %}
-
-
-  extern const pmt_t PMT_T;
-  extern const pmt_t PMT_F;
-  extern const pmt_t PMT_NIL;
-  extern const pmt_t PMT_EOF;
-
-  bool is_bool(pmt_t obj);
-  bool is_true(pmt_t obj);
-  bool is_false(pmt_t obj);
-  pmt_t from_bool(bool val);
-  bool to_bool(pmt_t val);
-
-  bool is_symbol(const pmt_t& obj);
-  pmt_t string_to_symbol(const std::string &s);
-  pmt_t intern(const std::string &s);
-  const std::string symbol_to_string(const pmt_t& sym);
-
-  bool is_number(pmt_t obj);
-  bool is_integer(pmt_t x);
-  pmt_t from_long(long x);
-  long to_long(pmt_t x);
-
-  bool is_uint64(pmt_t x);
-  pmt_t from_uint64(uint64_t x);
-  uint64_t to_uint64(pmt_t x);
-
-  bool is_real(pmt_t obj);
-  pmt_t from_double(double x);
-  double to_double(pmt_t x);
-
-  bool is_complex(pmt_t obj);
-  pmt_t make_rectangular(double re, double im);
-  pmt_t from_complex(const std::complex<double> &z);
-  std::complex<double> to_complex(pmt_t z);
-
-  bool is_null(const pmt_t& x);
-  bool is_pair(const pmt_t& obj);
-  pmt_t cons(const pmt_t& x, const pmt_t& y);
-  pmt_t car(const pmt_t& pair);
-  pmt_t cdr(const pmt_t& pair);
-  void set_car(pmt_t pair, pmt_t value);
-  void set_cdr(pmt_t pair, pmt_t value);
-
-  pmt_t caar(pmt_t pair);
-  pmt_t cadr(pmt_t pair);
-  pmt_t cdar(pmt_t pair);
-  pmt_t cddr(pmt_t pair);
-  pmt_t caddr(pmt_t pair);
-  pmt_t cadddr(pmt_t pair);
-
-  bool is_tuple(pmt_t x);
-  pmt_t make_tuple();
-  pmt_t make_tuple(const pmt_t &e0);
-  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1);
-  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2);
-  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3);
-  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4);
-  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5);
-  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6);
-  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7);
-  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8);
-  pmt_t make_tuple(const pmt_t &e0, const pmt_t &e1, const pmt_t &e2, const pmt_t &e3, const pmt_t &e4, const pmt_t &e5, const pmt_t &e6, const pmt_t &e7, const pmt_t &e8, const pmt_t &e9);
-
-  pmt_t to_tuple(const pmt_t &x);
-  pmt_t tuple_ref(const pmt_t &tuple, size_t k);
-
-  bool is_vector(pmt_t x);
-  pmt_t make_vector(size_t k, pmt_t fill);
-  pmt_t vector_ref(pmt_t vector, size_t k);
-  void vector_set(pmt_t vector, size_t k, pmt_t obj);
-  void vector_fill(pmt_t vector, pmt_t fill);
-
-  bool is_blob(pmt_t x);
-  pmt_t make_blob(const void *buf, size_t len);
-  const void *blob_data(pmt_t blob);
-  size_t blob_length(pmt_t blob);
-
-  bool is_uniform_vector(pmt_t x);
-  bool is_u8vector(pmt_t x);
-  bool is_s8vector(pmt_t x);
-  bool is_u16vector(pmt_t x);
-  bool is_s16vector(pmt_t x);
-  bool is_u32vector(pmt_t x);
-  bool is_s32vector(pmt_t x);
-  bool is_u64vector(pmt_t x);
-  bool is_s64vector(pmt_t x);
-  bool is_f32vector(pmt_t x);
-  bool is_f64vector(pmt_t x);
-  bool is_c32vector(pmt_t x);
-  bool is_c64vector(pmt_t x);
-  pmt_t make_u8vector(size_t k, uint8_t fill);
-  pmt_t make_s8vector(size_t k, int8_t fill);
-  pmt_t make_u16vector(size_t k, uint16_t fill);
-  pmt_t make_s16vector(size_t k, int16_t fill);
-  pmt_t make_u32vector(size_t k, uint32_t fill);
-  pmt_t make_s32vector(size_t k, int32_t fill);
-  pmt_t make_u64vector(size_t k, uint64_t fill);
-  pmt_t make_s64vector(size_t k, int64_t fill);
-  pmt_t make_f32vector(size_t k, float fill);
-  pmt_t make_f64vector(size_t k, double fill);
-  pmt_t make_c32vector(size_t k, std::complex<float> fill);
-  pmt_t make_c64vector(size_t k, std::complex<double> fill);
-  pmt_t init_u8vector(size_t k, const std::vector<uint8_t> &data);
-  pmt_t init_s8vector(size_t k, const std::vector<int8_t> &data);
-  pmt_t init_u16vector(size_t k, const std::vector<uint16_t> &data);
-  pmt_t init_s16vector(size_t k, const std::vector<int16_t> &data);
-  pmt_t init_u32vector(size_t k, const std::vector<uint32_t> &data);
-  pmt_t init_s32vector(size_t k, const std::vector<int32_t> &data);
-  pmt_t init_f32vector(size_t k, const std::vector<float> &data);
-  pmt_t init_f64vector(size_t k, const std::vector<double> &data);
-  pmt_t init_c32vector(size_t k, const std::vector<std::complex<float> > &data);
-  pmt_t init_c64vector(size_t k, const std::vector<std::complex<double> > &data);
-  uint8_t  u8vector_ref(pmt_t v, size_t k);
-  int8_t   s8vector_ref(pmt_t v, size_t k);
-  uint16_t u16vector_ref(pmt_t v, size_t k);
-  int16_t  s16vector_ref(pmt_t v, size_t k);
-  uint32_t u32vector_ref(pmt_t v, size_t k);
-  int32_t  s32vector_ref(pmt_t v, size_t k);
-  uint64_t u64vector_ref(pmt_t v, size_t k);
-  int64_t  s64vector_ref(pmt_t v, size_t k);
-  float    f32vector_ref(pmt_t v, size_t k);
-  double   f64vector_ref(pmt_t v, size_t k);
-  std::complex<float>  c32vector_ref(pmt_t v, size_t k);
-  std::complex<double> c64vector_ref(pmt_t v, size_t k);
-  void u8vector_set(pmt_t v, size_t k, uint8_t x);  //< v[k] = x
-  void s8vector_set(pmt_t v, size_t k, int8_t x);
-  void u16vector_set(pmt_t v, size_t k, uint16_t x);
-  void s16vector_set(pmt_t v, size_t k, int16_t x);
-  void u32vector_set(pmt_t v, size_t k, uint32_t x);
-  void s32vector_set(pmt_t v, size_t k, int32_t x);
-  void u64vector_set(pmt_t v, size_t k, uint64_t x);
-  void s64vector_set(pmt_t v, size_t k, int64_t x);
-  void f32vector_set(pmt_t v, size_t k, float x);
-  void f64vector_set(pmt_t v, size_t k, double x);
-  void c32vector_set(pmt_t v, size_t k, std::complex<float> x);
-  void c64vector_set(pmt_t v, size_t k, std::complex<double> x);
-
-  %apply size_t & INOUT { size_t &len };
-  const void *uniform_vector_elements(pmt_t v, size_t &len);  
-
-  const std::vector<uint8_t>  u8vector_elements(pmt_t v);
-  const std::vector<int8_t>   s8vector_elements(pmt_t v);
-  const std::vector<uint16_t> u16vector_elements(pmt_t v);
-  const std::vector<int16_t>  s16vector_elements(pmt_t v);
-  const std::vector<uint32_t> u32vector_elements(pmt_t v);
-  const std::vector<int32_t>  s32vector_elements(pmt_t v);
-  const std::vector<float>    f32vector_elements(pmt_t v);
-  const std::vector<double>   f64vector_elements(pmt_t v);
-  const std::vector<std::complex<float> > c32vector_elements(pmt_t v);
-  const std::vector<std::complex<double> > c64vector_elements(pmt_t v);
-
-  bool is_dict(const pmt_t &obj);
-  pmt_t make_dict();
-  pmt_t dict_add(const pmt_t &dict, const pmt_t &key, const pmt_t &value);
-  pmt_t dict_delete(const pmt_t &dict, const pmt_t &key);
-  bool  dict_has_key(const pmt_t &dict, const pmt_t &key);
-  pmt_t dict_ref(const pmt_t &dict, const pmt_t &key, const pmt_t &not_found);
-  pmt_t dict_items(pmt_t dict);
-  pmt_t dict_keys(pmt_t dict);
-  pmt_t dict_values(pmt_t dict);
-
-  bool is_any(pmt_t obj);
-  pmt_t make_any(const boost::any &any);
-  boost::any any_ref(pmt_t obj);
-  void any_set(pmt_t obj, const boost::any &any);
-
-  bool is_msg_accepter(const pmt_t &obj);
-  pmt_t make_msg_accepter(boost::shared_ptr<gruel::msg_accepter> ma);
-  boost::shared_ptr<gruel::msg_accepter> msg_accepter_ref(const pmt_t &obj);
-
-  bool eq(const pmt_t& x, const pmt_t& y);
-  bool eqv(const pmt_t& x, const pmt_t& y);
-  bool equal(const pmt_t& x, const pmt_t& y);
-  size_t length(const pmt_t& v);
-  pmt_t assq(pmt_t obj, pmt_t alist);
-  pmt_t assv(pmt_t obj, pmt_t alist);
-  pmt_t assoc(pmt_t obj, pmt_t alist);
-  pmt_t map(pmt_t proc(const pmt_t&), pmt_t list);
-  pmt_t reverse(pmt_t list);
-  pmt_t reverse_x(pmt_t list);
-  inline static pmt_t acons(pmt_t x, pmt_t y, pmt_t a);
-  pmt_t nth(size_t n, pmt_t list);
-  pmt_t nthcdr(size_t n, pmt_t list);
-  pmt_t memq(pmt_t obj, pmt_t list);
-  pmt_t memv(pmt_t obj, pmt_t list);
-  pmt_t member(pmt_t obj, pmt_t list);
-  bool subsetp(pmt_t list1, pmt_t list2);
-
-  pmt_t list1(const pmt_t& x1);
-  pmt_t list2(const pmt_t& x1, const pmt_t& x2);
-  pmt_t list3(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3);
-  pmt_t list4(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4);
-  pmt_t list5(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4, const pmt_t& x5);
-  pmt_t list6(const pmt_t& x1, const pmt_t& x2, const pmt_t& x3, const pmt_t& x4, const pmt_t& x5, const pmt_t& x6);
-  pmt_t list_add(pmt_t list, const pmt_t& item);
-  pmt_t list_rm(pmt_t list, const pmt_t& item);
-  bool list_has(pmt_t list, const pmt_t& item);
-
-  bool is_eof_object(pmt_t obj);
-  pmt_t read(std::istream &port);
-  void write(pmt_t obj, std::ostream &port);
-  std::string write_string(pmt_t obj);
-
-  //void pmt_print(pmt_t v);
-
-  bool serialize(pmt_t obj, std::streambuf &sink);
-  pmt_t deserialize(std::streambuf &source);
-  void dump_sizeof();
-  std::string serialize_str(pmt_t obj);
-  pmt_t deserialize_str(std::string str);
-
-} //namespace pmt
-- 
cgit v1.2.3


From 65bfb22a597854a6ffc7f249a720d11d8b985c9d Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Sun, 31 Mar 2013 12:30:45 -0400
Subject: docs: Cleaning up Doxygen files for new structure.

No longer reads files from lib directories, so doesn't populate docs with _impl classes.
---
 docs/doxygen/Doxyfile.in          | 99 ++++++++++++++++++++++++---------------
 docs/doxygen/Doxyfile.swig_doc.in |  2 +-
 2 files changed, 62 insertions(+), 39 deletions(-)

(limited to 'docs/doxygen/Doxyfile.in')

diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in
index afb194d1fb..fdc7e1066b 100644
--- a/docs/doxygen/Doxyfile.in
+++ b/docs/doxygen/Doxyfile.in
@@ -580,48 +580,71 @@ EXCLUDE                = @abs_top_builddir@/docs/doxygen/html \
 		         @abs_top_builddir@/docs/doxygen/xml \
                          @abs_top_builddir@/docs/doxygen/other/doxypy.py \
                          @abs_top_builddir@/dtools \
-                         @abs_top_builddir@/gnuradio-core/src/lib/bug_work_around_6.cc \
-                         @abs_top_builddir@/gnuradio-core/src/lib/gengen/generate_all.py \
-                         @abs_top_builddir@/gnuradio-core/src/lib/gengen/generate_common.py \
-                         @abs_top_builddir@/gnuradio-core/src/lib/missing/bug_work_around_8.cc \
-                         @abs_top_builddir@/gnuradio-core/src/lib/missing/getopt.h \
-                         @abs_top_builddir@/gnuradio-core/src/lib/runtime/gr_error_handler.cc \
-                         @abs_top_builddir@/gnuradio-core/src/lib/swig \
-                         @abs_top_builddir@/gnuradio-core/src/python/bin \
-                         @abs_top_builddir@/gnuradio-core/src/python/build_utils.py \
-                         @abs_top_builddir@/gnuradio-core/src/python/build_utils_codes.py \
-                         @abs_top_builddir@/gnuradio-core/src/python/gnuradio/gr/gr_threading.py \
-                         @abs_top_builddir@/gnuradio-core/src/python/gnuradio/gr/gr_threading_23.py \
-                         @abs_top_builddir@/gnuradio-core/src/python/gnuradio/gr/gr_threading_24.py \
-                         @abs_top_builddir@/gnuradio-core/src/tests \
-                         @abs_top_builddir@/gnuradio-core/src/utils \
-                         @abs_top_builddir@/gnuradio-examples/python/apps/hf_radio/output.py \
-                         @abs_top_builddir@/gnuradio-examples/python/apps/hf_radio/ui.py \
-                         @abs_top_builddir@/gr-atsc/src/lib/atsc.cc \
-                         @abs_top_builddir@/gr-atsc/src/lib/atsc.py \
-                         @abs_top_builddir@/gr-atsc/src/lib/gen_encoder.py \
-                         @abs_top_builddir@/gr-atsc/src/python \
-                         @abs_top_builddir@/gr-atsc/src/python \
-                         @abs_top_builddir@/gr-audio-alsa/src/audio-alsa.py \
-                         @abs_top_builddir@/gr-audio-oss/src/audio_oss.py \
-                         @abs_top_builddir@/gr-audio-osx/src/test_audio_loop.py \
-                         @abs_top_builddir@/gr-gsm-fr-vocoder/src/lib/gsm \
-                         @abs_top_builddir@/gr-gsm-fr-vocoder/src/lib/gsm_full_rate.py \
-                         @abs_top_builddir@/gr-gsm-fr-vocoder/src/python/encdec.py \
-                         @abs_top_builddir@/gr-howto-write-a-block \
-                         @abs_top_builddir@/gr-pager/src/pager_swig.py \
+                         @abs_top_builddir@/gnuradio-runtime/lib/runtime/gr_error_handler.cc \
+                         @abs_top_builddir@/gnuradio-runtime/swig \
+                         @abs_top_builddir@/gnuradio-runtime/python/build_utils.py \
+                         @abs_top_builddir@/gnuradio-runtime/python/build_utils_codes.py \
+                         @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading.py \
+                         @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading_23.py \
+                         @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading_24.py \
+                         @abs_top_builddir@/gr-atsc/swig/atsc_swig.py \
+                         @abs_top_builddir@/gr-atsc/lib/gen_encoder.py \
+                         @abs_top_builddir@/gr-atsc/python \
+                         @abs_top_builddir@/gr-pager/swig/pager_swig.py \
                          @abs_top_builddir@/gr-trellis/doc \
-                         @abs_top_builddir@/gr-trellis/src/lib/generate_all.py \
-                         @abs_top_builddir@/gr-trellis/src/lib/generate_trellis.py \
-                         @abs_top_builddir@/gr-trellis/src/lib/trellis.py \
-                         @abs_top_builddir@/gr-video-sdl/src/video_sdl.py \
-                         @abs_top_builddir@/gr-wxgui/src/python \
+                         @abs_top_builddir@/gr-trellis/swig/trellis_swig.py \
+                         @abs_top_builddir@/gr-video-sdl/swig/video_sdl_swig.py \
+                         @abs_top_builddir@/gr-wxgui/python \
                          @abs_top_builddir@/grc \
 			 @abs_top_builddir@/_CPack_Packages \
                          @abs_top_srcdir@/cmake \
-			 @abs_top_srcdir@/gr-qtgui/lib \
-                         @abs_top_srcdir@/gr-howto-write-a-block \
-                         @abs_top_srcdir@/gr-utils/python/modtool/gr-newmod
+                         @abs_top_srcdir@/gr-utils/python/modtool/gr-newmod \
+                         @abs_top_srcdir@/docs/doxygen/doxyxml/example \
+                         @abs_top_srcdir@/docs/sphinx \
+                         @abs_top_srcdir@/gnuradio-runtime/lib \
+                         @abs_top_builddir@/gnuradio-runtime/lib \
+                         @abs_top_srcdir@/gr-analog/lib \
+                         @abs_top_builddir@/gr-analog/lib \
+                         @abs_top_srcdir@/gr-atsc/lib \
+                         @abs_top_builddir@/gr-atsc/lib \
+                         @abs_top_srcdir@/gr-audio/lib \
+                         @abs_top_builddir@/gr-audio/lib \
+                         @abs_top_srcdir@/gr-blocks/lib \
+                         @abs_top_builddir@/gr-blocks/lib \
+                         @abs_top_srcdir@/gr-channels/lib \
+                         @abs_top_builddir@/gr-channels/lib \
+                         @abs_top_srcdir@/gr-comedi/lib \
+                         @abs_top_builddir@/gr-comedi/lib \
+                         @abs_top_srcdir@/gr-digital/lib \
+                         @abs_top_builddir@/gr-digital/lib \
+                         @abs_top_srcdir@/gr-fcd/lib \
+                         @abs_top_builddir@/gr-fcd/lib \
+                         @abs_top_srcdir@/gr-fec/lib \
+                         @abs_top_builddir@/gr-fec/lib \
+                         @abs_top_srcdir@/gr-filter/lib \
+                         @abs_top_builddir@/gr-filter/lib \
+                         @abs_top_srcdir@/gr-noaa/lib \
+                         @abs_top_builddir@/gr-noaa/lib \
+                         @abs_top_srcdir@/gr-pager/lib \
+                         @abs_top_builddir@/gr-pager/lib \
+                         @abs_top_srcdir@/gr-qtgui/lib \
+                         @abs_top_builddir@/gr-qtgui/lib \
+                         @abs_top_srcdir@/gr-shd/lib \
+                         @abs_top_builddir@/gr-shd/lib \
+                         @abs_top_srcdir@/gr-trellis/lib \
+                         @abs_top_builddir@/gr-trellis/lib \
+                         @abs_top_srcdir@/gr-uhd/lib \
+                         @abs_top_builddir@/gr-uhd/lib \
+                         @abs_top_srcdir@/gr-utils/lib \
+                         @abs_top_builddir@/gr-utils/lib \
+                         @abs_top_srcdir@/gr-video-sdl/lib \
+                         @abs_top_builddir@/gr-video-sdl/lib \
+                         @abs_top_srcdir@/gr-vocoder/lib \
+                         @abs_top_builddir@/gr-vocoder/lib \
+                         @abs_top_srcdir@/gr-wavelet/lib \
+                         @abs_top_builddir@/gr-wavelet/lib \
+                         @abs_top_srcdir@/gr-wxgui/lib \
+                         @abs_top_builddir@/gr-wxgui/lib
 
 # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
 # directories that are symbolic links (a Unix filesystem feature) are excluded
diff --git a/docs/doxygen/Doxyfile.swig_doc.in b/docs/doxygen/Doxyfile.swig_doc.in
index 8f6182ca83..c1423b30c2 100644
--- a/docs/doxygen/Doxyfile.swig_doc.in
+++ b/docs/doxygen/Doxyfile.swig_doc.in
@@ -591,7 +591,7 @@ RECURSIVE              = YES
 # excluded from the INPUT source files. This way you can easily exclude a
 # subdirectory from a directory tree whose root is specified with the INPUT tag.
 
-EXCLUDE                = @CMAKE_SOURCE_DIR@/gr-qtgui/lib
+EXCLUDE                = 
 
 # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
 # directories that are symbolic links (a Unix filesystem feature) are excluded
-- 
cgit v1.2.3