test(libkernel): check the Linux host thread handle in pthread start coverage

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Adrià Franch 2026-10-10 08:57:08 +02:00
parent faf983ae01
commit f455b42084
1 changed files with 1 additions and 2 deletions

View File

@ -41,8 +41,7 @@ static void* APS5_VABI CheckThread(void* arg) {
if (context.thread->threadId != std::this_thread::get_id() || !context.thread->nativeHandle)
throw std::runtime_error("Native thread was not initialized");
#else
if (context.thread->_thr.get_id() != std::this_thread::get_id()) throw std::runtime_error("Thread object was not initialized");
if (!context.thread->_thr.joinable()) throw std::runtime_error("Thread object is not joinable");
if (!pthread_equal(context.thread->hostThread, pthread_self())) throw std::runtime_error("Thread object was not initialized");
#endif
PthreadAttr attr = nullptr;
if (scePthreadAttrInit(&attr) != 0) throw std::runtime_error("Attribute initialization failed");