diff options
Diffstat (limited to 'sysdeps/generic/ldsodefs.h')
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index a98b01a6a7..6d196c7379 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -31,6 +31,7 @@ #include <dlfcn.h> #include <link.h> #include <dl-lookupcfg.h> +#include <bits/libc-lock.h> __BEGIN_DECLS @@ -229,6 +230,16 @@ extern struct r_search_path_elem *_dl_init_all_dirs; extern int _dl_sysdep_open_zero_fill (void); /* dl-sysdep.c */ +/* During the program run we must not modify the global data of + loaded shared object simultanously in two threads. Therefore we + protect `_dl_open' and `_dl_close' in dl-close.c. + + This must be a recursive lock since the initializer function of + the loaded object might as well require a call to this function. + At this time it is not anymore a problem to modify the tables. */ +__libc_lock_define_recursive (extern, _dl_load_lock) + + /* Write message on the debug file descriptor. The parameters are interpreted as for a `printf' call. All the lines start with a tag showing the PID. */ |