C++ Logo


Advanced search

Re: [SG5] Suggested draft TS for TM-light

From: Jens Maurer <Jens.Maurer_at_[hidden]>
Date: Thu, 9 Jan 2020 22:27:26 +0100
On 09/01/2020 22.18, Tim Sweeney wrote:
> I wonder, instead of “bad things” in an atomic block falling back to undefined behavior, can we mandate that they fall back to well defined behavior that is observably equivalent to a global lock?

A global lock provides stronger synchronization/ordering guarantees
than what we do with atomic blocks. It seems that requiring a global
lock would pessimize some implementations. For example, if a
hardware TM implementation is just fine executing

atomic {
  try {
    throw 0;
  } catch(int) {

it seems unfriendly to require such an implementation to actually
acquire a global lock just for the memory ordering.


Received on 2020-01-09 15:29:59