This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: [BZ #14576] Unused __rtld_lock_init_recursive macro
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 12 Sep 2012 20:39:19 -0700
- Subject: PATCH: [BZ #14576] Unused __rtld_lock_init_recursive macro
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
__rtld_lock_init_recursive was added by:
http://sourceware.org/git/?p=glibc.git;a=commit;h=d3c9f895257e50335e874ca08ad6efcc0abea6d7
But it was never used. This patch removes it. OK to install?
Thanks.
H.J.
---
2012-09-12 H.J. Lu <hongjiu.lu@intel.com>
[BZ #14576]
* bits/libc-lock.h (__rtld_lock_init_recursive): Removed.
* sysdeps/mach/bits/libc-lock.h (__rtld_lock_init_recursive):
Likewise.
* sysdeps/mach/hurd/bits/libc-lock.h (__rtld_lock_init_recursive):
Likewise.
nptl/
2012-09-12 H.J. Lu <hongjiu.lu@intel.com>
[BZ #14576]
* sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
Removed.
diff --git a/bits/libc-lock.h b/bits/libc-lock.h
index 6b215c5..d372722 100644
--- a/bits/libc-lock.h
+++ b/bits/libc-lock.h
@@ -49,7 +49,6 @@
/* Same as last but this time we initialize a recursive mutex. */
#define __libc_lock_init_recursive(NAME)
-#define __rtld_lock_init_recursive(NAME)
/* Finalize the named lock variable, which must be locked. It cannot be
used again until __libc_lock_init is called again on it. This must be
diff --git a/nptl/sysdeps/pthread/bits/libc-lockP.h b/nptl/sysdeps/pthread/bits/libc-lockP.h
index 7adaeb4..0e9268c 100644
--- a/nptl/sysdeps/pthread/bits/libc-lockP.h
+++ b/nptl/sysdeps/pthread/bits/libc-lockP.h
@@ -146,18 +146,6 @@ typedef pthread_key_t __libc_key_t;
__libc_maybe_call (__pthread_rwlock_init, (&(NAME), NULL), 0)
#endif
-#define __rtld_lock_init_recursive(NAME) \
- do { \
- if (__pthread_mutex_init != NULL) \
- { \
- pthread_mutexattr_t __attr; \
- __pthread_mutexattr_init (&__attr); \
- __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \
- __pthread_mutex_init (&(NAME).mutex, &__attr); \
- __pthread_mutexattr_destroy (&__attr); \
- } \
- } while (0)
-
/* Finalize the named lock variable, which must be locked. It cannot be
used again until __libc_lock_init is called again on it. This must be
called on a lock variable before the containing storage is reused. */
diff --git a/sysdeps/mach/bits/libc-lock.h b/sysdeps/mach/bits/libc-lock.h
index 110e25e..94877e0 100644
--- a/sysdeps/mach/bits/libc-lock.h
+++ b/sysdeps/mach/bits/libc-lock.h
@@ -137,7 +137,6 @@ void *__libc_getspecific (__libc_key_t key);
#define __libc_lock_lock_recursive __libc_lock_lock
#define __rtld_lock_define_initialized_recursive __libc_lock_define_initialized
-#define __rtld_lock_init_recursive __libc_lock_init
#define __rtld_lock_fini_recursive __libc_lock_fini
#define __rtld_lock_trylock_recursive __libc_lock_trylock
#define __rtld_lock_unlock_recursive __libc_lock_unlock
diff --git a/sysdeps/mach/hurd/bits/libc-lock.h b/sysdeps/mach/hurd/bits/libc-lock.h
index d18a10c..e8cb71b 100644
--- a/sysdeps/mach/hurd/bits/libc-lock.h
+++ b/sysdeps/mach/hurd/bits/libc-lock.h
@@ -119,8 +119,6 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
})
-#define __rtld_lock_init_recursive(NAME) \
- __libc_lock_init_recursive (NAME)
#define __rtld_lock_initialize(NAME) \
(void) ((NAME) = (__rtld_lock_recursive_t) _RTLD_LOCK_RECURSIVE_INITIALIZER)
#define __rtld_lock_trylock_recursive(NAME) \