From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) by sourceware.org (Postfix) with ESMTPS id B6B373858D37 for ; Mon, 3 Apr 2023 13:35:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B6B373858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-17ac5ee3f9cso30755553fac.12 for ; Mon, 03 Apr 2023 06:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680528921; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=H3FQiAX6X4jOnW61xGbpjeL9hOI8qY243Nv0LGK/HFU=; b=s3NpL5xYvN8DcFW89vYP3YO/ErM/g1K4wmL5tJF0dCy6pt40e+hELqP8hh4gJpzwIO nJAtp+loOVfP/sWx//bbBBrXCysxC1FVSwpt2CcgxNaxrLdXbG7kvX9HaXC9cGPSXQ8k 9hpPAuOW8MsqOEay6gRqH8jPP4S/HH51ow6YBVeMfP9M9vX30OT7kO4wssCnWj8u/8r9 BHpTlwsn5BkdDnLA4xkygUUsCt6MnYpG5B1AXJJ6BiIJ2zSwtU2yUQfAXXnfMkQdyogM vzq1zG2c78e+fanDPYConQY9IwAGKsofLmDxfHJ6e1xqzvdR59BlnhuPkJYFNNFS+03v hiIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680528921; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=H3FQiAX6X4jOnW61xGbpjeL9hOI8qY243Nv0LGK/HFU=; b=5hnxhk97BnqsQNQX5GVfeSc9TDDrykANN9YDV6udvN1jowMrl6BulNxaMLkx3mjHHC pfWKzsb7TwEE3wENpHOwTNME9R3nBil/e6nEXeX0DiE5CoHtGLY4Iaz4uqcPwaIROaz4 clTxTW212IUxtXQwZtvyFQh0d7drBDpwUaFqPmanqtnFdIzeNCuDrF874xOWazniu9cb 45S+2eC/LHxU1GhpiAkRgm8YZ92XrRHf+3FdfWBcXELJDEnl9ijnHzLNJ1nMov3ffPKo pV3B0B1hsBHncwbZ9w22tdV0ZZJiY580/ujMkhNIX5kwYebD5ZaohBeLn98grbD6JphV b0Ww== X-Gm-Message-State: AAQBX9fb5Qnm38whLcARE6ylo3RkUmJ05Y8paAroW8+8wFs/+Y2UC86b HVaIL+DrrysitxeLiNRzM2QUGaaWQMeZvawE2EGPbQ== X-Google-Smtp-Source: AKy350ZP5C+98Zg/2XvEe36gKeWV2D4XaTuEdoqP1v3m3QrO40N3hq8OFZ0srMNXJGCXMfydQKRBKQ== X-Received: by 2002:a05:6870:c18b:b0:17e:c151:e815 with SMTP id h11-20020a056870c18b00b0017ec151e815mr22842625oad.26.1680528920995; Mon, 03 Apr 2023 06:35:20 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c1:e5a5:1dbf:5ab5:fa44:f99c? ([2804:1b3:a7c1:e5a5:1dbf:5ab5:fa44:f99c]) by smtp.gmail.com with ESMTPSA id w3-20020a9d6383000000b006a11c15a097sm4222889otk.4.2023.04.03.06.35.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Apr 2023 06:35:20 -0700 (PDT) Message-ID: <84fad946-c7b4-5c01-00d6-586331b901b9@linaro.org> Date: Mon, 3 Apr 2023 10:35:17 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH v3] malloc: Use C11 atomics on memusage Content-Language: en-US To: Wilco Dijkstra , DJ Delorie Cc: "libc-alpha@sourceware.org" References: <20230323161737.2592579-1-adhemerval.zanella@linaro.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 List-Id: On 03/04/23 10:10, Wilco Dijkstra wrote: > Hi, > >> Adhemerval Zanella writes: >>> -#include > > Just double checking, does this mean we are now happy with bypassing > the internal header, all its defines/checks and target implementations, > and require that all supported targets have correctly implemented C11 > atomics? I did it for memusage mainly because it is standalone library that in theory can be move out glibc (and I might do it, similar to what I did for libSegfault). > > This would make my outstanding patches on cleaning up atomics a lot > easier, however I'm wondering whether this will "just work" given the > intermediate state will be a mix between C11 atomics and various target > specific hacks. My patches tried hard to avoid such issues by taking > tiny steps in improving this and keeping everything consistent. I think for internal usage, we might still use the internal atomic.h. Maybe what we can do it to fist move all the internal code to the C11-like interface and then check if we can move to compiler builtins.