aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-close.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-close.c')
-rw-r--r--elf/dl-close.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 3d24892..66c88b2 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -32,11 +32,6 @@
typedef void (*fini_t) (void);
-/* During the program run we must not modify the global data of
- loaded shared object simultanously in two threads. Therefore we
- protect `dlopen' and `dlclose' in dlclose.c. */
-__libc_lock_define (extern, _dl_load_lock)
-
void
internal_function
_dl_close (void *_map)
@@ -61,7 +56,7 @@ _dl_close (void *_map)
_dl_signal_error (0, map->l_name, N_("shared object not open"));
/* Acquire the lock. */
- __libc_lock_lock (_dl_load_lock);
+ __libc_lock_lock_recursive (_dl_load_lock);
/* Decrement the reference count. */
if (map->l_opencount > 1 || map->l_type != lt_loaded)
@@ -80,7 +75,7 @@ _dl_close (void *_map)
/* One decrement the object itself, not the dependencies. */
--map->l_opencount;
- __libc_lock_unlock (_dl_load_lock);
+ __libc_lock_unlock_recursive (_dl_load_lock);
return;
}
@@ -277,7 +272,7 @@ _dl_close (void *_map)
free (list);
/* Release the lock. */
- __libc_lock_unlock (_dl_load_lock);
+ __libc_lock_unlock_recursive (_dl_load_lock);
}