aboutsummaryrefslogtreecommitdiff
path: root/bits/stdio-lock.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-08-23 06:03:42 +0000
committerRoland McGrath <roland@gnu.org>2001-08-23 06:03:42 +0000
commitc12aa8015699d66a193c3c183b4f1d1a72bb92c1 (patch)
treea20c1864b74c8471aa7aaf675da180546b16c537 /bits/stdio-lock.h
parent8179dcc10808cf2a515cf19d445789193a763ec4 (diff)
downloadglibc-c12aa8015699d66a193c3c183b4f1d1a72bb92c1.zip
glibc-c12aa8015699d66a193c3c183b4f1d1a72bb92c1.tar.gz
glibc-c12aa8015699d66a193c3c183b4f1d1a72bb92c1.tar.bz2
* sysdeps/generic/ldsodefs.h (_dl_load_lock): Declare it here with
__libc_lock_define_recursive. * elf/dl-open.c: Don't declare it here any more. * elf/dl-close.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * elf/dl-lookup.c (add_dependency): Use __libc_lock_lock_recursive and __libc_lock_unlock_recursive. * elf/dl-close.c (_dl_close): Likewise * elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise * elf/dl-open.c (_dl_open): Likewise * sysdeps/generic/bits/libc-lock.h (__libc_lock_define_recursive): New macro. * sysdeps/generic/bits/stdio-lock.h (_IO_lock_t): Use it. (_IO_lock_lock): Use __libc_lock_lock_recursive. (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
Diffstat (limited to 'bits/stdio-lock.h')
-rw-r--r--bits/stdio-lock.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/bits/stdio-lock.h b/bits/stdio-lock.h
index 225ccd8..f7c6108 100644
--- a/bits/stdio-lock.h
+++ b/bits/stdio-lock.h
@@ -22,12 +22,17 @@
#include <bits/libc-lock.h>
-__libc_lock_define (typedef, _IO_lock_t)
+__libc_lock_define_recursive (typedef, _IO_lock_t)
/* We need recursive (counting) mutexes. */
#define _IO_lock_initializer ...
#error libio needs recursive mutexes for _IO_MTSAFE_IO
+#define _IO_lock_init(_name) __libc_lock_init_recursive (_name)
+#define _IO_lock_fini(_name) __libc_lock_fini_recursive (_name)
+#define _IO_lock_lock(_name) __libc_lock_lock_recursive (_name)
+#define _IO_lock_unlock(_name) __libc_lock_unlock_recursive (_name)
+
#define _IO_cleanup_region_start(_fct, _fp) \
__libc_cleanup_region_start (_fct, _fp)
@@ -35,14 +40,6 @@ __libc_lock_define (typedef, _IO_lock_t)
__libc_cleanup_region_start (_fct, NULL)
#define _IO_cleanup_region_end(_doit) \
__libc_cleanup_region_end (_doit)
-#define _IO_lock_init(_name) \
- __libc_lock_init_recursive (_name)
-#define _IO_lock_fini(_name) \
- __libc_lock_fini_recursive (_name)
-#define _IO_lock_lock(_name) \
- __libc_lock_lock (_name)
-#define _IO_lock_unlock(_name) \
- __libc_lock_unlock (_name)
#endif /* bits/stdio-lock.h */