Why is the C++ standard definition of ‘coherenced-order before’ different from the paper it is based on?

This proposal introduced a change to the behavior of sequentially consistent memory model in C++20. The proposal is based on this paper.

The standard introduces a relation called ‘coherenced-ordered before’ defined as follows:

[atomics]

An atomic operation A on some atomic object M is coherence-ordered before another atomic operation B on M if

  1. A is a modification, and B observes A, or
  2. A precedes B in the modification order, or
  3. A and B are not the same atomic read-modify-write operation, and there exists an atomic modification X of M such that A observes the value stored by X and X precedes B in the modification order of M, or
  4. there exists X such that A is coherence-ordered before X and X is coherence-ordered before B.

This definition seems to be based on the ‘extended coherence order’ relation defined in the paper above with only one difference: the third point in the standard restricts A and B to only read-modify-write operation (bolded part). However, in the paper, it is possible for A to be an atomic read operation and B to be an atomic write operation as they are defined using a ‘read-before’ relation.

This seems weird to me since the proposal itself also states that:

The definition of “coherence-ordered before” is essentially standard terminology, but was not previously part of our standard. The third bullet corresponds to what’s often called “reads before”: A reads a write earlier than B.

Another paper, which introduces the RC20 memory model, also defines ‘read-before’ (‘from-read’) without the read-modify-write restriction.

So why is there a mismatch between the standard and the paper it is based on? Are there any reasons why the standard ‘weakens’ the ‘coherence-ordered before’ relation?

Considering the following example:

// Thread 1
x.load(std::memory_order::seq_cst); // 0

// Thread 2
x.store(1, std::memory_order::seq_cst);

Assuming that x is initialized with 0, does this mean it is possible for the load to come after the store in the strict total order S? since they do not form a ‘strongly-happen-before’ relation and neither of them are read-modify-write operations.

4

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật