SWDEV-478065 - Revert "SWDEV-478065 - Embed host thread in shared_ptr"

This reverts commit 274fd2628f.

Reason for revert: This blocks multithreaded callbacks

Change-Id: I9944417e4fb63c9eea2b286c828c7dfa621c4fe8


[ROCm/clr commit: d3d0ca5fc6]
Bu işleme şunda yer alıyor:
Saleel Kudchadker
2024-10-02 13:42:39 -04:00
ebeveyn 169423798f
işleme 375ed9d848
+3 -5
Dosyayı Görüntüle
@@ -186,11 +186,9 @@ void Timestamp::checkGpuTime() {
bool HsaAmdSignalHandler(hsa_signal_value_t value, void* arg) {
Timestamp* ts = reinterpret_cast<Timestamp*>(arg);
static std::shared_ptr<amd::Thread> thread;
if (amd::Thread::current() == nullptr) {
thread = std::make_shared<amd::HostThread>();
}
if (thread.get() != amd::Thread::current()) {
amd::Thread* thread = amd::Thread::current();
if (!(thread != nullptr ||
((thread = new amd::HostThread()) != nullptr && thread == amd::Thread::current()))) {
return false;
}