Upgrade to 2022-era LLVM LIBCXX

This commit is contained in:
Justine Tunney 2024-05-27 02:12:27 -07:00
parent 2f4ca71f26
commit 8e68384e15
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
2078 changed files with 165657 additions and 65010 deletions

View file

@ -75,14 +75,13 @@ void _pthread_free(struct PosixThread *pt, bool isfork) {
unassert(!munmap(pt->pt_attr.__stackaddr, pt->pt_attr.__stacksize));
}
if (!isfork) {
if (IsWindows()) {
if (pt->tib->tib_syshand) {
unassert(CloseHandle(pt->tib->tib_syshand));
}
} else if (IsXnuSilicon()) {
if (pt->tib->tib_syshand) {
__syslib->__pthread_join(pt->tib->tib_syshand, 0);
}
uint64_t syshand =
atomic_load_explicit(&pt->tib->tib_syshand, memory_order_acquire);
if (syshand) {
if (IsWindows())
unassert(CloseHandle(syshand));
else if (IsXnuSilicon())
__syslib->__pthread_join(syshand, 0);
}
}
free(pt->pt_tls);