public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Joel Sherrill <joel@rtems.org>
To: Joseph Myers <joseph@codesourcery.com>
Cc: Sebastian Huber <sebastian.huber@embedded-brains.de>,
	Newlib <newlib@sourceware.org>
Subject: Re: fenv support vs. SMP systems
Date: Mon, 13 Jul 2020 16:03:06 -0500	[thread overview]
Message-ID: <CAF9ehCU2TDFjDp8LRXsajvNifpFJhT5PEWKTuvE8+qh7dH4Wsg@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2007131715560.20292@digraph.polyomino.org.uk>

On Mon, Jul 13, 2020, 12:17 PM Joseph Myers <joseph@codesourcery.com> 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’s 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

  reply	other threads:[~2020-07-13 21:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13  6:19 Sebastian Huber
2020-07-13 13:00 ` Joel Sherrill
2020-07-13 17:16   ` Joseph Myers
2020-07-13 21:03     ` Joel Sherrill [this message]
2020-07-14  5:16     ` Sebastian Huber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAF9ehCU2TDFjDp8LRXsajvNifpFJhT5PEWKTuvE8+qh7dH4Wsg@mail.gmail.com \
    --to=joel@rtems.org \
    --cc=joseph@codesourcery.com \
    --cc=newlib@sourceware.org \
    --cc=sebastian.huber@embedded-brains.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).