Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix atomic_ref<16 bytes>::is_always_lock_free #4478

Merged
merged 14 commits into from
Mar 19, 2024

Conversation

AlexGuteniev
Copy link
Contributor

Fixes #4472

  • Invent always-lock-free compile-time check independently from atomic<T>
    • Sharing the checks implementation is a bomb for vNext. In vNext I expect atomic<3 bytes> to be always-lock-free, but not atomic_ref<3 bytes>
    • Having the template constant in global scope is unnecessary, atomic_ref<T> doesn't have volatile things
  • Expand test matrix for that
    • Requires DCAS machine, but it is Win8+ requirement
    • clang-cl wants cx16 feature enabled for that

@AlexGuteniev AlexGuteniev requested a review from a team as a code owner March 14, 2024 10:53
@AlexGuteniev AlexGuteniev changed the title Sulfur Fix atomic_ref<16 bytes>::is_always_lock_free Mar 14, 2024
@StephanTLavavej StephanTLavavej added the bug Something isn't working label Mar 15, 2024
@StephanTLavavej StephanTLavavej self-assigned this Mar 16, 2024
tests/std/tests/P0019R8_atomic_ref/test.cpp Show resolved Hide resolved
tests/std/tests/P0019R8_atomic_ref/test.cpp Outdated Show resolved Hide resolved
tests/std/tests/P0019R8_atomic_ref/test.cpp Outdated Show resolved Hide resolved
tests/std/tests/usual_20_matrix.lst Outdated Show resolved Hide resolved
tests/utils/stl/test/tests.py Outdated Show resolved Hide resolved
tests/std/tests/P0019R8_atomic_ref/env.lst Outdated Show resolved Hide resolved
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 7ac8388 into microsoft:main Mar 19, 2024
35 checks passed
@StephanTLavavej
Copy link
Member

☢️ 🛠️ 😻

@AlexGuteniev AlexGuteniev deleted the sulfur branch March 19, 2024 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
2 participants