From patchwork Fri Dec 29 14:58:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 122935 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4784452qgn; Fri, 29 Dec 2017 06:59:05 -0800 (PST) X-Google-Smtp-Source: ACJfBos8u127zSfOKu/ad4DG4H1TKlMR969BfEzYsfZvilJdnIcVI18de2qXfgPOyaUvKTayFrWV X-Received: by 10.159.252.133 with SMTP id bb5mr35192787plb.287.1514559545666; Fri, 29 Dec 2017 06:59:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514559545; cv=none; d=google.com; s=arc-20160816; b=lYtV9Vt+s7CxOe87ED8h98FxdpfSaChQzxO3wAKfYMB5qTYrqXL3/ftD/rW9JTuqvg 274gQGVe/VBeadeF9u1W8K1c6IJX3xFriS9ZxzVLucaEj3sGeASnQc3+o/3VB+4SgcrE 6sbtpDNex8DMJZc0NLRPaeaC9Y2prXBeXjP1odHgykLoJ5dH4Gh4j8nT4xXWOwVucwst 85bEt0ZCF1qBh8/2akRrKj+79juXHI1EnlG7bFKKlVIHT/RshDdjWyEwLB/0jtmHmUXw 6ufAi2CwdSGf266qyFDgaOwHJp2ekfIFYZUiOaErI0LMCPjmMgcbJI7UL1LC3k3ecWPz 1zKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from:delivered-to :sender:list-help:list-post:list-archive:list-subscribe :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=e9Ty2lrk7/rXMM+qrrUjwhaNmL1wv5h+4Ss1Y2IgZgQ=; b=BHgQ9YkgJhkZlx1v+HZRczm/Nn9e+4F2TC+vbq/tBHBnZ4Zy/7OtHb+59eMHWME/lI uRkRTlZuMYeEzUCh+aZrMv8NU1MhHBAPzrp788zBf+mtDpMU7YE6gk9YZNW69QYurEsJ fPU2+DN2Crk5Sa1Ug4Vgli0JIxxCQ3rxdP/6n8iPCuAK4BI/SN97acW5IFIJwWNGQh9C eSmHtt7/xGJEZ9oCaDA6tIDeGHyqu10jr7oGI698zUSQSpc3+fGJR6JWtace/9C8bQ50 Cdmie0InNsMb1wAYz7IDggkEibWxrgHzDroZGnGOTsTjY2F5q59hgWwwhU8IFOybMmVU s1XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=KMZ1y9xn; spf=pass (google.com: domain of libc-alpha-return-88664-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-88664-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id s24si28074012plp.113.2017.12.29.06.59.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Dec 2017 06:59:05 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-88664-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=KMZ1y9xn; spf=pass (google.com: domain of libc-alpha-return-88664-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-88664-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=iDhkgBJPt6BVIthKDN7m+Ykej9k3I2p o8Zj11OExIbwwf19ku2RMoD7Z4y6YLxO0GB1R9KBM7yzNq+Hm6vgMrYYU5wMzZrD dLC2JatdnJKHWWkvBZ4b/7JuvY2JAUA9Kkxa5S+8Y6DLs7cYfB5SZt1E9z1QohoT WY6QEeT3fQOI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=3kf3Jz+D3CqpTEtZpaT9QHXI70E=; b=KMZ1y 9xnTUNLz3m2WL3stDTo0JPFTv/+rzl75AeGWjBY6JnCT+AenKotJ2MALDjwbfcdL Zj2zqIp/2fWgjzZT++NR38U1uIQAT89XjkQVuEsRmiCy91xcYhLOCU/Xb1BmYGRn yH85eMmjaz62GCzeZ0Uhk9tMatCyNVlHWWTwA4= Received: (qmail 52610 invoked by alias); 29 Dec 2017 14:58:54 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 52582 invoked by uid 89); 29 Dec 2017 14:58:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qk0-f194.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=e9Ty2lrk7/rXMM+qrrUjwhaNmL1wv5h+4Ss1Y2IgZgQ=; b=MAVTpSgunHjwortxmxsbvaaHcbUKmIY79gPDnzdlXDw9JarGBhaQz/xHiT4f5DBvB+ zw1aE9RcTm9BgEjpLb4aVRrIOoRj2J03okSY5lSbtC5sQK57ttxuy4RLW/lYLufb/M/r Jq32RJ5OFLTZubjOIZPmSyoQI8zrQhhabyuRqndsnXtYExCYmJNsOAIkBSo1mHzV0ffM TxBJThmP0Yxb5GbI5TDMAiYG+f4xz/zsr+VxmI3xlgNrcIqxjj6a9cc67vNcIYUWzM/J uXCk4ATeopXkjxy6JveKTdri7s/ujrSybAVPbLlDt1MYqfxjra/7VazYEmnNvOmpe/0t oATw== X-Gm-Message-State: AKGB3mI4URazJF9Aqtda7u4cMd2kt6QElmi7UBW7BWx3wWtF7hePF+7q ib4V5sGKITgfz5Hhzm5RNOL6ixtGdM4= X-Received: by 10.55.42.85 with SMTP id q82mr31717623qkh.117.1514559529224; Fri, 29 Dec 2017 06:58:49 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 3/5] nptl: Add default pthreadtypes-arch.h Date: Fri, 29 Dec 2017 12:58:37 -0200 Message-Id: <1514559519-13167-3-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1514559519-13167-1-git-send-email-adhemerval.zanella@linaro.org> References: <1514559519-13167-1-git-send-email-adhemerval.zanella@linaro.org> This patch adds a default pthreadtypes-arch.h based on default thread definitions from mutex-internal.h, rwlock-internal.h, thread-shared-types.h, and pthreadtypes.h. The idea is to simpify new ports inclusion and an override is required only if the architecture require some different alignment requirement. * sysdeps/nptl/bits/pthreadtypes-arch.h: New file. Signed-off-by: Adhemerval Zanella --- ChangeLog | 2 ++ sysdeps/nptl/bits/pthreadtypes-arch.h | 51 +++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 sysdeps/nptl/bits/pthreadtypes-arch.h -- 2.7.4 diff --git a/sysdeps/nptl/bits/pthreadtypes-arch.h b/sysdeps/nptl/bits/pthreadtypes-arch.h new file mode 100644 index 0000000..d5a6e09 --- /dev/null +++ b/sysdeps/nptl/bits/pthreadtypes-arch.h @@ -0,0 +1,51 @@ +/* Machine-specific pthread type layouts. Generic version. + + Copyright (C) 2017 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _BITS_PTHREADTYPES_ARCH_H +#define _BITS_PTHREADTYPES_ARCH_H 1 + +#include + +#if __WORDSIZE == 64 +# define __SIZEOF_PTHREAD_ATTR_T 56 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +# define __SIZEOF_PTHREAD_RWLOCK_T 24 +# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +# define __SIZEOF_PTHREAD_BARRIER_T 24 +# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +# define __SIZEOF_PTHREAD_COND_T 48 +# define __SIZEOF_PTHREAD_CONDATTR_T 4 +#else +# define __SIZEOF_PTHREAD_ATTR_T 32 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +# define __SIZEOF_PTHREAD_RWLOCK_T 24 +# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +# define __SIZEOF_PTHREAD_COND_T 48 +# define __SIZEOF_PTHREAD_CONDATTR_T 4 +#endif + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +#endif /* bits/pthreadtypes.h */