mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
* 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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user