summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/runtime/gr_runtime.cc
diff options
context:
space:
mode:
authorjcorgan2007-05-04 21:50:13 +0000
committerjcorgan2007-05-04 21:50:13 +0000
commit0ad83f0492d51806e6bf30a89f04affda3a71ca2 (patch)
tree4746d3b36743ce1d3006572f4c949eb1420d8515 /gnuradio-core/src/lib/runtime/gr_runtime.cc
parent09fb857fd9d361a88a0bd5e9f882e1125e9ebaa9 (diff)
downloadgnuradio-0ad83f0492d51806e6bf30a89f04affda3a71ca2.tar.gz
gnuradio-0ad83f0492d51806e6bf30a89f04affda3a71ca2.tar.bz2
gnuradio-0ad83f0492d51806e6bf30a89f04affda3a71ca2.zip
Merged r5230:5237 from jcorgan/disc2. Trunk passes distcheck.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@5238 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/lib/runtime/gr_runtime.cc')
-rw-r--r--gnuradio-core/src/lib/runtime/gr_runtime.cc25
1 files changed, 2 insertions, 23 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_runtime.cc b/gnuradio-core/src/lib/runtime/gr_runtime.cc
index a8b932f21..3a992f689 100644
--- a/gnuradio-core/src/lib/runtime/gr_runtime.cc
+++ b/gnuradio-core/src/lib/runtime/gr_runtime.cc
@@ -26,11 +26,8 @@
#include <gr_runtime.h>
#include <gr_runtime_impl.h>
-#include <gr_local_sighandler.h>
#include <iostream>
-static gr_runtime *s_runtime = 0;
-
gr_runtime_sptr
gr_make_runtime(gr_hier_block2_sptr top_block)
{
@@ -40,28 +37,16 @@ gr_make_runtime(gr_hier_block2_sptr top_block)
gr_runtime::gr_runtime(gr_hier_block2_sptr top_block)
{
d_impl = new gr_runtime_impl(top_block);
- s_runtime = this;
}
gr_runtime::~gr_runtime()
{
- s_runtime = 0; // we don't own this
delete d_impl;
}
-// FIXME: This prevents using more than one gr_runtime instance
-static void
-runtime_sigint_handler(int signum)
-{
- if (s_runtime)
- s_runtime->stop();
-}
-
void
gr_runtime::start()
{
- gr_local_sighandler sigint(SIGINT, runtime_sigint_handler);
-
d_impl->start();
}
@@ -74,24 +59,18 @@ gr_runtime::stop()
void
gr_runtime::wait()
{
- gr_local_sighandler sigint(SIGINT, runtime_sigint_handler);
-
d_impl->wait();
}
void
gr_runtime::run()
{
- gr_local_sighandler sigint(SIGINT, runtime_sigint_handler);
-
- d_impl->start();
- d_impl->wait();
+ start();
+ wait();
}
void
gr_runtime::restart()
{
- gr_local_sighandler sigint(SIGINT, runtime_sigint_handler);
-
d_impl->restart();
}