From Jason Turner

[atomics.fences]

Diff to HTML by rtfpessoa

tmp/tmp4il_cxs_/{from.md → to.md} RENAMED
@@ -4,15 +4,16 @@ This subclause introduces synchronization primitives called *fences*.
4
  Fences can have acquire semantics, release semantics, or both. A fence
5
  with acquire semantics is called an *acquire fence*. A fence with
6
  release semantics is called a *release fence*.
7
 
8
  A release fence A synchronizes with an acquire fence B if there exist
9
- atomic operations X and Y, both operating on some atomic object M, such
10
- that A is sequenced before X, X modifies M, Y is sequenced before B, and
11
- Y reads the value written by X or a value written by any side effect in
12
- the hypothetical release sequence X would head if it were a release
13
- operation.
 
14
 
15
  A release fence A synchronizes with an atomic operation B that performs
16
  an acquire operation on an atomic object M if there exists an atomic
17
  operation X such that A is sequenced before X, X modifies M, and B reads
18
  the value written by X or a value written by any side effect in the
@@ -24,26 +25,25 @@ synchronizes with an acquire fence B if there exists some atomic
24
  operation X on M such that X is sequenced before B and reads the value
25
  written by A or a value written by any side effect in the release
26
  sequence headed by A.
27
 
28
  ``` cpp
29
- extern "C" void atomic_thread_fence(memory_order order) noexcept;
30
  ```
31
 
32
  *Effects:* Depending on the value of `order`, this operation:
33
 
34
  - has no effects, if `order == memory_order::relaxed`;
35
- - is an acquire fence, if `order == memory_order::acquire` or
36
- `order == memory_order::consume`;
37
  - is a release fence, if `order == memory_order::release`;
38
  - is both an acquire fence and a release fence, if
39
  `order == memory_order::acq_rel`;
40
  - is a sequentially consistent acquire and release fence, if
41
  `order == memory_order::seq_cst`.
42
 
43
  ``` cpp
44
- extern "C" void atomic_signal_fence(memory_order order) noexcept;
45
  ```
46
 
47
  *Effects:* Equivalent to `atomic_thread_fence(order)`, except that the
48
  resulting ordering constraints are established only between a thread and
49
  a signal handler executed in the same thread.
 
4
  Fences can have acquire semantics, release semantics, or both. A fence
5
  with acquire semantics is called an *acquire fence*. A fence with
6
  release semantics is called a *release fence*.
7
 
8
  A release fence A synchronizes with an acquire fence B if there exist
9
+ atomic operations X and Y, where Y is not an atomic modify-write
10
+ operation [[atomics.order]], both operating on some atomic object M,
11
+ such that A is sequenced before X, X modifies M, Y is sequenced before
12
+ B, and Y reads the value written by X or a value written by any side
13
+ effect in the hypothetical release sequence X would head if it were a
14
+ release operation.
15
 
16
  A release fence A synchronizes with an atomic operation B that performs
17
  an acquire operation on an atomic object M if there exists an atomic
18
  operation X such that A is sequenced before X, X modifies M, and B reads
19
  the value written by X or a value written by any side effect in the
 
25
  operation X on M such that X is sequenced before B and reads the value
26
  written by A or a value written by any side effect in the release
27
  sequence headed by A.
28
 
29
  ``` cpp
30
+ extern "C" constexpr void atomic_thread_fence(memory_order order) noexcept;
31
  ```
32
 
33
  *Effects:* Depending on the value of `order`, this operation:
34
 
35
  - has no effects, if `order == memory_order::relaxed`;
36
+ - is an acquire fence, if `order == memory_order::acquire`;
 
37
  - is a release fence, if `order == memory_order::release`;
38
  - is both an acquire fence and a release fence, if
39
  `order == memory_order::acq_rel`;
40
  - is a sequentially consistent acquire and release fence, if
41
  `order == memory_order::seq_cst`.
42
 
43
  ``` cpp
44
+ extern "C" constexpr void atomic_signal_fence(memory_order order) noexcept;
45
  ```
46
 
47
  *Effects:* Equivalent to `atomic_thread_fence(order)`, except that the
48
  resulting ordering constraints are established only between a thread and
49
  a signal handler executed in the same thread.