Skip to content

Commit

Permalink
Don't include uhd/utils/atomic.hpp - we disabled threading here long …
Browse files Browse the repository at this point in the history
…time ago
  • Loading branch information
chemeris committed Oct 31, 2019
1 parent 828c811 commit 48ad4cd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
15 changes: 0 additions & 15 deletions host/cores/super_recv_packet_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <uhd/stream.hpp>
#include "umtrx_log_adapter.hpp"
#include <uhd/utils/tasks.hpp>
#include <uhd/utils/atomic.hpp>
#include <uhd/utils/byteswap.hpp>
#include <uhd/types/metadata.hpp>
#include <uhd/transport/vrt_if_packet.hpp>
Expand Down Expand Up @@ -92,22 +91,14 @@ class recv_packet_handler{
}

~recv_packet_handler(void){
_task_barrier.interrupt();
_task_handlers.clear();
}

//! Resize the number of transport channels
void resize(const size_t size){
if (this->size() == size) return;
_task_handlers.clear();
_props.resize(size);
//re-initialize all buffers infos by re-creating the vector
_buffers_infos = std::vector<buffers_info_type>(4, buffers_info_type(size));
_task_barrier.resize(size);
_task_handlers.resize(size);
for (size_t i = 1/*skip 0*/; i < size; i++){
//_task_handlers[i] = task::make(boost::bind(&recv_packet_handler::converter_thread_task, this, i));
};
}

//! Get the channel width of this handler
Expand Down Expand Up @@ -666,8 +657,6 @@ class recv_packet_handler{
******************************************************************/
UHD_INLINE void converter_thread_task(const size_t index)
{
//_task_barrier.wait();

//shortcut references to local data structures
buffers_info_type &buff_info = get_curr_buffer_info();
per_buffer_info_type &info = buff_info[index];
Expand All @@ -691,13 +680,9 @@ class recv_packet_handler{
if (buff_info.data_bytes_to_copy == _convert_bytes_to_copy){
info.buff.reset(); //effectively a release
}

//if (index == 0) _task_barrier.wait_others();
}

//! Shared variables for the worker threads
reusable_barrier _task_barrier;
std::vector<task::sptr> _task_handlers;
size_t _convert_nsamps;
const rx_streamer::buffs_type *_convert_buffs;
size_t _convert_buffer_offset_bytes;
Expand Down
15 changes: 0 additions & 15 deletions host/cores/super_send_packet_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <uhd/stream.hpp>
#include "umtrx_log_adapter.hpp"
#include <uhd/utils/tasks.hpp>
#include <uhd/utils/atomic.hpp>
#include <uhd/utils/byteswap.hpp>
#include <uhd/types/metadata.hpp>
#include <uhd/transport/vrt_if_packet.hpp>
Expand Down Expand Up @@ -74,22 +73,14 @@ class send_packet_handler{
}

~send_packet_handler(void){
_task_barrier.interrupt();
_task_handlers.clear();
}

//! Resize the number of transport channels
void resize(const size_t size){
if (this->size() == size) return;
_task_handlers.clear();
_props.resize(size);
static const boost::uint64_t zero = 0;
_zero_buffs.resize(size, &zero);
_task_barrier.resize(size);
_task_handlers.resize(size);
for (size_t i = 1/*skip 0*/; i < size; i++){
//_task_handlers[i] = task::make(boost::bind(&send_packet_handler::converter_thread_task, this, i));
};
}

//! Get the channel width of this handler
Expand Down Expand Up @@ -390,8 +381,6 @@ class send_packet_handler{
******************************************************************/
UHD_INLINE void converter_thread_task(const size_t index)
{
//_task_barrier.wait();

//shortcut references to local data structures
managed_send_buffer::sptr &buff = _props[index].buff;
vrt::if_packet_info_t if_packet_info = *_convert_if_packet_info;
Expand Down Expand Up @@ -419,13 +408,9 @@ class send_packet_handler{
const size_t num_vita_words32 = _header_offset_words32+if_packet_info.num_packet_words32;
buff->commit(num_vita_words32*sizeof(boost::uint32_t));
buff.reset(); //effectively a release

//if (index == 0) _task_barrier.wait_others();
}

//! Shared variables for the worker threads
reusable_barrier _task_barrier;
std::vector<task::sptr> _task_handlers;
size_t _convert_nsamps;
const tx_streamer::buffs_type *_convert_buffs;
size_t _convert_buffer_offset_bytes;
Expand Down

0 comments on commit 48ad4cd

Please sign in to comment.