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

sync/atomic: public And/Or ops and race instrumentation #64331

Closed
wants to merge 33 commits into from

Conversation

mauri870
Copy link
Member

@mauri870 mauri870 commented Nov 22, 2023

This CL implements the new sync/atomic AND and OR apis as well as their race
counterparts.

Fixes #61395

@gopherbot
Copy link
Contributor

This PR (HEAD: 4cc18df) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/544455.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 1: Run-TryBot+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 1: TryBot-Result-1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 1: -Run-TryBot


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 1: Code-Review+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 1: -Code-Review Run-TryBot+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: c04416c) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/544455.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 2: Run-TryBot+1

(3 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 2: TryBot-Result-1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 2:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 2: -Run-TryBot


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 2: Run-TryBot+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 2: -Run-TryBot


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 2: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: f1569f3) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/544455.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

This PR (HEAD: f2440c1) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/544455.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@mauri870 mauri870 changed the title sync/atomic: testing race for And/Or sync/atomic: public And/Or apis Nov 25, 2023
@gopherbot
Copy link
Contributor

This PR (HEAD: b5bd0b7) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/544455.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 32: TryBot-Result-1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Lynn Boger:

Patch Set 32:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 4b97947) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/544455.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 33:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Austin Clements:

Patch Set 33: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 33:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-05-16T16:05:47Z","revision":"bca1aec04b4b86d61381bdb26dee0d8c519513dc"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Austin Clements:

Patch Set 33: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 33:

This CL has failed the run. Reason:

Tryjob golang/try/x_tools-gotip-linux-amd64 has failed with summary (view all results):


FAILURE

Error:

failed to run "test golang.org/x/tools module": exit status 1
failed to run "test golang.org/x/tools/gopls module": exit status 1

Links:


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 33: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Austin Clements:

Patch Set 33: Code-Review+2

(6 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 06006a4) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/544455.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Mauri de Souza Meneguzzo:

Patch Set 34:

(4 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: f174297) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/544455.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Austin Clements:

Patch Set 35: Code-Review+2 Commit-Queue+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 35:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-05-17T17:24:37Z","revision":"ecc40e66c389f501ede5a961b71329c03ae682a5"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Austin Clements:

Patch Set 35: Run-TryBot+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 35:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 35:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Austin Clements:

Patch Set 35: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 35:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 35: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 35: TryBot-Result-1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Austin Clements:

Patch Set 35:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Austin Clements:

Patch Set 35: Auto-Submit+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/544455.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request May 17, 2024
This CL implements the new sync/atomic AND and OR apis as well as their race
counterparts.

Fixes #61395

Change-Id: I294eefe4b3ac27bc4ed237edcbfa88a8c646d86f
GitHub-Last-Rev: f174297
GitHub-Pull-Request: #64331
Reviewed-on: https://go-review.googlesource.com/c/go/+/544455
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Auto-Submit: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/544455 has been merged.

@gopherbot gopherbot closed this May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sync/atomic: add OR/AND operators for unsigned types
2 participants