From patchwork Fri Oct 17 15:31:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 38880 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E413A2054E for ; Fri, 17 Oct 2014 15:31:58 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id hi2sf696151wib.5 for ; Fri, 17 Oct 2014 08:31:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:in-reply-to:references:x-original-sender :x-original-authentication-results; bh=9x279Qcju9g1i+mwffftdzCW1ZvSg6SID/f4Mu7G59Q=; b=WHFuqcmwET/ifs7phb+UW33Leh6/xg/XfwYCptbiDyEkT1mwJfmQEBxMgCuhAchHVE m8R0pg0tkfc4j2YhVmgwaJqnIn7wOl8oWKEzZs2MYvn5XvDPMerRSmeITS4roeT20j+/ qiDR9wvibmfm5SRPxZlVXN3Gk1Iri69Xy8qOOkfgaitKyc7WTK65pkL3x0YD91vbQ0W9 xMmhv74lejE+QO55j3rhYhdL8xEo+rYs/AClHZXf3Ra0Pk86r6PEhR7AZsxLZXhziP9N RZ1WKtsv8lCzNBaaYTs8X3TuQliO3RlkbtiwA0BA8rgysfagJk4CteJpXFfAM9lqypDu vIIw== X-Gm-Message-State: ALoCoQlI1dbSCyZSfY2Cx+usLPhSDmvAmgyXffmX5btd4hTe2JWuKlOTSEZ/f1v6sdPy2euHGdcI X-Received: by 10.112.95.133 with SMTP id dk5mr1501198lbb.3.1413559918148; Fri, 17 Oct 2014 08:31:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.6.42 with SMTP id cr10ls257665lad.73.gmail; Fri, 17 Oct 2014 08:31:57 -0700 (PDT) X-Received: by 10.112.140.8 with SMTP id rc8mr9588438lbb.2.1413559917917; Fri, 17 Oct 2014 08:31:57 -0700 (PDT) Received: from mail-lb0-x235.google.com (mail-lb0-x235.google.com. [2a00:1450:4010:c04::235]) by mx.google.com with ESMTPS id j9si2559974lag.75.2014.10.17.08.31.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 08:31:57 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::235 as permitted sender) client-ip=2a00:1450:4010:c04::235; Received: by mail-lb0-f181.google.com with SMTP id l4so889406lbv.12 for ; Fri, 17 Oct 2014 08:31:57 -0700 (PDT) X-Received: by 10.112.189.10 with SMTP id ge10mr9501654lbc.23.1413559917763; Fri, 17 Oct 2014 08:31:57 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp249767lbz; Fri, 17 Oct 2014 08:31:56 -0700 (PDT) X-Received: by 10.68.167.99 with SMTP id zn3mr9412125pbb.30.1413559916255; Fri, 17 Oct 2014 08:31:56 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id ao2si1495418pad.52.2014.10.17.08.31.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Oct 2014 08:31:56 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-53593-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 16538 invoked by alias); 17 Oct 2014 15:31:37 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 16478 invoked by uid 89); 17 Oct 2014 15:31:37 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f42.google.com X-Received: by 10.194.221.105 with SMTP id qd9mr11231576wjc.51.1413559892580; Fri, 17 Oct 2014 08:31:32 -0700 (PDT) From: Will Newton To: libc-alpha@sourceware.org Subject: [PATCH 3/5] sysdeps/generic/atomic_types.h: Add generic atomic types header Date: Fri, 17 Oct 2014 16:31:20 +0100 Message-Id: <1413559882-959-4-git-send-email-will.newton@linaro.org> In-Reply-To: <1413559882-959-1-git-send-email-will.newton@linaro.org> References: <1413559882-959-1-git-send-email-will.newton@linaro.org> X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::235 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 Add a header which defines a number of standard typedefs for atomic types. The list was taken from the ia64 port which seems to have the widest array of types. ChangeLog: 2014-10-15 Will Newton * sysdeps/generic/atomic_types.h: New file. --- sysdeps/generic/atomic_types.h | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 sysdeps/generic/atomic_types.h diff --git a/sysdeps/generic/atomic_types.h b/sysdeps/generic/atomic_types.h new file mode 100644 index 0000000..93e8396 --- /dev/null +++ b/sysdeps/generic/atomic_types.h @@ -0,0 +1,44 @@ +/* Atomic types. Generic version. + Copyright (C) 2014 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 + . */ + +#include + +typedef int8_t atomic8_t; +typedef uint8_t uatomic8_t; +typedef int_fast8_t atomic_fast8_t; +typedef uint_fast8_t uatomic_fast8_t; + +typedef int16_t atomic16_t; +typedef uint16_t uatomic16_t; +typedef int_fast16_t atomic_fast16_t; +typedef uint_fast16_t uatomic_fast16_t; + +typedef int32_t atomic32_t; +typedef uint32_t uatomic32_t; +typedef int_fast32_t atomic_fast32_t; +typedef uint_fast32_t uatomic_fast32_t; + +typedef int64_t atomic64_t; +typedef uint64_t uatomic64_t; +typedef int_fast64_t atomic_fast64_t; +typedef uint_fast64_t uatomic_fast64_t; + +typedef intptr_t atomicptr_t; +typedef uintptr_t uatomicptr_t; +typedef intmax_t atomic_max_t; +typedef uintmax_t uatomic_max_t;