From d8ebbe1181346234edce4dfa030c3b63ab025942 Mon Sep 17 00:00:00 2001 From: romner Date: Thu, 8 Jun 2023 20:24:01 +0200 Subject: [PATCH] Join NVML PCIe threads only if PCIe TX/RX is supported by GPU --- src/linux/btop_collect.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index 14b7a1a..754414d 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -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;