aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Polstra <jdp@FreeBSD.org>1999-12-28 04:38:17 +0000
committerJohn Polstra <jdp@FreeBSD.org>1999-12-28 04:38:17 +0000
commit3600eb76c6005988b386d04cfdb5963b38a18eee (patch)
tree87a46a42824ad2fcf6b934cf07a8d0e56a4a34b7 /include
parent427db879c9c39266493f3a7f772d0acc584547b4 (diff)
downloadsrc-3600eb76c6005988b386d04cfdb5963b38a18eee.tar.gz
src-3600eb76c6005988b386d04cfdb5963b38a18eee.zip
Work around an assert failure in the dynamic linker's default thread
locking functions. If an application loads a shared object with dlopen() and the shared object has an init function which requires lazy binding, then _rtld_bind is called when the thread is already inside the dynamic linker. This leads to a recursive acquisition of the lock, which I was not expecting -- hence the assert failure. This work-around makes the default locking functions handle recursive locking. It is NOT the correct fix -- that should be implemented at the generic locking level rather than in the default locking functions. I will implement the correct fix in a future commit. Since the dllockinit() interface will likely need to change, warn about that in both the man page and the header file.
Notes
Notes: svn path=/head/; revision=55165
Diffstat (limited to 'include')
-rw-r--r--include/dlfcn.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/dlfcn.h b/include/dlfcn.h
index 09edf2dde31b..16cc41754cef 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -66,6 +66,7 @@ __BEGIN_DECLS
int dladdr __P((const void *, Dl_info *));
int dlclose __P((void *));
const char *dlerror __P((void));
+/* XXX dllockinit() interface is likely to change. */
void dllockinit __P((void *_context,
void *(*_lock_create)(void *_context),
void (*_rlock_acquire)(void *_lock),