From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52983 invoked by alias); 26 Feb 2018 08:43:10 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 52920 invoked by uid 89); 26 Feb 2018 08:43:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*r:98.137.65, H*c:PHrt, H*c:alternative, H*x:5.0 X-HELO: sonic315-10.consmr.mail.gq1.yahoo.com Received: from sonic315-10.consmr.mail.gq1.yahoo.com (HELO sonic315-10.consmr.mail.gq1.yahoo.com) (98.137.65.34) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Feb 2018 08:43:04 +0000 Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.gq1.yahoo.com with HTTP; Mon, 26 Feb 2018 08:43:02 +0000 Date: Mon, 26 Feb 2018 08:43:00 -0000 From: "Ruslan Nikolaev via gcc" Reply-To: Ruslan Nikolaev Reply-To: Ruslan Nikolaev To: Alexander Monakov Cc: "gcc@gcc.gnu.org" Message-ID: <573818316.4534063.1519634565265@mail.yahoo.com> In-Reply-To: References: <1615980330.4453149.1519617655582.ref@mail.yahoo.com> <1615980330.4453149.1519617655582@mail.yahoo.com> <108651736.4493788.1519629845236@mail.yahoo.com> Subject: Re: Fw: GCC interpretation of C11 atomics (DR 459) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00185.txt.bz2 > I'd say the main issue is that libatomic is not guaranteed to work like that. > Today it relies on IFUNC for redirection, so you may (and not "will") get the > desired behavior on Glibc (implying Linux), not on other OSes, and neither on > Linux with non-GNU libc (nor on bare metal, for that matter). I think, in case if IFUNC is not available (i.e., outside glibc), redirection is still possible by introducing a regular function pointer there. Yes, it is an extra cost but better than nothing (+ consistent behavior on all platforms), probably will not add too much anyway because there is already a performance hit by going to libatomic.