diff options
| author | Josh Blum <josh@joshknows.com> | 2011-02-05 12:37:20 -0800 | 
|---|---|---|
| committer | Josh Blum <josh@joshknows.com> | 2011-02-05 12:37:20 -0800 | 
| commit | 5d10aa397f044ea6781b4977c14171abfb4a727d (patch) | |
| tree | c4578313720b2be2f4ce4d7c5e05c8e8a2a3b7e7 /host/lib/usrp/usrp1 | |
| parent | 3d32e7dc3b28cc384185c580035c0011a5beb167 (diff) | |
| download | uhd-5d10aa397f044ea6781b4977c14171abfb4a727d.tar.gz uhd-5d10aa397f044ea6781b4977c14171abfb4a727d.tar.bz2 uhd-5d10aa397f044ea6781b4977c14171abfb4a727d.zip | |
uhd: change bounded_buffer implementation and code using it
The bounded buffer now uses the detail idiom to hide implementation to inline better.
The whole sptr/make idiom was removed from bounded buffer to just construct directly.
The code using bounded buffer was changed for the new api:
replaces access operators and calls to the factory function.
Diffstat (limited to 'host/lib/usrp/usrp1')
| -rw-r--r-- | host/lib/usrp/usrp1/soft_time_ctrl.cpp | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/host/lib/usrp/usrp1/soft_time_ctrl.cpp b/host/lib/usrp/usrp1/soft_time_ctrl.cpp index 246df93eb..e1b671811 100644 --- a/host/lib/usrp/usrp1/soft_time_ctrl.cpp +++ b/host/lib/usrp/usrp1/soft_time_ctrl.cpp @@ -39,7 +39,7 @@ public:      soft_time_ctrl_impl(const cb_fcn_type &stream_on_off):          _nsamps_remaining(0),          _stream_mode(stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS), -        _cmd_queue(bounded_buffer<boost::any>::make(2)), +        _cmd_queue(2),          _stream_on_off(stream_on_off)      {          //synchronously spawn a new thread @@ -112,7 +112,7 @@ public:      }      void issue_stream_cmd(const stream_cmd_t &cmd){ -        _cmd_queue->push_with_wait(cmd); +        _cmd_queue.push_with_wait(cmd);      }      void stream_on_off(bool enb){ @@ -180,7 +180,7 @@ public:          try{              boost::any cmd;              while (true){ -                _cmd_queue->pop_with_wait(cmd); +                _cmd_queue.pop_with_wait(cmd);                  recv_cmd_handle_cmd(boost::any_cast<stream_cmd_t>(cmd));              }          } catch(const boost::thread_interrupted &){} @@ -191,7 +191,7 @@ private:      size_t _nsamps_remaining;      stream_cmd_t::stream_mode_t _stream_mode;      time_spec_t _time_offset; -    bounded_buffer<boost::any>::sptr _cmd_queue; +    bounded_buffer<boost::any> _cmd_queue;      const cb_fcn_type _stream_on_off;      boost::thread_group _thread_group;  }; | 
