Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Edited by sciSpider v2.4 (sch jbop) (X_X)@==(Q_Q)@

...

A better approach is to embed a concurrently-accessed variable inside a union, along with a long variable, or at least some padding to ensure that the concurrent variable is the only element to be accessed at that address. This would effectively guarantee that no other variables are accessed or modified when the concurrent variable is accessed or modified.

...

Noncompliant Code Example (Bit Field)

In the following non-compliant noncompliant code, two executing threads simultaneously access two separate members of a global struct.

...