Skip to content

Commit

Permalink
Merge pull request #100 from DUNE-DAQ/thea/sleep_opt
Browse files Browse the repository at this point in the history
Skipping nanosleep when sleep time set to 0
  • Loading branch information
roland-sipos authored Nov 7, 2023
2 parents 8756f22 + 148f108 commit d44409e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/detail/IfaceWrapper.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ IfaceWrapper::rx_runner(void *arg __rte_unused) {

// If no full buffers in burst...
if (!fb_count) {
// Sleep n nanoseconds... (value from config, timespec initialized in lcore first lines)
/*int response =*/ nanosleep(&sleep_request, nullptr);
if (m_lcore_sleep_ns) {
// Sleep n nanoseconds... (value from config, timespec initialized in lcore first lines)
/*int response =*/ nanosleep(&sleep_request, nullptr);
}
}

} // main while(quit) loop
Expand Down

0 comments on commit d44409e

Please sign in to comment.