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

This reverts commit 4b03017e8a.

Reason for revert: This blocks multithreaded callbacks

Change-Id: I9944417e4fb63c9eea2b286c828c7dfa621c4fe8
Cette révision appartient à :
Saleel Kudchadker
2024-10-02 13:42:39 -04:00
Parent d29ebea7ac
révision d3d0ca5fc6
+3 -5
Voir le fichier
@@ -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;
}