freebsd-nq/lib/libc/stdio
Brian Feldman 4524204190 Fix the problems I (and others, undoubtedly) have been having for a
while with threaded software in -CURRENT acting very "weird".  It has
seemed, for example, in Mozilla that threads attempting to do host
lookups have been locking up.  That's exactly the case.

There was a race condition in the implementation of the initialization
of the mutex used to protect FILE operations, first of all: multiple
instances of FLOCKFILE() in libc could occur on the same FILE at
the same time and cause strange behavior by overwriting eachothers'
creation of the mutex and the rest of the file lock.

Secondly, it's not appropriate to test the "validity" of the file
descriptor referenced by the FILE; if the code is calling FLOCKFILE()
or FUNLOCKFILE(), it wants the FILE to be locked or unlocked, not
to be locked or unlocked on the condition that _file is >= 0.  This
also could quite easily cause leaks by failing to perform the lock or
unlock operation when it actually is needed.

Mozilla now works again on -CURRENT when linked to libc_r.so.5 and
libc.so.5.
2001-02-23 04:59:12 +00:00
..
_flock_stub.c Fix the problems I (and others, undoubtedly) have been having for a 2001-02-23 04:59:12 +00:00
asprintf.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
clrerr.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fclose.3
fclose.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
fdopen.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
feof.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
ferror.3
ferror.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
fflush.3
fflush.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
fgetc.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
fgetln.3
fgetln.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
fgetpos.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
fgets.3
fgets.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fileno.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
findfp.c Place some hooks (__stdin, __stdout, __stderr) into libc for a future 2001-02-20 01:56:52 +00:00
flags.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
floatio.h
fopen.3
fopen.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
fprintf.c
fpurge.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fputc.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fputs.3
fputs.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fread.3
fread.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
freopen.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
fscanf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fseek.3
fseek.c Fix the current libc breakage in current: 2001-02-16 06:11:22 +00:00
fsetpos.c
ftell.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
funopen.3
funopen.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fvwrite.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
fvwrite.h
fwalk.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
fwrite.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getc.3
getc.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
getchar.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
gets.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
getw.c
glue.h
local.h Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
makebuf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
Makefile.inc
mktemp.3
mktemp.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
perror.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
printf.3 mdoc(7) police: mark LC_NUMERIC with .Dv. 2001-02-10 10:26:52 +00:00
printf.c
putc.3
putc.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
putchar.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
puts.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
putw.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
refill.c Fix the current libc breakage in current: 2001-02-16 06:11:22 +00:00
remove.3
remove.c
rewind.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
rget.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
scanf.3 mdoc(7) police: mark LC_NUMERIC with .Dv. 2001-02-10 10:26:52 +00:00
scanf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
setbuf.3
setbuf.c
setbuffer.c
setvbuf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
snprintf.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
sprintf.c libc MT-safety, part 2. 2001-02-11 22:06:43 +00:00
sscanf.c
stdio.3 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
stdio.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
tempnam.c
tmpfile.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
tmpnam.3
tmpnam.c
ungetc.3
ungetc.c Fix the current libc breakage in current: 2001-02-16 06:11:22 +00:00
vasprintf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
vfprintf.c Remove freelists managed by Balloc/Bfree. 2001-02-15 22:12:50 +00:00
vfscanf.c Use decimal point from localeconv() instead of hardcoded '.' (SUSv2) 2001-02-10 05:46:05 +00:00
vprintf.c
vscanf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
vsnprintf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
vsprintf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
vsscanf.c
wbuf.c Remove _THREAD_SAFE and make libc thread-safe by default by 2001-01-24 13:01:12 +00:00
wsetup.c