|
4624 | 4624 | memory location.
|
4625 | 4625 |
|
4626 | 4626 | \pnum
|
4627 |
| -The library defines a number of atomic operations\iref{atomics} and |
4628 |
| -operations on mutexes\iref{thread} that are specially identified as |
4629 |
| -synchronization operations. These operations play a special role in making |
4630 |
| -assignments in one thread visible to another. A synchronization operation on one |
4631 |
| -or more memory locations is either a consume operation, an acquire operation, a |
4632 |
| -release operation, or both an acquire and release operation. A synchronization |
4633 |
| -operation without an associated memory location is a fence and can be either an |
4634 |
| -acquire fence, a release fence, or both an acquire and release fence. In |
4635 |
| -addition, there are relaxed atomic operations, which are not synchronization |
4636 |
| -operations, and atomic read-modify-write operations, which have special |
4637 |
| -characteristics. \begin{note} For example, a call that acquires a mutex will |
| 4627 | +All modifications to a particular atomic object \placeholder{M} occur in some |
| 4628 | +particular total order, called the \defn{modification order} of \placeholder{M}. |
| 4629 | +\begin{note} There is a separate order for each |
| 4630 | +atomic object. There is no requirement that these can be combined into a single |
| 4631 | +total order for all objects. In general this will be impossible since different |
| 4632 | +threads may observe modifications to different objects in inconsistent orders. |
| 4633 | +\end{note} |
| 4634 | + |
| 4635 | +\pnum |
| 4636 | +Certain library calls \defn{synchronize with} other library calls performed by |
| 4637 | +another thread |
| 4638 | +(\ref{support.signal}, \ref{util.smartptr.atomic}, \ref{atomics.order}, |
| 4639 | +\ref{atomics.fences}, \ref{thread}). |
| 4640 | +Such calls are also known as |
| 4641 | +\defnx{synchronization operations}{synchronization operation}. |
| 4642 | +\begin{note} Except in the specified cases, reading a later value does not |
| 4643 | +necessarily ensure visibility as described below. Such a requirement would |
| 4644 | +sometimes interfere with efficient implementation. \end{note} \begin{note} The |
| 4645 | +specifications of the synchronization operations define when one reads the value |
| 4646 | +written by another. For atomic objects, the definition is clear. |
| 4647 | +A call that acquires a mutex will |
4638 | 4648 | perform an acquire operation on the locations comprising the mutex.
|
4639 | 4649 | Correspondingly, a call that releases the same mutex will perform a release
|
4640 | 4650 | operation on those same locations. Informally, performing a release operation on
|
4641 | 4651 | \placeholder{A} forces prior
|
4642 | 4652 | \indextext{side effects}%
|
4643 | 4653 | side effects on other memory locations to become visible
|
4644 | 4654 | to other threads that later perform a consume or an acquire operation on
|
4645 |
| -\placeholder{A}. ``Relaxed'' atomic operations are not synchronization operations even |
4646 |
| -though, like synchronization operations, they cannot contribute to data races. |
4647 |
| -\end{note} |
4648 |
| - |
4649 |
| -\pnum |
4650 |
| -All modifications to a particular atomic object \placeholder{M} occur in some |
4651 |
| -particular total order, called the \defn{modification order} of \placeholder{M}. |
4652 |
| -\begin{note} There is a separate order for each |
4653 |
| -atomic object. There is no requirement that these can be combined into a single |
4654 |
| -total order for all objects. In general this will be impossible since different |
4655 |
| -threads may observe modifications to different objects in inconsistent orders. |
| 4655 | +\placeholder{A}. ``Relaxed'' atomic operations are not synchronization |
| 4656 | +operations even though, like synchronization operations, they cannot |
| 4657 | +contribute to data races. |
4656 | 4658 | \end{note}
|
4657 | 4659 |
|
4658 | 4660 | \pnum
|
|
4668 | 4670 | \item is an atomic read-modify-write operation.
|
4669 | 4671 | \end{itemize}
|
4670 | 4672 |
|
4671 |
| -\pnum |
4672 |
| -Certain library calls \defn{synchronize with} other library calls performed by |
4673 |
| -another thread. For example, an atomic store-release synchronizes with a |
4674 |
| -load-acquire that takes its value from the store\iref{atomics.order}. |
4675 |
| -\begin{note} Except in the specified cases, reading a later value does not |
4676 |
| -necessarily ensure visibility as described below. Such a requirement would |
4677 |
| -sometimes interfere with efficient implementation. \end{note} \begin{note} The |
4678 |
| -specifications of the synchronization operations define when one reads the value |
4679 |
| -written by another. For atomic objects, the definition is clear. All operations |
4680 |
| -on a given mutex occur in a single total order. Each mutex acquisition ``reads |
4681 |
| -the value written'' by the last mutex release. \end{note} |
4682 |
| - |
4683 | 4673 | \pnum
|
4684 | 4674 | An evaluation \placeholder{A} \defn{carries a dependency} to an evaluation \placeholder{B} if
|
4685 | 4675 |
|
|
0 commit comments