mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-19 05:33:02 +00:00
Merge branch 'no-sleep' into next
This commit is contained in:
commit
13322e4373
@ -26,8 +26,6 @@
|
|||||||
#include <gnuradio/io_signature.h> // for io_signature
|
#include <gnuradio/io_signature.h> // for io_signature
|
||||||
#include <algorithm> // for min
|
#include <algorithm> // for min
|
||||||
#include <cstring> // for memcpy
|
#include <cstring> // for memcpy
|
||||||
#include <unistd.h> // for usleep
|
|
||||||
#include <utility>
|
|
||||||
|
|
||||||
Gnss_Sdr_Valve::Gnss_Sdr_Valve(size_t sizeof_stream_item,
|
Gnss_Sdr_Valve::Gnss_Sdr_Valve(size_t sizeof_stream_item,
|
||||||
uint64_t nitems,
|
uint64_t nitems,
|
||||||
@ -93,7 +91,6 @@ int Gnss_Sdr_Valve::work(int noutput_items,
|
|||||||
{
|
{
|
||||||
return -1; // Done!
|
return -1; // Done!
|
||||||
}
|
}
|
||||||
usleep(1000000);
|
|
||||||
return 0; // do not produce or consume
|
return 0; // do not produce or consume
|
||||||
}
|
}
|
||||||
uint64_t n = std::min(d_nitems - d_ncopied_items, static_cast<uint64_t>(noutput_items));
|
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
|
// multichannel support
|
||||||
for (size_t ch = 0; ch < output_items.size(); ch++)
|
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;
|
d_ncopied_items += n;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
for (size_t ch = 0; ch < output_items.size(); ch++)
|
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;
|
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));
|
fpga_helper_thread_.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(1000));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
||||||
// Terminate keyboard thread
|
// Terminate keyboard thread
|
||||||
pthread_t id = keyboard_thread_.native_handle();
|
pthread_t id = keyboard_thread_.native_handle();
|
||||||
keyboard_thread_.detach();
|
keyboard_thread_.detach();
|
||||||
|
Loading…
Reference in New Issue
Block a user