summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/rtld.h
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1999-12-27 04:44:04 +0000
committerjdp <jdp@FreeBSD.org>1999-12-27 04:44:04 +0000
commit52ec4df9e85a6ae74cd9f5cf905ae35c0c1a6670 (patch)
treee4e05bba4c3de19150902d099920062a8bdb21ab /libexec/rtld-elf/rtld.h
parentefacb21bbc4c5e4ae5ef661233ee6249ee8a0e7f (diff)
downloadFreeBSD-src-52ec4df9e85a6ae74cd9f5cf905ae35c0c1a6670.zip
FreeBSD-src-52ec4df9e85a6ae74cd9f5cf905ae35c0c1a6670.tar.gz
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.
Diffstat (limited to 'libexec/rtld-elf/rtld.h')
-rw-r--r--libexec/rtld-elf/rtld.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h
index c63e7d0..b8fcf2c 100644
--- a/libexec/rtld-elf/rtld.h
+++ b/libexec/rtld-elf/rtld.h
@@ -157,6 +157,10 @@ unsigned long elf_hash(const char *);
const Elf_Sym *find_symdef(unsigned long, Obj_Entry *, const Obj_Entry **,
bool);
void init_pltgot(Obj_Entry *);
+void lockdflt_acquire(void *);
+void *lockdflt_create(void *);
+void lockdflt_destroy(void *);
+void lockdflt_release(void *);
void obj_free(Obj_Entry *);
Obj_Entry *obj_new(void);
int reloc_non_plt(Obj_Entry *, Obj_Entry *);
OpenPOWER on IntegriCloud