commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 12/148: Disable interruption in those funct


From: git
Subject: [Commit-gnuradio] [gnuradio] 12/148: Disable interruption in those functions that use interruption points such as sleep, wait, and timed_wait.
Date: Mon, 15 Aug 2016 00:47:20 +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 8b7e828a947ebb1007cca22875929077b1b83874
Author: Josh Blum <address@hidden>
Date:   Mon Nov 2 17:22:58 2009 -0800

    Disable interruption in those functions that use interruption points such 
as sleep, wait, and timed_wait.
    
    This is also true for join, however, we are currently not using join at 
flow graph runtime, so its ok.
---
 usrp2/host/lib/control.cc    | 1 +
 usrp2/host/lib/usrp2_impl.cc | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/usrp2/host/lib/control.cc b/usrp2/host/lib/control.cc
index 4f3656b..761e515 100644
--- a/usrp2/host/lib/control.cc
+++ b/usrp2/host/lib/control.cc
@@ -43,6 +43,7 @@ namespace usrp2 {
   int
   pending_reply::wait_for_completion(double secs)
   {
+    boost::this_thread::disable_interruption di;
     gruel::scoped_lock l(d_mutex);
     boost::system_time to(gruel::get_new_timeout(secs));
 
diff --git a/usrp2/host/lib/usrp2_impl.cc b/usrp2/host/lib/usrp2_impl.cc
index 26dba0a..1caa071 100644
--- a/usrp2/host/lib/usrp2_impl.cc
+++ b/usrp2/host/lib/usrp2_impl.cc
@@ -379,8 +379,9 @@ namespace usrp2 {
   void
   usrp2::impl::run_ctrl_thread()
   {
+    boost::this_thread::disable_interruption di;
     d_ctrl_running = true;
-    uint32_t buff[1500]; // FIXME use MTU
+    uint8_t buff[1500]; // FIXME use MTU
     while (d_ctrl_running){
       int ctrl_recv_len = d_eth_ctrl->read_packet_dont_block(buff, 
sizeof(buff));
       if (ctrl_recv_len > 0) handle_control_packet(buff, ctrl_recv_len);
@@ -408,6 +409,7 @@ namespace usrp2 {
   void
   usrp2::impl::run_data_thread()
   {
+    boost::this_thread::disable_interruption di;
     if (gruel::enable_realtime_scheduling(gruel::sys_pri::usrp2_backend()) != 
gruel::RT_OK)
       std::cerr << "usrp2: failed to enable realtime scheduling" << std::endl;
     d_data_running = true;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]