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 Netto X-Patchwork-Id: 25137 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-Google-Smtp-Source: ACJfBovnEXFbd/MakAp5kLBCgPd+r/vPBAAc+XWH3QxvminrANqUfyY79yFeojgurWcaWb3BzF5AHw== 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 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 */