Improve multithreading

This commit is contained in:
Justine Tunney 2024-07-21 06:41:30 -07:00
parent d3167126aa
commit 30afd6ddbb
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
38 changed files with 752 additions and 174 deletions

View file

@ -40,10 +40,8 @@ static errno_t pthread_detach_impl(struct PosixThread *pt) {
if (atomic_compare_exchange_weak_explicit(&pt->pt_status, &status,
transition, memory_order_release,
memory_order_relaxed)) {
if (transition == kPosixThreadZombie) {
if (transition == kPosixThreadZombie)
_pthread_zombify(pt);
}
_pthread_decimate();
return 0;
}
}