Message ID | 20230212111044.610942-13-bugaevc@gmail.com |
---|---|
State | Rejected, archived |
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 91997382E69E for <patchwork@sourceware.org>; Sun, 12 Feb 2023 11:12:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 91997382E69E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676200343; bh=2Dl1TKP+S/3nKll7aODuMT1g6QUnU4gsO4DIikPN5bU=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=fCr95evTbV2lwxa0y46pVBbqaciLPwJ4EfgUeC6pyNmxsBL/mBhI7k9780xmzCQSC ysChXW5tXUJOmaJkPdcW+WxV2i7fikWOjKBDP/lxUFntc7BhuEojGrpfIXxKJ1GMWG 9SH05PzkpDoDrurSpNFtXORCyL/xoMzseqg9+J2o= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by sourceware.org (Postfix) with ESMTPS id 224FC3858017 for <libc-alpha@sourceware.org>; Sun, 12 Feb 2023 11:11:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 224FC3858017 Received: by mail-ed1-x52e.google.com with SMTP id s11so1693660edd.10 for <libc-alpha@sourceware.org>; Sun, 12 Feb 2023 03:11:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2Dl1TKP+S/3nKll7aODuMT1g6QUnU4gsO4DIikPN5bU=; b=PzR+q3Z1wCCwMlijqLzxHKjV6gGzQP2q+1/vkQGCbDyUPS/BYORTv0JNYsZmoPlfMB JU0GCFTa6Z+ml4SBB5CreX4RpUoblKdh2r+X8I23iCon6l0Hd07mYJNkMddJt+WUCP1r rEw7W6VfkGZD+T5A179Np1cfS6qMIIyAa3tftbpd/3CQv6h1goDdXFrpjd1O7cldikgO rvAm9a8MdTD2aCcBlKHswIKaylib06LDGVnz10WmoDMzJqCSoeCcjE2KEm5La4sxYi2u UUnj0/bn2kH56+xobuCQn+advWVNt4LM5HPRUAa1cQycSaCXWryVT3lX+jNI4itOIiM6 Sftg== X-Gm-Message-State: AO0yUKWqxmQUMiS5RrQ++/eUXnafYF/xo4ig6VnRYoEGcfXbY+DtprgT 53IgS5vQJY1BjiCgOnW9SkU+bONU0bMl8w== X-Google-Smtp-Source: AK7set8RFkJvMJ3pCKdoNiEWxuxONr1KksdRFqdD76y4GGMyh0xLkYkvfMbphIn2eVTKWZ8bEFMSxg== X-Received: by 2002:a50:9f21:0:b0:4ac:b559:4730 with SMTP id b30-20020a509f21000000b004acb5594730mr5258604edf.25.1676200285815; Sun, 12 Feb 2023 03:11:25 -0800 (PST) Received: from surface-pro-6.. ([2a00:1370:818c:4a57:2186:c463:9ced:e6fe]) by smtp.gmail.com with ESMTPSA id c61-20020a509fc3000000b004acbe0b36d2sm1266910edf.6.2023.02.12.03.11.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 03:11:25 -0800 (PST) To: bug-hurd@gnu.org, libc-alpha@sourceware.org Cc: =?utf-8?q?Fl=C3=A1vio_Cruz?= <flaviocruz@gmail.com>, Sergey Bugaev <bugaevc@gmail.com> Subject: [RFC PATCH glibc 12/12] C11 thrd: Downgrade the default alignment of mtx_t Date: Sun, 12 Feb 2023 14:10:43 +0300 Message-Id: <20230212111044.610942-13-bugaevc@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230212111044.610942-1-bugaevc@gmail.com> References: <20230212111044.610942-1-bugaevc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Sergey Bugaev via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Sergey Bugaev <bugaevc@gmail.com> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Towards glibc on x86_64-gnu
|
|
Checks
Context | Check | Description |
---|---|---|
dj/TryBot-apply_patch | success | Patch applied to master at the time it was sent |
dj/TryBot-32bit | fail | Patch series failed to apply |
Commit Message
Sergey Bugaev
Feb. 12, 2023, 11:10 a.m. UTC
..so that it can match the alignment of pthread_mutex_t on x86_64-gnu.
This likely breaks many other arches (if not all of them), though.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
sysdeps/pthread/threads.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Sergey Bugaev, le dim. 12 févr. 2023 14:10:43 +0300, a ecrit: > ..so that it can match the alignment of pthread_mutex_t on x86_64-gnu. I'd say rather make pthread_mutex_t aligned on long int, so we can possibly in the future put some pointers in it without breaking the ABI. > This likely breaks many other arches (if not all of them), though. > > Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> > --- > sysdeps/pthread/threads.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sysdeps/pthread/threads.h b/sysdeps/pthread/threads.h > index 860d597d..207c1dee 100644 > --- a/sysdeps/pthread/threads.h > +++ b/sysdeps/pthread/threads.h > @@ -64,7 +64,7 @@ typedef __once_flag once_flag; > typedef union > { > char __size[__SIZEOF_PTHREAD_MUTEX_T]; > - long int __align __LOCK_ALIGNMENT; > + int __align __LOCK_ALIGNMENT; > } mtx_t; > > typedef union > -- > 2.39.1
On Sun, Feb 12, 2023 at 6:18 PM Samuel Thibault <samuel.thibault@gnu.org> wrote: > I'd say rather make pthread_mutex_t aligned on long int, so we can > possibly in the future put some pointers in it without breaking the ABI. I honestly have 0 idea how it is not 8-aligned right now (nor how its size is 32 and not like 56), given that this is its definition... no, strike that, I see that there are *two* versions of struct___pthread_mutex.h, one in sysdeps/mach/hurd/htl/bits and the other one in sysdeps/htl/bits/types, and the former one wins. The latter one seems unused then, its only point was to confuse the hell out of me. Sergey
Sergey Bugaev, le dim. 12 févr. 2023 18:52:37 +0300, a ecrit: > On Sun, Feb 12, 2023 at 6:18 PM Samuel Thibault <samuel.thibault@gnu.org> wrote: > > I'd say rather make pthread_mutex_t aligned on long int, so we can > > possibly in the future put some pointers in it without breaking the ABI. > > I honestly have 0 idea how it is not 8-aligned right now (nor how its > size is 32 and not like 56), given that this is its definition... > > no, strike that, I see that there are *two* versions of > struct___pthread_mutex.h, one in sysdeps/mach/hurd/htl/bits and the > other one in sysdeps/htl/bits/types, and the former one wins. The > latter one seems unused then, its only point was to confuse the hell > out of me. History is full of remnants. That's why one just has to take the time to clean things up and avoid leaving things behind oneself. It seems the a99155555c21 cleanup missed this one. Samuel
diff --git a/sysdeps/pthread/threads.h b/sysdeps/pthread/threads.h index 860d597d..207c1dee 100644 --- a/sysdeps/pthread/threads.h +++ b/sysdeps/pthread/threads.h @@ -64,7 +64,7 @@ typedef __once_flag once_flag; typedef union { char __size[__SIZEOF_PTHREAD_MUTEX_T]; - long int __align __LOCK_ALIGNMENT; + int __align __LOCK_ALIGNMENT; } mtx_t; typedef union