mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-27 15:52:28 +00:00
Make spinlocks faster (take two)
This change is green on x86 and arm test fleet.
This commit is contained in:
parent
02e1cbcd00
commit
59692b0882
14 changed files with 122 additions and 79 deletions
|
@ -81,7 +81,6 @@ static void _onfork_child(void) {
|
|||
_rand64_lock_obj = (pthread_mutex_t)PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
|
||||
_pthread_lock_obj = (pthread_mutex_t)PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
|
||||
atomic_store_explicit(&__maps.lock, 0, memory_order_relaxed);
|
||||
atomic_store_explicit(&__get_tls()->tib_relock_maps, 0, memory_order_relaxed);
|
||||
if (_weaken(_pthread_onfork_child))
|
||||
_weaken(_pthread_onfork_child)();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue