Make thread TidCounter atomic (#4133)

This commit is contained in:
rosenkolev1 2026-03-18 09:40:37 +02:00 committed by GitHub
parent 6e843d0c4b
commit 9a3e7b097c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -242,7 +242,7 @@ int PS4_SYSV_ABI posix_pthread_create_name_np(PthreadT* thread, const PthreadAtt
new_thread->attr.sched_policy = curthread->attr.sched_policy;
}
static int TidCounter = 1;
static std::atomic<int> TidCounter = 1;
new_thread->tid = ++TidCounter;
if (new_thread->attr.stackaddr_attr == nullptr) {