29.8 Races

For an execution execution, two events E and D in SharedDataBlockEventSet(execution) are in a race if the following abstract operation returns true.

  1. If E is not D, then
    1. If the pairs (E, D) and (D, E) are not in execution.[[HappensBefore]], then
      1. If E and D are both WriteSharedMemory or ReadModifyWriteSharedMemory events and E and D do not have disjoint ranges, then
        1. Return true.
      2. If either (E, D) or (D, E) is in execution.[[ReadsFrom]], then
        1. Return true.
  2. Return false.