From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by sourceware.org (Postfix) with ESMTPS id A84EF3858D37 for ; Mon, 13 Jul 2020 21:03:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A84EF3858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=joel.sherrill@gmail.com Received: by mail-ed1-f50.google.com with SMTP id a8so15011998edy.1 for ; Mon, 13 Jul 2020 14:03:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=rd2UBtzJdmhoZ+3xwUNBcuKWXjHVGZTLrponMS9wKtM=; b=hM1II/s04urdhMPcQk+1dxDFd5SjgedzVo9q4bNOfWrLynqgaoGTexc6E/0GzGRNZH OfpeUB14QDr3XWGwJOG/eJ8bVeKE+xzbrgSb3iEsf+XkgaLCealA00Cz+fM7DlyyMd4h 5ZT0dO0fiIJgaKeZzgt9p/kyMlwXyNbNdtEpk8ZIvGur4Nwjcb8qxuTEtFsAbBdNRBSM O+/Mj6+1fvdtWsTACeqcfhvfhIV045Wpw69UX1GiIykSSyKXgtlEKoPGIkHllecRpdad aJLvfjtCQAoKyXIAgpWt9e5J3ZCnPKefiGUc7vPgE/nvLGuDPSde6m0sl993vCJvW35R huTg== X-Gm-Message-State: AOAM5318jnfOGrSlQOd5fp9JJYM/c9voYqCzt2h18gbjQJHT1mERWgiu Afw86lQ+2TvQT8mLkrMlD6Ehleir X-Google-Smtp-Source: ABdhPJweJC6no58uYPgt9H5LFeWdu9LS5Yxv28HffalYlEAizp3NVEuQxHV7AautvMeKc9hYxU+bYg== X-Received: by 2002:a50:e791:: with SMTP id b17mr1313505edn.366.1594674198414; Mon, 13 Jul 2020 14:03:18 -0700 (PDT) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com. [209.85.208.46]) by smtp.gmail.com with ESMTPSA id cz2sm12021926edb.82.2020.07.13.14.03.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jul 2020 14:03:18 -0700 (PDT) Received: by mail-ed1-f46.google.com with SMTP id e22so14982961edq.8 for ; Mon, 13 Jul 2020 14:03:17 -0700 (PDT) X-Received: by 2002:a05:6402:796:: with SMTP id d22mr1346998edy.78.1594674197768; Mon, 13 Jul 2020 14:03:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Reply-To: joel@rtems.org From: Joel Sherrill Date: Mon, 13 Jul 2020 16:03:06 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: fenv support vs. SMP systems To: Joseph Myers Cc: Sebastian Huber , Newlib X-Spam-Status: No, score=-3032.2 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2020 21:03:21 -0000 On Mon, Jul 13, 2020, 12:17 PM Joseph Myers wrote= : > On Mon, 13 Jul 2020, Joel Sherrill wrote: > > > It does use the term "system variable" but that doesn't scope it to > > process or thread. > > C11 (the first version of ISO C to introduce threads) says "The > floating-point environment has thread storage duration. The initial state > for a thread=E2=80=99s floating-point environment is the current state of= the > floating-point environment of the thread that creates it at the time of > creation.". > Thanks Jim. This really clarifies things. It is unfortunate that POSIX has threads but ignores them in defining behaviour in places. Sounds like ensuring the floating point context includes whatever is required for the floating point environment to persevere across thread context switches and migrations in an SMP system. Is this worth a note in the documentation? --joel > > -- > Joseph S. Myers > joseph@codesourcery.com