[PATCH RESEND 1/3] mach: remove unused rtld_lock macros

Caleb Sander Mateos csander@purestorage.com
Tue Sep 23 19:27:02 GMT 2025


The __rtld_lock_fini_recursive and __rtld_lock_trylock_recursive macros
defined in sysdeps/mach/libc-lock.h have no users and aren't defined in
sysdeps/generic/libc-lock.h or sysdeps/nptl/libc-lockP.h. Remove the
unused macros to make the rtld_lock interface more consistent.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
---
 sysdeps/mach/libc-lock.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sysdeps/mach/libc-lock.h b/sysdeps/mach/libc-lock.h
index 41fd1c6b85..fd590f1551 100644
--- a/sysdeps/mach/libc-lock.h
+++ b/sysdeps/mach/libc-lock.h
@@ -64,11 +64,10 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
 /* 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.  */
 #define __libc_lock_fini             __libc_lock_unlock
 #define __libc_lock_fini_recursive   __libc_lock_unlock_recursive
-#define __rtld_lock_fini_recursive   __rtld_lock_unlock_recursive
 
 /* Lock the named lock variable.  */
 #define __libc_lock_lock(NAME)   \
   ({ lll_lock ((NAME), LLL_PRIVATE); 0; })
 
@@ -136,12 +135,10 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
    })
 
 
 #define __rtld_lock_initialize(NAME) \
   (void) ((NAME) = (__rtld_lock_recursive_t) _RTLD_LOCK_RECURSIVE_INITIALIZER)
-#define __rtld_lock_trylock_recursive(NAME) \
-  __libc_lock_trylock_recursive (NAME)
 #define __rtld_lock_lock_recursive(NAME) \
   __libc_lock_lock_recursive(NAME)
 #define __rtld_lock_unlock_recursive(NAME) \
   __libc_lock_unlock_recursive (NAME)
 
-- 
2.43.0



More information about the Libc-alpha mailing list