Movatterモバイル変換


[0]ホーム

URL:


This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-12-20


726. Atomic and non-atomic objects in the memory model

Section:6.10.2  [intro.multithread]    Status:CD2    Submitter:Clark Nelson    Date:30 September, 2008

[Voted into WP at October, 2009 meeting.]

In general, the description of the memory model is very careful tospecify when the objects under discussion are atomic ornon-atomic. However, there are a few cases where it could beclearer.

Proposed resolution (March, 2009):

  1. Modify 6.10.2 [intro.multithread] paragraph 5 as follows:

  2. All modifications to a particular atomic objectMoccur in some particular total order, called themodification order of M. IfA andB aremodifications of an atomic objectM andA happens before(as defined below)B, thenA shall precedeB inthe modification order ofM, which is defined below.[Note: This states that the modification orders must respecthappens before. —end note] [Note: There isa separate order for eachscalaratomic object. Thereis no requirement that these can be combined into a single total orderfor all objects. In general this will be impossible since differentthreads may observe modifications to different variables ininconsistent orders. —end note]
  3. Modify 6.10.2 [intro.multithread] paragraph 7 as follows:

  4. Certain library callssynchronize with other library callsperformed by another thread. In particular, an atomic operationA that performs a release operation on anatomic objectM synchronizes with an atomic operationB that performsan acquire operation onM and reads a value written by any sideeffect in the release sequence headed byA...
  5. Modify 6.10.2 [intro.multithread] paragraph 12 as follows:

  6. Avisible side effect A onana scalarobjector bit-fieldM with respect to a valuecomputationB ofM satisfies the conditions:

    The value of a non-atomic scalar objector bit-fieldM, as determined by evaluationB, shall be the valuestored by the visible side effectA. [Note: If there isambiguity about which side effect to a non-atomic objectorbit-field is visible, then there is a data race, and thebehavior is undefined. —end note] ...




[8]ページ先頭

©2009-2026 Movatter.jp