[PATCH] m68: Enforce 4-byte alignment on internal locks (BZ #29537)

Adhemerval Zanella adhemerval.zanella@linaro.org
Tue Aug 30 13:35:04 GMT 2022


The HPPA also requires a 16-byte alignment for locks, although it is
just a historical artifact to keep compatibility with old
implementation.
---
 sysdeps/nptl/libc-lockP.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/nptl/libc-lockP.h b/sysdeps/nptl/libc-lockP.h
index d3a6837fd2..9efe962588 100644
--- a/sysdeps/nptl/libc-lockP.h
+++ b/sysdeps/nptl/libc-lockP.h
@@ -34,7 +34,7 @@
 #include <tls.h>
 
 /* Mutex type.  */
-typedef int __libc_lock_t;
+typedef int __libc_lock_t __LOCK_ALIGNMENT;
 typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t;
 typedef pthread_rwlock_t __libc_rwlock_t;
 
-- 
2.34.1



More information about the Libc-alpha mailing list