Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: wordsmithing

...

NOTE 1 Two threads of execution can update and access separate memory locations without interfering with each other.

In a compiler that is only compliant with C99 or earlier compliant compiler it is possible that flag1 and flag2 are stored in the same word. If both assignments occur on a thread-scheduling interleaving that ends with both stores occurring after one another, it is possible that only one of the flags will be set as intended, and the other flag will equal contain its previous value, because both members are represented by the same word, which is the smallest unit the processor can work on. Before the changed changes made to the C Standard for C11, there were no guarantees that these flags could be modified concurrently.

...