mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Remove sleeps
This commit is contained in:
parent
87989ead0a
commit
afa16c6769
@ -26,8 +26,6 @@
|
||||
#include <gnuradio/io_signature.h> // for io_signature
|
||||
#include <algorithm> // for min
|
||||
#include <cstring> // for memcpy
|
||||
#include <unistd.h> // for usleep
|
||||
#include <utility>
|
||||
|
||||
Gnss_Sdr_Valve::Gnss_Sdr_Valve(size_t sizeof_stream_item,
|
||||
uint64_t nitems,
|
||||
@ -93,7 +91,6 @@ int Gnss_Sdr_Valve::work(int noutput_items,
|
||||
{
|
||||
return -1; // Done!
|
||||
}
|
||||
usleep(1000000);
|
||||
return 0; // do not produce or consume
|
||||
}
|
||||
uint64_t n = std::min(d_nitems - d_ncopied_items, static_cast<uint64_t>(noutput_items));
|
||||
@ -104,14 +101,14 @@ int Gnss_Sdr_Valve::work(int noutput_items,
|
||||
// multichannel support
|
||||
for (size_t ch = 0; ch < output_items.size(); ch++)
|
||||
{
|
||||
memcpy(output_items[ch], input_items[ch], n * input_signature()->sizeof_stream_item(ch));
|
||||
std::memcpy(output_items[ch], input_items[ch], n * input_signature()->sizeof_stream_item(ch));
|
||||
}
|
||||
d_ncopied_items += n;
|
||||
return n;
|
||||
}
|
||||
for (size_t ch = 0; ch < output_items.size(); ch++)
|
||||
{
|
||||
memcpy(output_items[ch], input_items[ch], noutput_items * input_signature()->sizeof_stream_item(ch));
|
||||
std::memcpy(output_items[ch], input_items[ch], noutput_items * input_signature()->sizeof_stream_item(ch));
|
||||
}
|
||||
return noutput_items;
|
||||
}
|
||||
|
@ -357,7 +357,6 @@ int ControlThread::run()
|
||||
fpga_helper_thread_.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(1000));
|
||||
#endif
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
// Terminate keyboard thread
|
||||
pthread_t id = keyboard_thread_.native_handle();
|
||||
keyboard_thread_.detach();
|
||||
|
Loading…
Reference in New Issue
Block a user