Skip to content

Commit

Permalink
Join NVML PCIe threads only if PCIe TX/RX is supported by GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
romner-set committed Jun 8, 2023
1 parent be10989 commit d8ebbe1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/linux/btop_collect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,13 @@ namespace Gpu {

// nvTimer.stop_rename_reset("Nv pcie thread join");
//? Join PCIE TX/RX threads
pcie_tx_thread.join(); pcie_rx_thread.join();
if constexpr(is_init) { // there doesn't seem to be a better way to do this, but this should be fine considering it's just 2 lines
pcie_tx_thread.join();
pcie_rx_thread.join();
} else if (gpus_slice[i].supported_functions.pcie_txrx) {
pcie_tx_thread.join();
pcie_rx_thread.join();
}
}

return true;
Expand Down

0 comments on commit d8ebbe1

Please sign in to comment.