From owner-cvs-all Sun Dec 26 20:44: 8 1999 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 271D614CF4; Sun, 26 Dec 1999 20:44:05 -0800 (PST) (envelope-from jdp@FreeBSD.org) Received: (from jdp@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id UAA01884; Sun, 26 Dec 1999 20:44:05 -0800 (PST) (envelope-from jdp@FreeBSD.org) Message-Id: <199912270444.UAA01884@freefall.freebsd.org> From: John Polstra Date: Sun, 26 Dec 1999 20:44:04 -0800 (PST) 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 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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