Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Fix Issue 21701 - casWeak is not implemented #3392

Merged
merged 1 commit into from
Mar 18, 2021
Merged

Conversation

rymrg
Copy link
Contributor

@rymrg rymrg commented Mar 11, 2021

dmd aliases casWeak to casStrong.

@dlang-bot
Copy link
Contributor

dlang-bot commented Mar 11, 2021

Thanks for your pull request and interest in making D better, @rymrg! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
21701 normal casWeak is not implemented

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "stable + druntime#3392"

@dlang-bot dlang-bot added the Bug Fix Include reference to corresponding bugzilla issue label Mar 11, 2021
@RazvanN7
Copy link
Contributor

@rymrg please rebase this to get rid of the spurious failures.

@rymrg
Copy link
Contributor Author

rymrg commented Mar 15, 2021

@rymrg please rebase this to get rid of the spurious failures.

@RazvanN7 Last commit to stable is 4 days ago. #3396 hasn't been merged yet.

Copy link
Member

@ibuclaw ibuclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about GDC and LDC?

@rymrg
Copy link
Contributor Author

rymrg commented Mar 15, 2021

What about GDC and LDC?

ldc has its own fork of druntime. So I planned to cherry pick and add the related code after this is merged. Where is druntime located for gdc?

@ibuclaw
Copy link
Member

ibuclaw commented Mar 15, 2021

What about GDC and LDC?

ldc has its own fork of druntime. So I planned to cherry pick and add the related code after this is merged. Where is druntime located for gdc?

Same file as where you're editing here.

bool atomicCompareExchangeWeak(MemoryOrder succ = MemoryOrder.seq, MemoryOrder fail = MemoryOrder.seq, T)(T* dest, T* compare, T value) pure nothrow @nogc @trusted
if (CanCAS!T)
{
return atomicCompareExchangeImpl!(succ, fail, true)(dest, compare, value);
}
bool atomicCompareExchangeStrong(MemoryOrder succ = MemoryOrder.seq, MemoryOrder fail = MemoryOrder.seq, T)(T* dest, T* compare, T value) pure nothrow @nogc @trusted
if (CanCAS!T)
{
return atomicCompareExchangeImpl!(succ, fail, false)(dest, compare, value);
}
bool atomicCompareExchangeStrongNoResult(MemoryOrder succ = MemoryOrder.seq, MemoryOrder fail = MemoryOrder.seq, T)(T* dest, const T compare, T value) pure nothrow @nogc @trusted
if (CanCAS!T)
{
return atomicCompareExchangeImpl!(succ, fail, false)(dest, cast(T*)&compare, value);
}

Copy link
Member

@ibuclaw ibuclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@rymrg rymrg requested a review from wilzbach as a code owner March 15, 2021 14:37
@rymrg rymrg force-pushed the casWeak branch 2 times, most recently from 6052e99 to a1fc6d7 Compare March 15, 2021 14:47
@rymrg
Copy link
Contributor Author

rymrg commented Mar 15, 2021

@RazvanN7 I'm having hard time getting the rebase to work correctly.

@RazvanN7
Copy link
Contributor

I normally do:

git checkout master
git pull
git checkout $branch
git rebase master
git push ...

@rymrg rymrg force-pushed the casWeak branch 2 times, most recently from a1fc6d7 to c21fa5e Compare March 16, 2021 08:39
@rymrg rymrg changed the base branch from master to stable March 16, 2021 08:42
@dlang-bot dlang-bot merged commit a43aa23 into dlang:stable Mar 18, 2021
@rymrg rymrg deleted the casWeak branch March 18, 2021 12:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Fix Include reference to corresponding bugzilla issue core.atomic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants