summaryrefslogtreecommitdiff
path: root/gruel
diff options
context:
space:
mode:
Diffstat (limited to 'gruel')
-rw-r--r--gruel/src/include/gruel/pmt.h4
-rw-r--r--gruel/src/include/gruel/pmt_pool.h4
-rw-r--r--gruel/src/lib/Makefile.am79
-rw-r--r--gruel/src/lib/pmt/Makefile.am111
-rwxr-xr-xgruel/src/lib/pmt/generate_unv.py (renamed from gruel/src/lib/generate_unv.py)4
-rw-r--r--gruel/src/lib/pmt/pmt.cc (renamed from gruel/src/lib/pmt.cc)6
-rw-r--r--gruel/src/lib/pmt/pmt_int.h (renamed from gruel/src/lib/pmt_int.h)4
-rw-r--r--gruel/src/lib/pmt/pmt_io.cc (renamed from gruel/src/lib/pmt_io.cc)4
-rw-r--r--gruel/src/lib/pmt/pmt_pool.cc (renamed from gruel/src/lib/pmt_pool.cc)4
-rw-r--r--gruel/src/lib/pmt/pmt_serialize.cc (renamed from gruel/src/lib/pmt_serialize.cc)4
-rw-r--r--gruel/src/lib/pmt/qa_pmt.cc (renamed from gruel/src/lib/qa_pmt.cc)0
-rw-r--r--gruel/src/lib/pmt/qa_pmt.h (renamed from gruel/src/lib/qa_pmt.h)0
-rw-r--r--gruel/src/lib/pmt/qa_pmt_prims.cc (renamed from gruel/src/lib/qa_pmt_prims.cc)2
-rw-r--r--gruel/src/lib/pmt/qa_pmt_prims.h (renamed from gruel/src/lib/qa_pmt_prims.h)0
-rw-r--r--gruel/src/lib/pmt/test_pmt.cc (renamed from gruel/src/lib/test_pmt.cc)0
-rw-r--r--gruel/src/lib/pmt/unv_qa_template.cc.t (renamed from gruel/src/lib/unv_qa_template.cc.t)0
-rw-r--r--gruel/src/lib/pmt/unv_template.cc.t (renamed from gruel/src/lib/unv_template.cc.t)4
-rw-r--r--gruel/src/lib/pmt/unv_template.h.t (renamed from gruel/src/lib/unv_template.h.t)0
18 files changed, 135 insertions, 95 deletions
diff --git a/gruel/src/include/gruel/pmt.h b/gruel/src/include/gruel/pmt.h
index 6dc4508b1..de0998b5e 100644
--- a/gruel/src/include/gruel/pmt.h
+++ b/gruel/src/include/gruel/pmt.h
@@ -39,7 +39,7 @@
* exception that these objects are transparently reference counted.
*/
-namespace gruel {
+namespace pmt {
/*!
* \brief base class of all pmt types
@@ -677,6 +677,6 @@ pmt_t pmt_deserialize(std::streambuf &source);
void pmt_dump_sizeof(); // debugging
-} /* namespace gruel */
+} /* namespace pmt */
#endif /* INCLUDED_PMT_H */
diff --git a/gruel/src/include/gruel/pmt_pool.h b/gruel/src/include/gruel/pmt_pool.h
index 18b498faa..b792523e0 100644
--- a/gruel/src/include/gruel/pmt_pool.h
+++ b/gruel/src/include/gruel/pmt_pool.h
@@ -25,7 +25,7 @@
#include <vector>
#include <boost/thread.hpp>
-namespace gruel {
+namespace pmt {
/*!
* \brief very simple thread-safe fixed-size allocation pool
@@ -67,6 +67,6 @@ public:
void free(void *p);
};
-} /* namespace gruel */
+} /* namespace pmt */
#endif /* INCLUDED_PMT_POOL_H */
diff --git a/gruel/src/lib/Makefile.am b/gruel/src/lib/Makefile.am
index 2a968d25f..bf1ae731a 100644
--- a/gruel/src/lib/Makefile.am
+++ b/gruel/src/lib/Makefile.am
@@ -21,9 +21,9 @@
include $(top_srcdir)/Makefile.common
-AM_CPPFLAGS = $(DEFINES) $(BOOST_CPPFLAGS) $(CPPUNIT_INCLUDES) $(GRUEL_INCLUDES) $(WITH_INCLUDES)
+SUBDIRS = pmt
-TESTS = test_pmt
+AM_CPPFLAGS = $(DEFINES) $(BOOST_CPPFLAGS) $(CPPUNIT_INCLUDES) $(GRUEL_INCLUDES) $(WITH_INCLUDES)
lib_LTLIBRARIES = libgruel.la
@@ -31,38 +31,11 @@ lib_LTLIBRARIES = libgruel.la
libgruel_la_LDFLAGS = $(NO_UNDEFINED) $(BOOST_LDFLAGS) -version-info 0:0:0
# ----------------------------------------------------------------
-# these scripts generate code
-
-code_generator = \
- generate_unv.py \
- unv_template.h.t \
- unv_template.cc.t \
- unv_qa_template.cc.t
-
-GENERATED_H = \
- pmt_unv_int.h \
- qa_pmt_unv.h
-
-GENERATED_CC = \
- pmt_unv.cc \
- qa_pmt_unv.cc
-
-python_built_sources = $(GENERATED_H) $(GENERATED_CC)
-PMT_SERIAL_TAGS_H = $(abs_top_builddir)/gruel/src/include/gruel/pmt_serial_tags.h
-BUILT_SOURCES = $(python_built_sources) $(PMT_SERIAL_TAGS_H)
-
-EXTRA_DIST = $(code_generator)
-
-# ----------------------------------------------------------------
+PMT_LIB = pmt/libpmt.la
# These are the source files that go into the gruel shared library
libgruel_la_SOURCES = \
- pmt.cc \
- pmt_io.cc \
- pmt_pool.cc \
- pmt_serialize.cc \
- pmt_unv.cc \
realtime.cc \
sys_pri.cc \
thread_body_wrapper.cc \
@@ -70,51 +43,7 @@ libgruel_la_SOURCES = \
libgruel_la_LIBADD = \
$(BOOST_THREAD_LIB) \
+ $(PMT_LIB) \
-lstdc++
-noinst_HEADERS = \
- $(GENERATED_H) \
- pmt_int.h \
- qa_pmt.h \
- qa_pmt_prims.h
-
-# Build the qa code into its own library
-
-noinst_LTLIBRARIES = libpmt-qa.la
-
-libpmt_qa_la_SOURCES = \
- qa_pmt.cc \
- qa_pmt_prims.cc \
- qa_pmt_unv.cc
-
-# magic flags
-libpmt_qa_la_LDFLAGS = $(NO_UNDEFINED) -avoid version
-
-libpmt_qa_la_LIBADD = \
- libgruel.la \
- $(CPPUNIT_LIBS) \
- -lstdc++
-
-noinst_PROGRAMS = \
- test_pmt
-
-
-LIBGRUEL = libgruel.la
-LIBPMTQA = libpmt-qa.la $(LIBGRUEL)
-
-test_pmt_SOURCES = test_pmt.cc
-test_pmt_LDADD = $(LIBPMTQA)
-
-# Do creation and inclusion of other Makefiles last
-
-# common way for generating sources from templates when using
-# BUILT_SOURCES, using parallel build protection.
-gen_sources = $(python_built_sources)
-gen_sources_deps = $(core_generator)
-par_gen_command = PYTHONPATH=$(top_srcdir)/gruel/src/lib srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_unv.py
-include $(top_srcdir)/Makefile.par.gen
-# Rule to create the build header file using GUILE
-# Doesn't need parallel protections because there is a single target
-$(PMT_SERIAL_TAGS_H): $(srcdir)/../scheme/gnuradio/gen-serial-tags.scm $(srcdir)/../scheme/gnuradio/pmt-serial-tags.scm
- $(RUN_GUILE) $(srcdir)/../scheme/gnuradio/gen-serial-tags.scm $(srcdir)/../scheme/gnuradio/pmt-serial-tags.scm $(PMT_SERIAL_TAGS_H)
diff --git a/gruel/src/lib/pmt/Makefile.am b/gruel/src/lib/pmt/Makefile.am
new file mode 100644
index 000000000..5e9f2fac9
--- /dev/null
+++ b/gruel/src/lib/pmt/Makefile.am
@@ -0,0 +1,111 @@
+#
+# 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 GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+include $(top_srcdir)/Makefile.common
+
+AM_CPPFLAGS = $(DEFINES) $(BOOST_CPPFLAGS) $(CPPUNIT_INCLUDES) $(GRUEL_INCLUDES) $(WITH_INCLUDES)
+
+TESTS = test_pmt
+
+noinst_LTLIBRARIES = libpmt.la
+
+# ----------------------------------------------------------------
+# these scripts generate code
+
+code_generator = \
+ generate_unv.py \
+ unv_template.h.t \
+ unv_template.cc.t \
+ unv_qa_template.cc.t
+
+GENERATED_H = \
+ pmt_unv_int.h \
+ qa_pmt_unv.h
+
+GENERATED_CC = \
+ pmt_unv.cc \
+ qa_pmt_unv.cc
+
+python_built_sources = $(GENERATED_H) $(GENERATED_CC)
+
+PMT_SERIAL_TAGS_H = $(abs_top_builddir)/gruel/src/include/gruel/pmt_serial_tags.h
+BUILT_SOURCES = $(python_built_sources) $(PMT_SERIAL_TAGS_H)
+
+EXTRA_DIST = $(code_generator)
+
+# ----------------------------------------------------------------
+
+libpmt_la_SOURCES = \
+ pmt.cc \
+ pmt_io.cc \
+ pmt_pool.cc \
+ pmt_serialize.cc \
+ pmt_unv.cc
+
+libpmt_la_LIBADD = \
+ $(BOOST_THREAD_LIB) \
+ -lstdc++
+
+noinst_HEADERS = \
+ $(GENERATED_H) \
+ pmt_int.h \
+ qa_pmt.h \
+ qa_pmt_prims.h
+
+# Build the qa code into its own library
+
+noinst_LTLIBRARIES += libpmt-qa.la
+
+libpmt_qa_la_SOURCES = \
+ qa_pmt.cc \
+ qa_pmt_prims.cc \
+ qa_pmt_unv.cc
+
+# magic flags
+libpmt_qa_la_LDFLAGS = $(NO_UNDEFINED) -avoid version
+
+libpmt_qa_la_LIBADD = \
+ libpmt.la \
+ $(CPPUNIT_LIBS) \
+ -lstdc++
+
+noinst_PROGRAMS = \
+ test_pmt
+
+
+LIBPMTQA = libpmt-qa.la
+
+test_pmt_SOURCES = test_pmt.cc
+test_pmt_LDADD = $(LIBPMTQA)
+
+# Do creation and inclusion of other Makefiles last
+
+# common way for generating sources from templates when using
+# BUILT_SOURCES, using parallel build protection.
+gen_sources = $(python_built_sources)
+gen_sources_deps = $(core_generator)
+par_gen_command = PYTHONPATH=$(top_srcdir)/gruel/src/lib/pmt srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_unv.py
+include $(top_srcdir)/Makefile.par.gen
+
+# Rule to create the build header file using GUILE
+# Doesn't need parallel protections because there is a single target
+$(PMT_SERIAL_TAGS_H): $(srcdir)/../../scheme/gnuradio/gen-serial-tags.scm $(srcdir)/../../scheme/gnuradio/pmt-serial-tags.scm
+ $(RUN_GUILE) $(srcdir)/../../scheme/gnuradio/gen-serial-tags.scm $(srcdir)/../../scheme/gnuradio/pmt-serial-tags.scm $(PMT_SERIAL_TAGS_H)
diff --git a/gruel/src/lib/generate_unv.py b/gruel/src/lib/pmt/generate_unv.py
index 3a7305b40..02aace250 100755
--- a/gruel/src/lib/generate_unv.py
+++ b/gruel/src/lib/pmt/generate_unv.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2006 Free Software Foundation, Inc.
+# Copyright 2006,2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -85,7 +85,7 @@ qa_includes = """
#include <gruel/pmt.h>
#include <stdio.h>
-using namespace gruel;
+using namespace pmt;
"""
diff --git a/gruel/src/lib/pmt.cc b/gruel/src/lib/pmt/pmt.cc
index 8e0c01625..fbf557be1 100644
--- a/gruel/src/lib/pmt.cc
+++ b/gruel/src/lib/pmt/pmt.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2009 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -30,7 +30,7 @@
#include <gruel/pmt_pool.h>
#include <string.h>
-namespace gruel {
+namespace pmt {
static const int CACHE_LINE_SIZE = 64; // good guess
@@ -1038,4 +1038,4 @@ pmt_dump_sizeof()
printf("sizeof(pmt_uniform_vector) = %3zd\n", sizeof(pmt_uniform_vector));
}
-} /* namespace gruel */
+} /* namespace pmt */
diff --git a/gruel/src/lib/pmt_int.h b/gruel/src/lib/pmt/pmt_int.h
index 03f0e555c..9aac322a7 100644
--- a/gruel/src/lib/pmt_int.h
+++ b/gruel/src/lib/pmt/pmt_int.h
@@ -32,7 +32,7 @@
*/
#define PMT_LOCAL_ALLOCATOR 0 // define to 0 or 1
-namespace gruel {
+namespace pmt {
class pmt_base : boost::noncopyable {
protected:
@@ -222,6 +222,6 @@ public:
#include "pmt_unv_int.h"
-} /* namespace gruel */
+} /* namespace pmt */
#endif /* INCLUDED_PMT_INT_H */
diff --git a/gruel/src/lib/pmt_io.cc b/gruel/src/lib/pmt/pmt_io.cc
index e10ea7814..f5a82de0e 100644
--- a/gruel/src/lib/pmt_io.cc
+++ b/gruel/src/lib/pmt/pmt_io.cc
@@ -27,7 +27,7 @@
#include "pmt_int.h"
#include <sstream>
-namespace gruel {
+namespace pmt {
static void
pmt_write_list_tail(pmt_t obj, std::ostream &port)
@@ -138,4 +138,4 @@ pmt_deserialize(std::istream &source)
throw pmt_notimplemented("notimplemented: pmt_deserialize", PMT_NIL);
}
-} /* namespace gruel */
+} /* namespace pmt */
diff --git a/gruel/src/lib/pmt_pool.cc b/gruel/src/lib/pmt/pmt_pool.cc
index 79a22ea73..731d28ca7 100644
--- a/gruel/src/lib/pmt_pool.cc
+++ b/gruel/src/lib/pmt/pmt_pool.cc
@@ -26,7 +26,7 @@
#include <algorithm>
#include <stdint.h>
-namespace gruel {
+namespace pmt {
static inline size_t
ROUNDUP(size_t x, size_t stride)
@@ -109,4 +109,4 @@ pmt_pool::free(void *foo)
d_cond.notify_one();
}
-} /* namespace gruel */
+} /* namespace pmt */
diff --git a/gruel/src/lib/pmt_serialize.cc b/gruel/src/lib/pmt/pmt_serialize.cc
index b7193e811..937423a93 100644
--- a/gruel/src/lib/pmt_serialize.cc
+++ b/gruel/src/lib/pmt/pmt_serialize.cc
@@ -27,7 +27,7 @@
#include "pmt_int.h"
#include "gruel/pmt_serial_tags.h"
-namespace gruel {
+namespace pmt {
static pmt_t parse_pair(std::streambuf &sb);
@@ -354,4 +354,4 @@ parse_pair(std::streambuf &sb)
return val;
}
-} /* namespace gruel */
+} /* namespace pmt */
diff --git a/gruel/src/lib/qa_pmt.cc b/gruel/src/lib/pmt/qa_pmt.cc
index 250befafa..250befafa 100644
--- a/gruel/src/lib/qa_pmt.cc
+++ b/gruel/src/lib/pmt/qa_pmt.cc
diff --git a/gruel/src/lib/qa_pmt.h b/gruel/src/lib/pmt/qa_pmt.h
index 43a6dbf67..43a6dbf67 100644
--- a/gruel/src/lib/qa_pmt.h
+++ b/gruel/src/lib/pmt/qa_pmt.h
diff --git a/gruel/src/lib/qa_pmt_prims.cc b/gruel/src/lib/pmt/qa_pmt_prims.cc
index ac93f8063..b81354721 100644
--- a/gruel/src/lib/qa_pmt_prims.cc
+++ b/gruel/src/lib/pmt/qa_pmt_prims.cc
@@ -26,7 +26,7 @@
#include <stdio.h>
#include <sstream>
-using namespace gruel;
+using namespace pmt;
void
qa_pmt_prims::test_symbols()
diff --git a/gruel/src/lib/qa_pmt_prims.h b/gruel/src/lib/pmt/qa_pmt_prims.h
index effb3a097..effb3a097 100644
--- a/gruel/src/lib/qa_pmt_prims.h
+++ b/gruel/src/lib/pmt/qa_pmt_prims.h
diff --git a/gruel/src/lib/test_pmt.cc b/gruel/src/lib/pmt/test_pmt.cc
index 034785f4e..034785f4e 100644
--- a/gruel/src/lib/test_pmt.cc
+++ b/gruel/src/lib/pmt/test_pmt.cc
diff --git a/gruel/src/lib/unv_qa_template.cc.t b/gruel/src/lib/pmt/unv_qa_template.cc.t
index 1e2c8e8eb..1e2c8e8eb 100644
--- a/gruel/src/lib/unv_qa_template.cc.t
+++ b/gruel/src/lib/pmt/unv_qa_template.cc.t
diff --git a/gruel/src/lib/unv_template.cc.t b/gruel/src/lib/pmt/unv_template.cc.t
index b19e32d27..148965c09 100644
--- a/gruel/src/lib/unv_template.cc.t
+++ b/gruel/src/lib/pmt/unv_template.cc.t
@@ -2,7 +2,7 @@
// pmt_@TAG@vector
////////////////////////////////////////////////////////////////////////////
-namespace gruel {
+namespace pmt {
static pmt_@TAG@vector *
_@TAG@vector(pmt_t x)
@@ -119,4 +119,4 @@ pmt_@TAG@vector_writable_elements(pmt_t vector, size_t &len)
return _@TAG@vector(vector)->writable_elements(len);
}
-} /* namespace gruel */
+} /* namespace pmt */
diff --git a/gruel/src/lib/unv_template.h.t b/gruel/src/lib/pmt/unv_template.h.t
index 83ba0be0f..83ba0be0f 100644
--- a/gruel/src/lib/unv_template.h.t
+++ b/gruel/src/lib/pmt/unv_template.h.t