C++ Logo


Advanced search

Subject: Re: Suggested draft TS for TM-light
From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2020-01-09 15:27:26

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.


SG5 list run by sg5-owner@lists.isocpp.org

Older Archives on Google Groups