SWDEV-498816 - Detached thread might exit and pthread_t is invalid access to check if it is valid or not.

Hence, It is not required to check it if thread is already finished processing packets.

Change-Id: If1b43a169a06203f3e1ab0529cf592879496d7c4


[ROCm/clr commit: 3f3f3d0f1c]
This commit is contained in:
Jaydeep Patel
2024-11-19 05:02:21 +00:00
committed by Jaydeepkumar Patel
parent a22553fb33
commit 177ef6b6f8
+1 -1
View File
@@ -334,7 +334,7 @@ void HostcallListener::consumePackets() {
}
void HostcallListener::terminate() {
if (!amd::Os::isThreadAlive(thread_)) {
if (thread_.state() < Thread::FINISHED && !amd::Os::isThreadAlive(thread_)) {
return;
}
kHostThreadActive.state = Init::State::kExit;