tmp/tmpy9rn68jj/{from.md → to.md}
RENAMED
|
@@ -2,17 +2,21 @@
|
|
| 2 |
|
| 3 |
The implementation may assume that any thread will eventually do one of
|
| 4 |
the following:
|
| 5 |
|
| 6 |
- terminate,
|
|
|
|
| 7 |
- make a call to a library I/O function,
|
| 8 |
-
- perform an access through a volatile glvalue,
|
| 9 |
-
- perform
|
|
|
|
|
|
|
| 10 |
|
| 11 |
[*Note 1*: This is intended to allow compiler transformations such as
|
| 12 |
-
removal of empty loops, even when termination
|
| 13 |
-
proven.
|
|
|
|
| 14 |
|
| 15 |
Executions of atomic functions that are either defined to be lock-free
|
| 16 |
[[atomics.flag]] or indicated as lock-free [[atomics.lockfree]] are
|
| 17 |
*lock-free executions*.
|
| 18 |
|
|
@@ -36,13 +40,14 @@ Executions of atomic functions that are either defined to be lock-free
|
|
| 36 |
|
| 37 |
During the execution of a thread of execution, each of the following is
|
| 38 |
termed an *execution step*:
|
| 39 |
|
| 40 |
- termination of the thread of execution,
|
| 41 |
-
- performing an access through a volatile glvalue,
|
| 42 |
-
- completion of a call to a library I/O function,
|
| 43 |
-
|
|
|
|
| 44 |
|
| 45 |
An invocation of a standard library function that blocks [[defns.block]]
|
| 46 |
is considered to continuously execute execution steps while waiting for
|
| 47 |
the condition that it blocks on to be satisfied.
|
| 48 |
|
|
@@ -64,12 +69,12 @@ concurrent threads that are not blocked in a standard library function
|
|
| 64 |
|
| 65 |
For a thread of execution providing *concurrent forward progress
|
| 66 |
guarantees*, the implementation ensures that the thread will eventually
|
| 67 |
make progress for as long as it has not terminated.
|
| 68 |
|
| 69 |
-
[*Note 5*: This
|
| 70 |
-
|
| 71 |
fulfill this requirement means that this will happen in an unspecified
|
| 72 |
but finite amount of time. — *end note*]
|
| 73 |
|
| 74 |
It is *implementation-defined* whether the implementation-created thread
|
| 75 |
of execution that executes `main` [[basic.start.main]] and the threads
|
|
|
|
| 2 |
|
| 3 |
The implementation may assume that any thread will eventually do one of
|
| 4 |
the following:
|
| 5 |
|
| 6 |
- terminate,
|
| 7 |
+
- invoke the function `std::this_thread::yield` [[thread.thread.this]],
|
| 8 |
- make a call to a library I/O function,
|
| 9 |
+
- perform an access through a volatile glvalue,
|
| 10 |
+
- perform an atomic or synchronization operation other than an atomic
|
| 11 |
+
modify-write operation [[atomics.order]], or
|
| 12 |
+
- continue execution of a trivial infinite loop [[stmt.iter.general]].
|
| 13 |
|
| 14 |
[*Note 1*: This is intended to allow compiler transformations such as
|
| 15 |
+
removal, merging, and reordering of empty loops, even when termination
|
| 16 |
+
cannot be proven. An affordance is made for trivial infinite loops,
|
| 17 |
+
which cannot be removed nor reordered. — *end note*]
|
| 18 |
|
| 19 |
Executions of atomic functions that are either defined to be lock-free
|
| 20 |
[[atomics.flag]] or indicated as lock-free [[atomics.lockfree]] are
|
| 21 |
*lock-free executions*.
|
| 22 |
|
|
|
|
| 40 |
|
| 41 |
During the execution of a thread of execution, each of the following is
|
| 42 |
termed an *execution step*:
|
| 43 |
|
| 44 |
- termination of the thread of execution,
|
| 45 |
+
- performing an access through a volatile glvalue,
|
| 46 |
+
- completion of a call to a library I/O function, or
|
| 47 |
+
- completion of an atomic or synchronization operation other than an
|
| 48 |
+
atomic modify-write operation [[atomics.order]].
|
| 49 |
|
| 50 |
An invocation of a standard library function that blocks [[defns.block]]
|
| 51 |
is considered to continuously execute execution steps while waiting for
|
| 52 |
the condition that it blocks on to be satisfied.
|
| 53 |
|
|
|
|
| 69 |
|
| 70 |
For a thread of execution providing *concurrent forward progress
|
| 71 |
guarantees*, the implementation ensures that the thread will eventually
|
| 72 |
make progress for as long as it has not terminated.
|
| 73 |
|
| 74 |
+
[*Note 5*: This applies regardless of whether or not other threads of
|
| 75 |
+
execution (if any) have been or are making progress. To eventually
|
| 76 |
fulfill this requirement means that this will happen in an unspecified
|
| 77 |
but finite amount of time. — *end note*]
|
| 78 |
|
| 79 |
It is *implementation-defined* whether the implementation-created thread
|
| 80 |
of execution that executes `main` [[basic.start.main]] and the threads
|