Revert "Make spin locks go faster"

This reverts commit c8e25d811c.
This commit is contained in:
Justine Tunney 2024-07-25 22:24:32 -07:00
parent 0679cfeb41
commit 02e1cbcd00
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
16 changed files with 122 additions and 149 deletions

View file

@ -55,14 +55,9 @@ static void __stdio_fork_parent(void) {
static void __stdio_fork_child(void) {
FILE *f;
for (int i = __fflush.handles.i; i--;) {
pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
for (int i = __fflush.handles.i; i--;)
if ((f = __fflush.handles.p[i]))
pthread_mutex_init(&f->lock, &attr);
pthread_mutexattr_destroy(&attr);
}
f->lock = (pthread_mutex_t)PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
pthread_mutex_init(&__fflush_lock_obj, 0);
}