Date: Sun, 26 Dec 1999 20:44:04 -0800 (PST) From: John Polstra <jdp@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/include dlfcn.h src/lib/libc/gen dllockinit.3 Makefile.inc dlfcn.c src/libexec/rtld-elf lockdflt.c Makefile debug.h rtld.c rtld.h src/libexec/rtld-elf/alpha reloc.c src/libexec/rtld-elf/i386 reloc.c Message-ID: <199912270444.UAA01884@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
jdp 1999/12/26 20:44:04 PST
Modified files:
include dlfcn.h
lib/libc/gen Makefile.inc dlfcn.c
libexec/rtld-elf Makefile debug.h rtld.c rtld.h
libexec/rtld-elf/alpha reloc.c
libexec/rtld-elf/i386 reloc.c
Added files:
lib/libc/gen dllockinit.3
libexec/rtld-elf lockdflt.c
Log:
Add a new function dllockinit() for registering thread locking
functions to be used by the dynamic linker. This can be called by
threads packages at start-up time. I will add the call to libc_r
soon.
Also add a default locking method that is used up until dllockinit()
is called. The default method works by blocking SIGVTALRM, SIGPROF,
and SIGALRM in critical sections. It is based on the observation
that most user-space threads packages implement thread preemption
with one of these signals (usually SIGVTALRM).
The dynamic linker has never been reentrant, but it became less
reentrant in revision 1.34 of "src/libexec/rtld-elf/rtld.c".
Starting with that revision, multiple threads each doing lazy
binding could interfere with each other. The usual symptom was
that a symbol was falsely reported as undefined at start-up time.
It was rare but not unseen. This commit fixes it.
Revision Changes Path
1.7 +8 -1 src/include/dlfcn.h
1.57 +2 -2 src/lib/libc/gen/Makefile.inc
1.6 +15 -1 src/lib/libc/gen/dlfcn.c
1.9 +3 -3 src/libexec/rtld-elf/Makefile
1.4 +10 -1 src/libexec/rtld-elf/debug.h
1.40 +119 -17 src/libexec/rtld-elf/rtld.c
1.13 +5 -1 src/libexec/rtld-elf/rtld.h
1.9 +1 -10 src/libexec/rtld-elf/alpha/reloc.c
1.5 +1 -10 src/libexec/rtld-elf/i386/reloc.c
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912270444.UAA01884>
