Improve lock hierarchy

- NetBSD no longer needs a spin lock to create semaphores
- Windows fork() now locks process manager in correct order
This commit is contained in:
Justine Tunney 2024-07-24 15:55:57 -07:00
parent 7ba9a73840
commit d3a13e8d70
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
14 changed files with 73 additions and 71 deletions

View file

@ -473,9 +473,8 @@ textwindows int sys_fork_nt(uint32_t dwCreationFlags) {
// reset core runtime services
__proc_wipe();
WipeKeystrokes();
if (_weaken(__itimer_wipe)) {
if (_weaken(__itimer_wipe))
_weaken(__itimer_wipe)();
}
// notify pthread join
atomic_store_explicit(&_pthread_static.ptid, GetCurrentThreadId(),
memory_order_release);