From patchwork Fri Dec 29 14:58:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 122936 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4784588qgn; Fri, 29 Dec 2017 06:59:13 -0800 (PST) X-Google-Smtp-Source: ACJfBovWgoX6Oe2PkKH8JRaQ8SGjWnkwzBHpwvikXmb/3GdOmjv5vPJZX1bv3lMZo8cfch4lvQ24 X-Received: by 10.84.234.9 with SMTP id m9mr35851497plk.436.1514559553399; Fri, 29 Dec 2017 06:59:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514559553; cv=none; d=google.com; s=arc-20160816; b=vM4jNzX4MeuvAaDEyPZZ6DlR0/V4AEgOdECQ2sZkimC0skhXZuQ3yuaaR+YRH/TdvS B9C8SVH2EiBE9amOK3vnlbMsuMAXH9t6uh4nnS/V0vn6kul7wtmhmWCUIHvVxr54OCfz 4J/wfTF1RQg4Dh+Qf6WMdx1eGSLJWzZ5MtWjHCpHZHt432ihGy2a73pz9dbeXVz0BQ4Y HixilpTFQoDk5c6w32r/jCKmQYWBUZPS4PjCKgWELQjVu4KCleGzbz6KRnsbAd9/27IX OOJ6mW/gdsvxTB9xjY62VJtllF3Lz3S7UxkWT46AJyuMRINKzUqRkpv/IRARj/oYmK3L Y08Q== 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=Qe2eBlvYjtvRSkRy5hKGrRe+vRpQbW6jrVHbC6TNVck=; b=QB/0skkVkQRnfi4v16HdSYfKJE3x5p1oylzQ4SO8hU3DkdLytRG4y10eNdZGYdJWgN K+2h9ALN7hnyGQcXIpO/40F0O4z57omUsWuv31oJbvN0j0t5SRW9hRuMyMCuwml8X+fY 0jmuIapcw+ahS5MeiU20gp757OG40/7tHVqrMx2CkzpsYP5/mJl5k3wCdityx/Wn/9Kw ReS0FHO6bhk+XG+7ZpsrjaSvGa7v4HX6UmybeCIkKdIz5wJdQ5MDvakCjlI/roUhQzWq KBkMjt2PFjwDfpMHGqla44y4XVTqBU1ZyaMqN8b2zwXXF4rYGyrj79+RG5D1ecx7XzhP wrqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=mSiOjZcZ; spf=pass (google.com: domain of libc-alpha-return-88665-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-88665-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 d18si25652273pgp.426.2017.12.29.06.59.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Dec 2017 06:59:13 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-88665-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=mSiOjZcZ; spf=pass (google.com: domain of libc-alpha-return-88665-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-88665-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=eGS9piclPz1rIawbtgMd/T0c78tRx4a 90htehhJWaUg0RtkpjC3Yt1bfkbFuybzA5Srxiw3R3GJqJs4ncRSlBaA/NVJK624 fX9G1A1T6w6lCgpFeqiY3wMhKJzXCfCObSk+Q9hhJfP+qf0OEcII0Z5TInUSAVWR IJmCYErgBqW0= 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=3q4E5qpOvMKs4AGLhOEfmUullK4=; b=mSiOj ZcZ7zXHwALbXFJ1kfHK0b74q0YOqalCYqsOHHaTDsS8zROa//FIT/0actpVeJL8z iXjM7Yy/dkAAzWziTl9gQmPkIA+tn3q4L+9K14DsdkbslsxHqToK9irGG3s8dQLL n2KNj2UJLMXaVaBBwSC9+Bfx+474X1DRnztGxk= Received: (qmail 52618 invoked by alias); 29 Dec 2017 14:58:55 -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 52593 invoked by uid 89); 29 Dec 2017 14:58:54 -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, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1434 X-HELO: mail-qk0-f193.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=Qe2eBlvYjtvRSkRy5hKGrRe+vRpQbW6jrVHbC6TNVck=; b=XKGAqcHl8ORLFR9jeFpRJAKa2jTp1WjbGb0AH+kUMvszt8MUVa/BoVrnofoNwhzSb5 JzFjcHc5tJznWdteSN6oy6Zm1HuGX2V9fbiWTEf3GHAGMLf4UM2582hOUhDVLnC6+Msq CShayY0OzrQKmMAcQH9uMnU1ej/Xr9SQyfbX/leC3sPLq5km6Uw7jSISZUawKCUGwoGN s1i6jKyMP2REW5tS6PWaT/gfsBMFsKmlX2prd8Mfvdh8gEUsYuCkZ8nT36n0NcWSWTQH O2Ey5g2rLY7TzoJcw/FnXKBuM4zi1oYU6Ocdx3epSRw3eD70tR65AQAYAEKDew+oHG2e 45tg== X-Gm-Message-State: AKGB3mLLh6YYdNLdUbxEwGlzEC+AbGcFnED1nduBU8DYGcqvsmRzrT8k fL6QaNNNiKPH/lSqN3WuUv02WkZc+3o= X-Received: by 10.55.55.11 with SMTP id e11mr35062708qka.144.1514559530566; Fri, 29 Dec 2017 06:58:50 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 4/5] nptl: Add default pthread-offsets.h Date: Fri, 29 Dec 2017 12:58:38 -0200 Message-Id: <1514559519-13167-4-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 pthread-offsets.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. * sysdeps/nptl/pthread-offsets.h: New file. Signed-off-by: Adhemerval Zanella --- ChangeLog | 2 ++ sysdeps/nptl/pthread-offsets.h | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 sysdeps/nptl/pthread-offsets.h -- 2.7.4 diff --git a/sysdeps/nptl/pthread-offsets.h b/sysdeps/nptl/pthread-offsets.h new file mode 100644 index 0000000..89cd73b --- /dev/null +++ b/sysdeps/nptl/pthread-offsets.h @@ -0,0 +1,19 @@ +#include + +/* These values are based on internal generic types from + sysdeps/nptl/internaltypes.h, sysdeps/nptl/bits/mutex-internal.h, + sysdeps/nptl/bits/rwlock-internal.h, and + sysdeps/nptl/bits/thread-shared-types.h */ +#if __WORDSIZE == 64 +# define __PTHREAD_MUTEX_NUSERS_OFFSET 12 +# define __PTHREAD_MUTEX_KIND_OFFSET 16 +# define __PTHREAD_MUTEX_SPINS_OFFSET 20 +# define __PTHREAD_MUTEX_ELISION_OFFSET 22 +# define __PTHREAD_MUTEX_LIST_OFFSET 24 +#else +# define __PTHREAD_MUTEX_NUSERS_OFFSET 12 +# define __PTHREAD_MUTEX_KIND_OFFSET 16 +# define __PTHREAD_MUTEX_SPINS_OFFSET 20 +# define __PTHREAD_MUTEX_ELISION_OFFSET 22 +# define __PTHREAD_MUTEX_LIST_OFFSET 24 +#endif