From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1118) id 5928D3858D33; Thu, 6 Jul 2023 15:48:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5928D3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1688658522; bh=lZcrKW/m6gcPj26MpQz4v8llXI4W4xQ6ssTG2awx38c=; h=From:To:Subject:Date:From; b=m8Ax0CSx0Hi8Irm+bdsymDAeGuXVuN4RFiHUCJ/Q0bHvsVc35xhcWwN7OYcJ/kCnX OFGz3ImSeNsJoZFvO84Lqr/jbxWybA2ZKk3k/G3P3W/piOIyTlg4XKb9e58kqn+6W+ yz7U8q+b+DiDoGbCxqARi/QrR/dyYu8BraRHn6XU= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: John David Anglin To: glibc-cvs@sourceware.org Subject: [glibc] Revert "hppa: Drop 16-byte pthread lock alignment" X-Act-Checkin: glibc X-Git-Author: John David Anglin X-Git-Refname: refs/heads/master X-Git-Oldrev: 2fb12bbd092b0c10f1f2083216e723d2406e21c4 X-Git-Newrev: 500054974667be3153ed760152ea0153df33c3d0 Message-Id: <20230706154842.5928D3858D33@sourceware.org> Date: Thu, 6 Jul 2023 15:48:42 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=500054974667be3153ed760152ea0153df33c3d0 commit 500054974667be3153ed760152ea0153df33c3d0 Author: John David Anglin Date: Thu Jul 6 15:47:50 2023 +0000 Revert "hppa: Drop 16-byte pthread lock alignment" This change reverts commits c4468cd3995b4236ea886901109b194641132b08 and ab991a3d1b401ded6bd4f027352da8262b021a11. Diff: --- sysdeps/hppa/nptl/bits/pthreadtypes-arch.h | 2 +- sysdeps/hppa/nptl/bits/struct_rwlock.h | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h b/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h index c1a46d66d0..999195c5b0 100644 --- a/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h +++ b/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h @@ -40,7 +40,7 @@ #define __SIZEOF_PTHREAD_RWLOCK_T 64 #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 -#define __LOCK_ALIGNMENT +#define __LOCK_ALIGNMENT __attribute__ ((__aligned__(16))) #define __ONCE_ALIGNMENT #endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/hppa/nptl/bits/struct_rwlock.h b/sysdeps/hppa/nptl/bits/struct_rwlock.h index f91460b7f8..e83b4aab52 100644 --- a/sysdeps/hppa/nptl/bits/struct_rwlock.h +++ b/sysdeps/hppa/nptl/bits/struct_rwlock.h @@ -25,14 +25,8 @@ struct __pthread_rwlock_arch_t /* In the old Linuxthreads pthread_rwlock_t, this is the start of the 4-word 16-byte aligned lock structure. The next four words are all set to 1 by the Linuxthreads - PTHREAD_RWLOCK_INITIALIZER. We ignore them in NPTL. - - The 16-byte aligned lock structure is not needed for NPTL. - It causes some package builds to fail (e.g., protobuf) and - issues with dynamic memory allocation in C++ versions prior - to C++17. Removing it allows for more efficient allocators - and better compatibility with other architectures. */ - int __compat_padding[4]; + PTHREAD_RWLOCK_INITIALIZER. We ignore them in NPTL. */ + int __compat_padding[4] __attribute__ ((__aligned__(16))); unsigned int __readers; unsigned int __writers; unsigned int __wrphase_futex;