-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
BTRBuild, Testing, ReleaseBuild, Testing, ReleasePriority:MediumMedium Priority - Should be done as time permits.Medium Priority - Should be done as time permits.enhancementNew feature or requestNew feature or request
Description
Since prior to the enhancement, it was possible to create scenarios where the false branch was never taken due to the atomic load falling inside the same superblock as the CAS that depends on it, I should have a simple unit test that asserts that after X minutes it ends up failing.
atomic_int x = ATOMIC_VAR_INIT(0);
atomic_bool running = ATOMIC_VAR_INIT(true);
#pragma omp parallel
while (running) {
int y = atomic_load(&x);
assert(atomic_compare_exchange_strong(&x, &y, y + 1));
}The above should not fail with the old translation but should fail with the new.
Metadata
Metadata
Assignees
Labels
BTRBuild, Testing, ReleaseBuild, Testing, ReleasePriority:MediumMedium Priority - Should be done as time permits.Medium Priority - Should be done as time permits.enhancementNew feature or requestNew feature or request