Fix documentation for @cmpxchg* functions.#22306
Closed
IntegratedQuantum wants to merge 1 commit into
Closed
Conversation
The text was incorrectly saying that it returns null in the failure path.
Contributor
Contributor
Author
|
Oops, my bad, I should have searched for it. (I expected that such a small fix would have been merged within days, not 5 months) Well, now that it is here, I will leave this PR open as a reminder to the maintainers to please merge a fix for this issue before more people stumble over this. With now 3 options to choose from, there should be no reason to delay this any further. |
Member
|
I decided to take #21755 because it was a simpler and more obvious fix that immediately resolves the confusion. I think the docs for these builtins could do with a complete rewrite in the longer term though, not just this one sentence. In any case, thanks for taking a stab at this! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The text was incorrectly saying that it returns
nullin the failure path, if expected != current, but according to the example code below and my intuition it only returns null when the comparison succeeds.I also decided to simplify the sentence a bit, since the previous sentence structure didn't do a good job at conveying the important piece of information.