summaryrefslogtreecommitdiff
path: root/gruel/src/include
diff options
context:
space:
mode:
authorNick Foster2011-04-13 17:18:14 -0700
committerNick Foster2011-04-13 17:18:14 -0700
commit9b7d444aaebbe0708e9703bce30c63b63bc81825 (patch)
tree29121aa250decfb1ed9ca7876e1857eec8779d83 /gruel/src/include
parent258186d5ca2e811ced7ea637fd16e3ed3bb5573e (diff)
parente8ff9ef4bb77517428e1208ff4b3551a38107bbd (diff)
downloadgnuradio-9b7d444aaebbe0708e9703bce30c63b63bc81825.tar.gz
gnuradio-9b7d444aaebbe0708e9703bce30c63b63bc81825.tar.bz2
gnuradio-9b7d444aaebbe0708e9703bce30c63b63bc81825.zip
Merge branch 'master' of http://gnuradio.org/git/gnuradio into cpuid
Conflicts: volk/Makefile.common volk/lib/qa_utils.cc
Diffstat (limited to 'gruel/src/include')
-rw-r--r--gruel/src/include/gruel/Makefile.am3
-rw-r--r--gruel/src/include/gruel/attributes.h56
-rw-r--r--gruel/src/include/gruel/pmt.h16
-rw-r--r--gruel/src/include/gruel/thread.h16
4 files changed, 79 insertions, 12 deletions
diff --git a/gruel/src/include/gruel/Makefile.am b/gruel/src/include/gruel/Makefile.am
index d7ac3d332..89a9da7f0 100644
--- a/gruel/src/include/gruel/Makefile.am
+++ b/gruel/src/include/gruel/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2008,2009 Free Software Foundation, Inc.
+# Copyright 2008-2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,6 +26,7 @@ EXTRA_DIST += inet.h.in
gruelincludedir = $(prefix)/include/gruel
gruelinclude_HEADERS = \
+ attributes.h \
inet.h \
msg_accepter.h \
msg_accepter_msgq.h \
diff --git a/gruel/src/include/gruel/attributes.h b/gruel/src/include/gruel/attributes.h
new file mode 100644
index 000000000..fdf48c977
--- /dev/null
+++ b/gruel/src/include/gruel/attributes.h
@@ -0,0 +1,56 @@
+/*
+ * 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
+
+#endif /* INCLUDED_GRUEL_ATTRIBUTES_H */
diff --git a/gruel/src/include/gruel/pmt.h b/gruel/src/include/gruel/pmt.h
index 514b24d8b..2948abb39 100644
--- a/gruel/src/include/gruel/pmt.h
+++ b/gruel/src/include/gruel/pmt.h
@@ -770,6 +770,11 @@ std::string pmt_write_string(pmt_t obj);
std::ostream& operator<<(std::ostream &os, pmt_t obj);
+/*!
+ * \brief Write pmt string representation to stdout.
+ */
+void pmt_print(pmt_t v);
+
/*
* ------------------------------------------------------------------------
@@ -789,8 +794,17 @@ pmt_t pmt_deserialize(std::streambuf &source);
void pmt_dump_sizeof(); // debugging
-} /* namespace pmt */
+/*!
+ * \brief Provide a simple string generating interface to pmt's serialize function
+ */
+std::string pmt_serialize_str(pmt_t obj);
+/*!
+ * \brief Provide a simple string generating interface to pmt's deserialize function
+ */
+pmt_t pmt_deserialize_str(std::string str);
+
+} /* namespace pmt */
#include <gruel/pmt_sugar.h>
diff --git a/gruel/src/include/gruel/thread.h b/gruel/src/include/gruel/thread.h
index d72e5520c..5a8ab1876 100644
--- a/gruel/src/include/gruel/thread.h
+++ b/gruel/src/include/gruel/thread.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2009,2010 Free Software Foundation, Inc.
+ * Copyright 2009,2010,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -21,21 +21,17 @@
#ifndef INCLUDED_THREAD_H
#define INCLUDED_THREAD_H
-#include <boost/thread.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/thread/thread.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/locks.hpp>
+#include <boost/thread/condition_variable.hpp>
namespace gruel {
typedef boost::thread thread;
typedef boost::mutex mutex;
- typedef boost::unique_lock<boost::mutex> scoped_lock;
+ typedef boost::mutex::scoped_lock scoped_lock;
typedef boost::condition_variable condition_variable;
- typedef boost::posix_time::time_duration duration;
-
- /*!
- * Returns absolute time 'secs' into the future
- */
- boost::system_time get_new_timeout(double secs);
} /* namespace gruel */