CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2025/08/03 19:44:33
Modified files:
lib/libc/hidden: _stdio.h stdio.h
lib/libc/include: thread_private.h
lib/libc/stdio : fclose.c fdclose.c fileext.h findfp.c
flockfile.c local.h
lib/libc/thread: Makefile.inc callbacks.c
Log message:
replace the flockfile backend with a per FILE recursive mutex.
the flockfile implementation in thread/rthread_file.c used an
external lock, and associated it with the relevant FILE * as needed.
this isn't great for a lot of reasons, complexity being the big
one, but the straw that broke the camels back is that it uses a
single spinlock to coordinate all of this, which in turn generates
a lot of sched_yield syscalls.
this avoids all the code complexity and the spinlock by just embedding
a small __rctmx in every FILE.
tested by and ok tb@ jca@
ok claudio@