(vhci) Removes unique_ptr<thread>
Bug: 77731993
Test: Build and boot oc
Change-Id: I5127b31e8b45c39b95dfc8685e5bbb2273aa619b
(cherry picked from commit b8afc419235a93708c74de51d95584a9ba091e49)
diff --git a/host/libs/usbip/vhci_instrument.cpp b/host/libs/usbip/vhci_instrument.cpp
index 179d6c5..10025fc 100644
--- a/host/libs/usbip/vhci_instrument.cpp
+++ b/host/libs/usbip/vhci_instrument.cpp
@@ -82,7 +82,7 @@
VHCIInstrument::~VHCIInstrument() {
control_write_end_->Write(&kControlExit, sizeof(kControlExit));
- attach_thread_->join();
+ attach_thread_.join();
}
bool VHCIInstrument::Init() {
@@ -110,7 +110,7 @@
return false;
}
- attach_thread_.reset(new std::thread([this]() { AttachThread(); }));
+ attach_thread_ = std::thread([this] { AttachThread(); });
return true;
}
diff --git a/host/libs/usbip/vhci_instrument.h b/host/libs/usbip/vhci_instrument.h
index ccb641e..3a4a7e3 100644
--- a/host/libs/usbip/vhci_instrument.h
+++ b/host/libs/usbip/vhci_instrument.h
@@ -58,7 +58,7 @@
private:
std::string name_;
- std::unique_ptr<std::thread> attach_thread_;
+ std::thread attach_thread_;
std::string syspath_;
cvd::SharedFD control_write_end_;
cvd::SharedFD control_read_end_;