more updates
This commit is contained in:
@@ -43,7 +43,7 @@ periodic_msg_source_impl::periodic_msg_source_impl(pmt::pmt_t msg,
|
||||
}
|
||||
|
||||
periodic_msg_source_impl::~periodic_msg_source_impl() {
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
|
||||
d_finished = true;
|
||||
d_thread->interrupt();
|
||||
@@ -60,7 +60,7 @@ periodic_msg_source_impl::run(periodic_msg_source_impl *instance) {
|
||||
while(1) {
|
||||
long delay;
|
||||
{
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
if(d_finished || !d_nmsg_left) {
|
||||
d_finished = true;
|
||||
if(d_quit) {
|
||||
@@ -86,32 +86,32 @@ periodic_msg_source_impl::run(periodic_msg_source_impl *instance) {
|
||||
|
||||
void
|
||||
periodic_msg_source_impl::set_nmsg(int nmsg) {
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
d_nmsg_total = nmsg;
|
||||
}
|
||||
|
||||
int
|
||||
periodic_msg_source_impl::get_nmsg() {
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
return d_nmsg_total;
|
||||
}
|
||||
|
||||
void
|
||||
periodic_msg_source_impl::set_delay(long delay) {
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
d_interval = delay;
|
||||
}
|
||||
|
||||
long
|
||||
periodic_msg_source_impl::get_delay() {
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
return d_interval;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
periodic_msg_source_impl::start_tx() {
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
|
||||
if(is_running()) return;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ random_periodic_msg_source_impl::random_periodic_msg_source_impl(int msg_len,
|
||||
}
|
||||
|
||||
random_periodic_msg_source_impl::~random_periodic_msg_source_impl() {
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
d_finished = true;
|
||||
d_thread->interrupt();
|
||||
d_thread->join();
|
||||
@@ -65,7 +65,7 @@ random_periodic_msg_source_impl::run(random_periodic_msg_source_impl *instance)
|
||||
while(1) {
|
||||
long delay;
|
||||
{
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
if(d_finished || !d_nmsg_left) {
|
||||
d_finished = true;
|
||||
if(d_quit) {
|
||||
@@ -104,32 +104,32 @@ random_periodic_msg_source_impl::generate_msg() {
|
||||
}
|
||||
void
|
||||
random_periodic_msg_source_impl::set_nmsg(int nmsg) {
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
d_nmsg_total = nmsg;
|
||||
}
|
||||
|
||||
int
|
||||
random_periodic_msg_source_impl::get_nmsg() {
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
return d_nmsg_total;
|
||||
}
|
||||
|
||||
void
|
||||
random_periodic_msg_source_impl::set_delay(long delay) {
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
d_interval = delay;
|
||||
}
|
||||
|
||||
long
|
||||
random_periodic_msg_source_impl::get_delay() {
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
return d_interval;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
random_periodic_msg_source_impl::start_tx() {
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
|
||||
if(is_running()) return;
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ rtt_measure_impl::general_work(int noutput, gr_vector_int& ninput_items,
|
||||
boost::posix_time::ptime
|
||||
rtt_measure_impl::start_time()
|
||||
{
|
||||
gr::thread::scoped_lock(d_mutex);
|
||||
gr::thread::scoped_lock d_mutex;
|
||||
return d_start_time;
|
||||
}
|
||||
|
||||
@@ -91,4 +91,4 @@ rtt_measure::sptr
|
||||
rtt_measure::make(unsigned long interval)
|
||||
{
|
||||
return gnuradio::get_initial_sptr(new rtt_measure_impl(interval));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user