[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 100/148: Made some gruel changes to get it
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 100/148: Made some gruel changes to get it compiling on this system. |
Date: |
Mon, 15 Aug 2016 00:47:29 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
nwest pushed a commit to annotated tag old_usrp_devel_udp
in repository gnuradio.
commit ac1d333dc6b9548c5e867e2ce44ef4415d2c2ac3
Author: Josh Blum <address@hidden>
Date: Fri Dec 18 22:37:55 2009 -0800
Made some gruel changes to get it compiling on this system.
---
gruel/src/include/gruel/thread.h | 9 +++++++--
gruel/src/lib/thread.cc | 10 ++++++++--
usrp2/host/lib/control.cc | 2 +-
usrp2/host/lib/find.cc | 4 ++--
usrp2/host/usrp2.pc.in | 2 +-
5 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/gruel/src/include/gruel/thread.h b/gruel/src/include/gruel/thread.h
index 53423e2..f73dd3d 100644
--- a/gruel/src/include/gruel/thread.h
+++ b/gruel/src/include/gruel/thread.h
@@ -22,7 +22,7 @@
#define INCLUDED_THREAD_H
#include <boost/thread.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/bind.hpp> //boost::bind used when creating threads
namespace gruel {
@@ -33,7 +33,12 @@ namespace gruel {
/*!
* Returns absolute time 'secs' into the future
*/
- boost::system_time get_new_timeout(double secs);
+ boost::system_time abs_time(double secs);
+
+ /*!
+ * Returns a delta time of 'secs' in duration
+ */
+ boost::posix_time::time_duration delta_time(double secs);
} /* namespace gruel */
diff --git a/gruel/src/lib/thread.cc b/gruel/src/lib/thread.cc
index b470aae..7e18846 100644
--- a/gruel/src/lib/thread.cc
+++ b/gruel/src/lib/thread.cc
@@ -27,10 +27,16 @@
namespace gruel {
+ boost::posix_time::time_duration
+ delta_time(double secs)
+ {
+ return boost::posix_time::milliseconds(long(secs*1e3));
+ }
+
boost::system_time
- get_new_timeout(double secs)
+ abs_time(double secs)
{
- return boost::get_system_time() +
boost::posix_time::milliseconds(long(secs*1e3));
+ return boost::system_time() +
boost::posix_time::milliseconds(long(secs*1e3));
}
} /* namespace gruel */
diff --git a/usrp2/host/lib/control.cc b/usrp2/host/lib/control.cc
index 761e515..96f90aa 100644
--- a/usrp2/host/lib/control.cc
+++ b/usrp2/host/lib/control.cc
@@ -45,7 +45,7 @@ namespace usrp2 {
{
boost::this_thread::disable_interruption di;
gruel::scoped_lock l(d_mutex);
- boost::system_time to(gruel::get_new_timeout(secs));
+ boost::system_time to(gruel::abs_time(secs));
while (!d_complete) {
if (!d_cond.timed_wait(l, to))
diff --git a/usrp2/host/lib/find.cc b/usrp2/host/lib/find.cc
index f41e2d6..a5c96b3 100644
--- a/usrp2/host/lib/find.cc
+++ b/usrp2/host/lib/find.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2008 Free Software Foundation, Inc.
+ * Copyright 2008, 2009 Free Software Foundation, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -64,7 +64,7 @@ namespace usrp2{
d_ctrl_transport->sendv(&iov, 1);
//allow responses to gather
boost::thread *ctrl_thread = new
boost::thread(boost::bind(&find_helper::ctrl_thread_loop, this));
- boost::this_thread::sleep(gruel::get_new_timeout(0.05)); //50ms
+ boost::this_thread::sleep(gruel::delta_time(0.05)); //50ms
ctrl_thread->interrupt();
ctrl_thread->join();
return d_result;
diff --git a/usrp2/host/usrp2.pc.in b/usrp2/host/usrp2.pc.in
index eaef5f4..9cf3884 100644
--- a/usrp2/host/usrp2.pc.in
+++ b/usrp2/host/usrp2.pc.in
@@ -5,7 +5,7 @@ address@hidden@
Name: usrp2
Description: Universal Software Radio Peripheral 2
-Requires: gnuradio-omnithread gruel
+Requires: vrt gruel
Version: @VERSION@
Libs: -L${libdir} -lusrp2
Cflags: -I${includedir} @DEFINES@
- [Commit-gnuradio] [gnuradio] 80/148: working vrt tx, (continued)
- [Commit-gnuradio] [gnuradio] 80/148: working vrt tx, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 85/148: also release ethernet frames here, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 88/148: revered dumb change to vrt expanded header, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 84/148: Replaced rx metadata with vrt expanded header. Removed timestamp from tx metadata, changes will be made for vrt., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 93/148: using vrt::expanded_header::unparse in usrp2 impl tx raw, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 94/148: Replaced the need for code word tables by setting the header/trailer lengths in the switch body jump table, just like in the unparser switch body., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 72/148: Logic for the start/end of burst bits, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 82/148: Merge branch 'merge_usrp2' into wip/usrp2, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 91/148: Added time spec to the start streaming command. One can do a start streaming at by specifiying a time spec, or leave the parameter off for stream now mode., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 97/148: removed the usrp2_bytesex header since it only imported from gruel, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 100/148: Made some gruel changes to get it compiling on this system.,
git <=
- [Commit-gnuradio] [gnuradio] 101/148: flattened usrp2 hierarchy `, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 87/148: Removed references to channel numbers in usrp2 and gr usrp2. Removed the sample handler and replaced it with the vrt packet handler. Fixed the build systems to require vrt for usrp., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 117/148: typo fix, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 111/148: Merge branch 'master' of address@hidden:jblum into wip/usrp2, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 104/148: barebones udp support. Compiles, but untested., git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 130/148: should fix the endless packet bug, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 106/148: proper time sync to pps, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 119/148: better debug pins, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 114/148: Merge branch 'wip/usrp2' of http://gnuradio.org/git/matt into wip/usrp2, git, 2016/08/14
- [Commit-gnuradio] [gnuradio] 116/148: actually connect the ports -- why this isn't flagged as an error I'll never know, git, 2016/08/14