diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-09-16 05:54:09 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-09-16 05:54:09 +0000 |
commit | e07bb02a4f9e7d98f79f428a661c5b982286869d (patch) | |
tree | 7ced4d56fa4f3822b7ac24e4216a660585ddf7f7 /elf/dl-iteratephdr.c | |
parent | 005f8d92720387e74ab5decd8407c2c50a6e454e (diff) | |
download | glibc-e07bb02a4f9e7d98f79f428a661c5b982286869d.tar.gz glibc-e07bb02a4f9e7d98f79f428a661c5b982286869d.tar.xz glibc-e07bb02a4f9e7d98f79f428a661c5b982286869d.zip |
Update.
2003-09-15 Jakub Jelinek <jakub@redhat.com> * argp/argp.h (argp_parse, __argp_parse): Remove __THROW. * argp/Makefile (CFLAGS-argp-help.c, CFLAGS-argp-parse.c): Add $(uses-callbacks). * dirent/Makefile (CFLAGS-scandir.c, CFLAGS-scandir64.c): Likewise. * elf/Makefile (CFLAGS-dl-iterate-phdr.c, CFLAGS-dl-iterate-phdr-static.c): Add $(uses-callbacks). * elf/dl-iteratephdr.c (cancel_handler): New function. (__dl_iterate_phdr): Add __libc_cleanup_{push,pop}. * elf/link.h (dl_iterate_phdr): Remove __THROW. * io/Makefile (CFLAGS-fts.c): Merge into one assignment. Add $(uses-callbacks). (CFLAGS-ftw.c, CFLAGS-ftw64.c): Add $(uses-callbacks). * misc/Makefile (CFLAGS-tsearch.c, CFLAGS-lsearch.c): Change $(exceptions) to $(uses-callbacks). * Makeconfig (uses-callbacks): Set to $(exceptions). * posix/Makefile (CFLAGS-glob.c, CFLAGS-glob64.c): Add $(uses-callbacks). * stdlib/Makefile (CFLAGS-bsearch.c, CFLAGS-msort.c, CFLAGS-qsort.c): Likewise.
Diffstat (limited to 'elf/dl-iteratephdr.c')
-rw-r--r-- | elf/dl-iteratephdr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/elf/dl-iteratephdr.c b/elf/dl-iteratephdr.c index dccaf0aff8..d4feb690c3 100644 --- a/elf/dl-iteratephdr.c +++ b/elf/dl-iteratephdr.c @@ -23,6 +23,12 @@ #include <stddef.h> #include <bits/libc-lock.h> +static void +cancel_handler (void *arg __attribute__((unused))) +{ + __rtld_lock_unlock_recursive (GL(dl_load_lock)); +} + int __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data) @@ -33,6 +39,7 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, /* Make sure we are alone. */ __rtld_lock_lock_recursive (GL(dl_load_lock)); + __libc_cleanup_push (cancel_handler, 0); for (l = GL(dl_loaded); l != NULL; l = l->l_next) { @@ -46,6 +53,7 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, } /* Release the lock. */ + __libc_cleanup_pop (0); __rtld_lock_unlock_recursive (GL(dl_load_lock)); return ret; |